This paper proposes an innovative machine learning algorithm for resource optimization in IoT fog network. The proposed model utilizes distributed semi-supervised learning with innovative ensemble learning for efficient resource optimization in the IoT fog network for improved availability and readiness. The proposed model shows a great potential for real-time IoT applications utilizing the efficient fog resource optimization. The proposed model is evaluated against other state-of the-art models using the benchmark data to demonstrate its readiness and usefulness in real-time mission critical IoT applications such as in unmanned vehicle control system. The proposed model shows an acceptable resource optimization performance with reasonable computational complexity which proves to be useful in real-time IoT applications.