###### Abstract
A study compared two house MGs that consisted of PV panels and wind, an energy storage battery, and an EV [38]. One MG incorporated the notion of a V2H unit installed in a home linked to the main grid because the EV was not available daily. The economic benefit of V2H was examined, and its cost-significance may have persuade residences to move from thermal to EVs. Furthermore, the quantity of CO\({}_{2}\) released by EVs is half that produced by combustion vehicles, reducing pollution dramatically. As a result, CO\({}_{2}\) emissions will be significantly reduced during a 20-year time frame. In addition, the study demonstrated the success of V2H in terms of electrical service continuity, energy self-sufficiency, and pricing. Finally, the study concluded by demonstrating a new research approach: Applying artificial intelligence (AI) and algorithms to predict meteorological data for optimal energy generation and EV availability and use. Furthermore, several parameters should be considered when modelling MGs, such as pricing, generation of RnEs, and energy consumption for better-managing demand and load shedding. ML algorithms are prevalent wherever AI exists [39] and are classified as supervised or unsupervised [40]. Supervised ML algorithms are trained from a labelled training dataset. For instance, V2H applications can be charged and discharged case labels. Moreover, unsupervised ML algorithms lack labelled output variables, whereas the training dataset comprises only input variables, such as time-series data for load forecasting. Researchers proposed a supervised ML model to predict EV availability in V2H services to understand the vehicle availability's impact on capacity [19]. First, the model predicts the EV's start and end locations (classification problem). Then, it predicts the total distance of the trip (a regression problem). Finally, the framework used for the previous three ML tasks is a light gradient boosted machine (LightGBM). This model was applied to five distinct vehicle usage profiles. First, the usage profiles predicted the EV availability by classifying the number of trips per week. Finally, the model was used on each user profile to earn the lowest electricity bill for each class. The findings of this evaluation indicated that this model predicts the EVs' travelled distance and location with an accuracy of 85%. Studies have been performed in which the authors proposed an unsupervised ML model for the economic analysis of the profits of dynamic pricing schemes in the different operation modes of an EV charging and discharging approach in HEMS [11]. The V2H operation mode revealed its relative financial advantage without affecting customer comfort. Furthermore, the results indicated that using V2H for minimizing electricity consumption from the grid in peak pricing periods is more beneficial than V2G or G2V. Several subsets of ML algorithms, such as DL, utilize artificial neural networks (ANNs) by applying a layered concept hierarchy. Moreover, RL based on rewards and penalties has gained significant attention in dynamically changing environments, and there is a rising interest in data-driven techniques for modelling HEMSs. As a result, researchers are seeking elements that may provide insights and predictive analytics. Table 1 summarizes the algorithms used in the most recent literature (2019-2022) to predict several parameters in HEMSs that integrate V2H technology. \begin{table}
\begin{tabular}{c c c c c} \hline
**Ref.** & **Algorithm** & **Prediction** & **ML Type** & **Real-Time** \\ \hline
[12] & Q-learning & Charge and discharge EV battery & RL & Charging and discharging schedules in real-time. \\ \hline
[13] & Mixed integral linear & Optimize the energy generation of & & \\  & programming (MILP) & a smart home with minimal costs & AI & Real-time pricing \\  & & & user’s comfort & \\ \hline \end{tabular}
\end{table} 
Table 1: ML application in HEMS with a V2H unit.