当前位置:网站首页>[nilm] non intrusive load decomposition module nilmtk installation tutorial
[nilm] non intrusive load decomposition module nilmtk installation tutorial
2022-06-24 07:58:00 【Prodigal son loves freedom】
This tutorial focuses on Anaconda Of Python Installation in the environment nilmtk modular , Therefore, it is recommended to install nilmtk Install the module before Anaconda Software , The download link can be found in Download link . install nilmtk Modules are recommended in anconda Create in a virtual environment , So we need to use Conda Command to create a virtual environment , Download again nitmtk modular , install nilmtk modular .
1 conda Command to create a virtual environment
1.1 conda Tutorial on the use of commands
- Get version number
conda --version/conda -V
- get help
conda --help
conda -h
# View help for a command , Such as update Orders and remove command
conda update --help
conda remove --help
# Empathy , Of the above commands --help It can also be replaced by -h.- Environmental management
# View all command help for Environment Management
conda env -h
# establish python A virtual environment
conda create --name your_env_name #( Here you can rewrite the name of your virtual environment )Input y Confirm creation .
- Create formulation python Version environment
# Create formulation python Version environment
conda create --name your_env_name python=2.7
conda create --name your_env_name python=3
conda create --name your_env_name python=3.5
# Create environments that contain certain packages
conda create --name your_env_name numpy scipy
# List all current environments
conda info --envs
conda env list
# Enter an environment
conda activate your_env_name# This is recommended
activate your_env_name
# Exit the current environment
conda deactivate
# Copy an environment
conda create --name new_env_name --clone old_env_name
# Delete an environment
conda remove --name your_env_name --all
# From yml File creation environment
conda env create -f environment.yml
# List all packages in the currently active environment
conda list
# List all packages in a given environment
conda list -n your_env_name2 install nilmtk modular
2.1 download nilmtk modular
from github Download directly from nilmtk Module installation package , Download link https://github.com/nilmtk/nilmtk . Unzip the file
2.2 open Anaconda Prompt
Switch the current path to nilmtk In the decompression path , The switching command adopts cd Command switching , Before switching paths, you need to switch to the disk where the pressurized folder is located , Then switch to the specific path (C If you use a disc, you can use it directly cd Switch ). for example ‘E:\ experiment \ modular \nilmtk’ In the path , I'm going to switch to E disc , Switch to ‘E:\ experiment \ modular \nilmtk’ in . The order is as follows :
# Switch to E disc
E:
# Switch to specific path
cd E:\ experiment \ modular \nilmtk

2.3 structure Nilmtk Virtual environment for
This step mainly builds nilmtk Virtual environment for nilmtk-env, If it has been established in other ways nilmtk-env, You need to delete the directory first , Otherwise, the operation fails , The first part of the deletion method has already introduced . The create command is as follows :
conda env create -f environment.yml2.4 Switch to nilmtk Virtual environment for nilmtk-env
Build complete specifically for nilm Module installation python Environmental Science , Need to switch to nilm-env Environment , To use the installed nilmtk modular ,anaconda The modules of the module must be in nilmtk-env The environment exists , Need to switch to nilmtk-env in , use pip install XXX Command to install . Specific commands
conda activate nilmtk-env
# perhaps
activate nilmtk-env
# Out of the environment
conda deactivate

2.5 install nilmtk modular
Switch to nillmtk-env After the virtual environment, enter the corresponding command to install nilmtk modular , In this way, you can also nilmk-metadata Install well .
python setup.py developAfter running the command , Will run for a while , Wait for the run to finish , If no error is reported during the operation, it will be ok,
After running, use the following two commands to test .
conda list
nosetests
If conda list The above modules are displayed , Indicates successful installation .
You can test it with the following code ,low_freq Express redd The original path of the dataset , among REDD Dataset address :http://redd.csail.mit.edu/, user name : redd ; password : disaggregatetheenergy
from nilmtk.dataset_converters import convert_redd
convert_redd(r'D:\MyProject\NILMTK\low_freq',r'D:\MyProject\NILMTK\low_freq\redd.h5')If the operation is successful, the installation is successful .
3 install Spyder Editor
anaconda Bring one with you. spyder Editor , To write python The program is very convenient , however nilmtk-env The module does not spyder Tools , In order to write nilmtk Related codes , Run the load decomposition program , Need to be in nilmtk-env Environmental installation spyder. Use command :
conda install spyderCan pass conda list Or view the folder directory in the start menu bar . The effect is shown below .

4 install nilmtk-contrib modular
This module contains the use of NILMTK A quick experiment of API All state-of-the-art algorithms for the energy decomposition task implemented . The installation method is the same as nilmtk The modules are the same , To download nilmtk-contrib Module installation package , Then unzip the installation package , stay nilmtk-env Switch to nilmtk-contrib Folder , function python setup.py develop, And then run conda list Check whether the installation is successful .
nilmtk-contrib Installation package download path :https://github.com/nilmtk/nilmtk-contrib
5 Installation package download
If github Unable to access download , You can go to the following link to download nilmtk and nilmtk-contrib Etc .
https://download.csdn.net/download/weixin_56516468/85698419
【 Reference material 】
1.https://blog.csdn.net/wangwy_hoveringeagle/article/details/121177790
2.https://blog.csdn.net/wangwy_hoveringeagle/article/details/121143285
边栏推荐
- What challenges does the video streaming media platform face in transmitting HD video?
- Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its
- Svn actual measurement common operation record operation
- 自动化测试的生命周期是什么?
- Chapter 3: drawing triangles
- Introduction of model compression tool based on distiller
- 毕业两年月薪36k,说难也不难吧
- [special session] SME growth plan - ECS special session
- Hongmeng development IV
- Backup and restore SQL Server Databases locally
猜你喜欢

Exness: Powell insisted on his anti inflation commitment and pointed out that recession is possible

Vulnhub靶机:BOREDHACKERBLOG: SOCIAL NETWORK

GPU is not used when the code is running

5-if语句(选择结构)

Live wire, neutral wire and ground wire. Do you know the function of these three wires?

Vulnhub靶机:BOREDHACKERBLOG_ CLOUD AV

SVN实测常用操作-记录操作大全

鸿蒙os开发三

uniapp uni-app H5 端如何取消 返回按钮的显示 autoBackButton不生效

Moonwell Artemis is now online moonbeam network
随机推荐
Timer usage notes
Tuple remarks
duilib 显示内存图片
Chapitre 2: dessiner une fenêtre
Experience of Shenzhou computer
First acquaintance with JUC - day01
exness:鲍威尔坚持抗通胀承诺,指出衰退是可能的
Cold thinking on the hot track: multiplier effect is the fundamental requirement of East West calculation
L1-019 谁先倒 (15 分)
第 2 篇:绘制一个窗口
火线,零线,地线,你知道这三根线的作用是什么吗?
[test development] first knowledge of software testing
Latest news of awtk: new usage of grid control
js实现查看一个数组对象中是否包含另一个数组对象中的值
面试中的最常被问到的两种锁
any类备注
IndexError: Target 7 is out of bounds.
云开发谁是卧底小程序源码
Backup and restore SQL Server Databases locally
redolog和binlog