The concept of smart cities revolves around utilizing modern technologies to manage and optimize city operations, including energy infrastructure. One of the biggest problems that smart cities have to deal with is ensuring the efficient usage of energy infrastructure to reduce energy consumption, cost, and environmental impact. Machine learning is a powerful tool that can be utilized to optimize energy usage in smart cities. This paper proposes a framework for efficient usage of energy machine learning for city infrastructure in smart cities. The proposed framework includes three main components: data collection, machine learning model development, and energy infrastructure optimization. The data collection component involves collecting energy consumption data from various sources, such as smart meters, sensors, and other IoT devices. The collected data is then pre-processed and cleaned to remove any inconsistencies or errors. The machine learning model development component involves developing machine learning models to predict energy consumption and optimize energy usage. The models can be developed using various techniques such as regression, classification, clustering, and deep learning. These models can predict energy consumption patterns based on historical data, weather conditions, time of day, and other factors. The energy infrastructure optimization component involves utilizing the machine learning models to optimize energy usage. The optimization process involves adjusting energy supply and demand to reduce energy consumption and cost. The optimization process can be automated, and SVM based machine learning models can continuously enhance their precision over time by studying the data. The proposed framework has several benefits, including reducing energy consumption, cost, and environmental impact. It can also improve the reliability and stability of energy infrastructure, reduce the risk of blackouts, and improve the overall quality of life in highly developed urban areas. Last but not least, the projected framework for efficient usage of energy machine learning for city infrastructure in smart cities is a promising solution to optimize energy usage and reduce energy consumption and cost. The framework can be implemented in various smart city applications, including buildings, transportation, and industrial processes.