# Nuclear Family Type Identification Based on Deep Forest Algorithm in Residential Power Consumption
## 4 Example Analysis
### Improved Algorithms' Experiment  
Based on the experimental results, it was observed that the model trained using whole week data performed better than the models trained using either workday or weekend data. Additionally, the model trained using autumn data performed better than the model trained using summer data. Taking these results into consideration, the current study employed whole week family load data from autumn to train the Stratified sampling and improved deep forest model. The proposed method was validated, and the experimental results are presented in Table 3.  
Table 3 presents the experimental results, indicating that the proposed deep forest classification model, incorporating stratified sampling, outperformed the deep forest model by 0.7% in terms of accuracy. The recognition accuracy of the deep forest model, when using stratified sampling and the improved deep forest model, increased by 0.3% and 0.5% respectively, compared to the deep forest model alone. These findings suggest that both stratified sampling and cascaded forests with replacement base learners can enhance the model's generalization ability.  
An example of the confusion matrix for the Irish dataset experiment is shown in Figure 6a. Nuclear families with two or three children are best identified, with the other categories and single children being the next best. The second, third and fourth categories are more easily confounded, and represent partial samples of nuclear families with similar electricity use patterns for single, two and three children. The first category is confounded to varying degrees with the other categories, and represents a more complex picture of  
Figure 5: Performance comparison of various algorithm.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Models** & **Acc (\%)** \\ \hline Random Forest & 88.9 \\ Deep Forest & 93.3 \\ Deep Forest Based On Stratified Sampling & 93.6 \\ Improved Deep Forest & 93.8 \\ Deep Forest Based On Improved Stratified Sampling & 94.0 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Optimization algorithm comparison experiment.  
the true electricity use of childless households. An example of the confusion matrix for the improved deep forest experiment based on stratified sampling is shown in Figure 6b, where the recognition of each class is improved and the overall confusion is similar to that in Figure 6a. Looking at the sample set composition shows that the two-adult childless households have the largest number of real samples, and the other households in the fifth category have more complex real samples. It can be seen that the true electricity use is more complex, with more households with children having similar electricity use profiles.  
In summary, both stratified sampling and cascade forests with additional base learners improve the generalization ability of the model. Customers with similar demographics have similar electricity usage patterns, and they are more complex with some of their usage patterns crossing and overlapping.  
The proposed nuclear family type identification method for residential electricity consumption based on a deep forest algorithm can have potential applications in improving lean management in power companies, as well as contributing to intelligent marketing schemes for different types of households. Recent developments in energy technology and battery estimation, such as the electrodeless nanogenerator for dust recovery ([PERSON] et al., 2022) and online estimation of SOH for lithium-ion battery based on SSA-Elman neural network, further highlight the importance of efficient and accurate energy consumption analysis and management in the current energy landscape [27,28]. The proposed nuclear family type identification method for residential electricity consumption based on a deep forest algorithm can contribute to improving energy management and enhancing the profitability of renewable energy sources.