Data Preprocess Tutorial
February 21, 2025 · View on GitHub
There is a detailed tutorial for preprocessing the raw data into processed data for BatteryLife project. Please follow the steps below carefully to process the raw data.
Step1: Prepare the preprocess scripts and install the BatteryML package
-
run the code to clone the BatteryML :
git clone https://github.com/microsoft/BatteryML.git -
Copy all files under
process_scriptsfromBatteryLifeto/BatteryML/batteryml/preprocess/folder fromBatteryMLand run the code below to install thebatteryml:pip install -r requirements.txt pip install .
Step2: Prepare the raw data file
-
Download raw datasets from Raw Data Acquisition of Data availability.
-
Create a folder named
./datasets/raw/under the root directory ofBatteryLiferepository and move all raw datasets under it. The final raw data preparation before preprocessing should be like this:/BatteryML-main/datasets/raw/ |──CALB |──CALCE |──HNEI |──HUST |──ISU_ILCC |──MATR |──MICH |──MICH_EXP |──NAion |──RWTH |──SNL |──Stanford |──Tongji |──UL_PUR |──XJTU |──ZNion
Step3: Run the command
-
Run the code:
python preprocess_scripts.py -
Finally, you can get the processed data under
./datasets/processed/folder.