Skip to content

JamiePlace/kaggle-child-mind-institute-detect-sleep-states

 
 

Repository files navigation

Child Mind Institute - Detect Sleep States

This repository is for Child Mind Institute - Detect Sleep States

Build Environment

1. install rye

install documentation

MacOS

curl -sSf https://rye-up.com/get | bash
echo 'source "$HOME/.rye/env"' >> ~/.zshrc
source ~/.zshrc

Linux

curl -sSf https://rye-up.com/get | bash
echo 'source "$HOME/.rye/env"' >> ~/.bashrc
source ~/.bashrc

Windows
see install documentation

2. Create virtual environment

rye sync

3. Activate virtual environment

. .venv/bin/activate

Set path

Rewrite run/conf/dir/local.yaml to match your environment

data_dir: 
processed_dir: 
output_dir: 
model_dir: 
sub_dir: ./

Prepare Data

1. Download data

cd data
kaggle competitions download -c child-mind-institute-detect-sleep-states
unzip child-mind-institute-detect-sleep-states.zip

2. Preprocess data

rye run python .\run\prepare_data.py -m phase=train,test dataset.window_size=100 dataset.batch_size=128

Train Model

The following commands are for training the model of LB0.714

rye run python run/train.py exp_name=exp001 dataset.batch_size=128 dataset.window_size=100

You can easily perform experiments by changing the parameters because hydra is used. The following commands perform experiments with downsample_rate of 2, 4, 6, and 8.

rye run python run/train.py dataset.batch_size=128 dataset.window_size=100

Upload Model

rye run python tools/upload_dataset.py

Inference

The following commands are for inference of LB0.714

rye run python run/inference.py dir=kaggle exp_name=exp001 phase=test dataset.batch_size=128 dataset.window_size=100

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 86.1%
  • Python 13.9%