NILMTK installation tutorial under Windows

In the near future, it is necessary to perform load identification, find the NILMTK installation package, and record the process deliberately.

(1) Windows installation

Anaconda has been installed on this machine, the environment is Python3, and the project address of the NILMTK package is: https://github.com/nilmtk/nilm_metadata/ , first you need to install the git command to download git resources.

a, download nilmtk

git clone https://github.com/nilmtk/nilmtk.git

You will find the nilmtk folder in the directory, and there is a setup.py file

Switch to this directory, and then install, the command is:

pyhthon setup.py develop

The results of the implementation are:

b. Download nilmtk-metadata

git clone https://github.com/nilmtk/nilm_metadata/

You will find the nilmtk-metadata folder in the directory, and there is a setup.py file

Switch to this directory, and then install, the command is:

pyhthon setup.py develop

Results of the:

 

c. Test results

1) Output pip list test

2) nosetests

NB: 1. If you only install nilm-metadata, you can also test with nosetests, but you can't test with python statements, you need to install both packages!

(2) REDD data set format conversion

REDD is short for The Reference Energy Disaggregation Data Set (The Reference Energy Disaggregation Data Set). The Massachusetts Institute of Technology (MIT) has released a REDD data set that contains energy consumption data of 6 different households within a few weeks, as well as high-frequency current/voltage data of the main energy-consuming equipment in 2 households.

nilmat is a file that supports H5 format, and the downloaded data set needs to be formatted.

from nilmtk.dataset_converters import convert_redd

convert_redd(r'C:\Users\admin\Anaconda3\nilm_metadata\low_freq',r'C:\Users\admin\Anaconda3\nilm_metadata\low_freq\redd_low_new.h5')

Results of the:

After installation, nilmtk prompts that dataset_converters does not exist, and then I found in the folder that there are corresponding py files under ./nilmtk/nilmtk. Therefore, I can change from nilmtk.dataset_converters import convert_redd to from nilmtk.nilmtk.dataset_converters import convert_redd, which is The files of this corresponding package also need to be changed.

When reading data, the function reported an error, and then it was configured and executed in the PyCharm environment! You can refer to the blog: https://blog.csdn.net/wwb1990/article/details/103905371

Data set download:

uk-dale:https://data.ukedc.rl.ac.uk/browse/edc/efficiency/residential/EnergyConsumption/Domestic

Guess you like

Origin blog.csdn.net/qq_28409193/article/details/109445799