GithubHelp home page GithubHelp logo

Comments (7)

chao1224 avatar chao1224 commented on July 19, 2024

Hi @xuzhang5788 , the process_num in sklearn_randomforest.py specifies the hyparameter id, these lines is selecting the hyperparameter given the process id.

You can find all the possible hyperparameters for random forest in this json file, which includes 3*3*4*3 = 108 hyperparameters in all. In other words, process_num can range from 0 to 107.

from pria_lifechem.

xuzhang5788 avatar xuzhang5788 commented on July 19, 2024

Thank you for your fast response. I still didn't get it. Do I need to modify this comment to run?

python sklearn_randomforest.py --config_json_file=../../json/sklearn_randomforest.json --model_dir=$results_and_model_directory --dataset_dir=$path_to_dataset --process_num=$process --stage=0

from pria_lifechem.

chao1224 avatar chao1224 commented on July 19, 2024

Can you post the complete bash script? I'm not sure what's the "$process" here. (But if you set it from 0 to 107, it should work)

from pria_lifechem.

xuzhang5788 avatar xuzhang5788 commented on July 19, 2024

The bash script is from your readme file
https://github.com/gitter-lab/pria_lifechem/tree/master/pria_lifechem/models

from pria_lifechem.

chao1224 avatar chao1224 commented on July 19, 2024

You need to specify the variables in the bash env

export process=0
export path_to_dataset=/dir/to/the/dataset

python sklearn_randomforest.py \
--config_json_file=../../json/sklearn_randomforest.json \
--model_dir=$results_and_model_directory \
--dataset_dir=$path_to_dataset \
--process_num=$process \
--stage=1

from pria_lifechem.

Malnammi avatar Malnammi commented on July 19, 2024

Just to clarify. There are a total 108 hyperparameter combinations for the RandomForest in sklearn_randomforest.json. The script sklearn_randomforest.py , selects one of these using the process_num argument. So you need to set process_num to the hyperparameter index you want.

For example, one of the 8 RF hyperparameters that were promoted to the CV stage was index: 12. So, to run for index 12:

python sklearn_randomforest.py \
--config_json_file=../../json/sklearn_randomforest.json \
--model_dir=./folder_to_store_results/  \
--dataset_dir=./path_to_csv_files/ \
--process_num=12 \
--stage=1

Set model_dir to a folder path you'd like to store the results. Set dataset_dir to the folder path where the [file_0.csv, file_1.csv, ..., file_4.csv] data files are. Set stage to 0 for hyperparameter stage, to 1 for CV stage, and 2 for Prospective stage; the stage determines which test data to use for evaluation.

from pria_lifechem.

xuzhang5788 avatar xuzhang5788 commented on July 19, 2024

@chao1224 @Malnammi
Thank you so much.

from pria_lifechem.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.