Commit 34070d2c authored by Charly Lamothe's avatar Charly Lamothe
Browse files

Update hardcoded value in random strategy fix. Update scripts and experiments files

parent 6483c0dc
...@@ -84,7 +84,7 @@ class Trainer(object): ...@@ -84,7 +84,7 @@ class Trainer(object):
self._begin_time = time.time() self._begin_time = time.time()
if type(model) in [RandomForestRegressor, RandomForestClassifier]: if type(model) in [RandomForestRegressor, RandomForestClassifier]:
if extracted_forest_size is not None: if extracted_forest_size is not None:
estimators_index = np.arange(1000) estimators_index = np.arange(len(model.estimators_))
np.random.shuffle(estimators_index) np.random.shuffle(estimators_index)
choosen_estimators = estimators_index[:extracted_forest_size] choosen_estimators = estimators_index[:extracted_forest_size]
model.estimators_ = np.array(model.estimators_)[choosen_estimators] model.estimators_ = np.array(model.estimators_)[choosen_estimators]
......
...@@ -6,15 +6,18 @@ ...@@ -6,15 +6,18 @@
"normalize_D": false, "normalize_D": false,
"dataset_normalizer": "standard", "dataset_normalizer": "standard",
"forest_size": null, "forest_size": null,
"extracted_forest_size_samples": 10, "extracted_forest_size_samples": 30,
"extracted_forest_size_stop": 0.4, "extracted_forest_size_stop": 1.0,
"models_dir": "models/boston/stage1", "models_dir": "models/boston/stage1",
"dev_size": 0.2, "dev_size": 0.2,
"test_size": 0.2, "test_size": 0.2,
"random_seed_number": 1, "random_seed_number": 1,
"seeds": [ "seeds": [
2078, 1,
90 2,
3,
4,
5
], ],
"subsets_used": "train,dev", "subsets_used": "train,dev",
"normalize_weights": false, "normalize_weights": false,
...@@ -26,16 +29,37 @@ ...@@ -26,16 +29,37 @@
], ],
"job_number": -1, "job_number": -1,
"extraction_strategy": "none", "extraction_strategy": "none",
"overwrite": false,
"extracted_forest_size": [ "extracted_forest_size": [
36, 33,
73, 67,
109, 100,
145, 133,
182, 167,
218, 200,
255, 233,
291, 267,
327, 300,
364 333,
367,
400,
433,
467,
500,
533,
567,
600,
633,
667,
700,
733,
767,
800,
833,
867,
900,
933,
967,
1000
] ]
} }
\ No newline at end of file
{
"experiment_id": 4,
"experiment_configuration": null,
"experiment_configuration_path": "experiments",
"dataset_name": "boston",
"normalize_D": false,
"dataset_normalizer": "standard",
"forest_size": null,
"extracted_forest_size_samples": 30,
"extracted_forest_size_stop": 1.0,
"models_dir": "models/boston/stage1",
"dev_size": 0.2,
"test_size": 0.2,
"random_seed_number": 1,
"seeds": [
1,
2,
3,
4,
5
],
"subsets_used": "train,dev",
"normalize_weights": false,
"verbose": false,
"skip_best_hyperparams": true,
"save_experiment_configuration": [
"1",
"none_wo_params"
],
"job_number": -1,
"extraction_strategy": "none",
"overwrite": false,
"extracted_forest_size": [
33,
67,
100,
133,
167,
200,
233,
267,
300,
333,
367,
400,
433,
467,
500,
533,
567,
600,
633,
667,
700,
733,
767,
800,
833,
867,
900,
933,
967,
1000
]
}
\ No newline at end of file
{
"experiment_id": 3,
"experiment_configuration": null,
"experiment_configuration_path": "experiments",
"dataset_name": "boston",
"normalize_D": false,
"dataset_normalizer": "standard",
"forest_size": null,
"extracted_forest_size_samples": 30,
"extracted_forest_size_stop": 1.0,
"models_dir": "models/boston/stage1",
"dev_size": 0.2,
"test_size": 0.2,
"random_seed_number": 1,
"seeds": [
1,
2,
3,
4,
5
],
"subsets_used": "train,dev",
"normalize_weights": false,
"verbose": false,
"skip_best_hyperparams": false,
"save_experiment_configuration": [
"1",
"omp_with_params"
],
"job_number": -1,
"extraction_strategy": "omp",
"overwrite": false,
"extracted_forest_size": [
33,
67,
100,
133,
167,
200,
233,
267,
300,
333,
367,
400,
433,
467,
500,
533,
567,
600,
633,
667,
700,
733,
767,
800,
833,
867,
900,
933,
967,
1000
]
}
\ No newline at end of file
{
"experiment_id": 6,
"experiment_configuration": null,
"experiment_configuration_path": "experiments",
"dataset_name": "boston",
"normalize_D": false,
"dataset_normalizer": "standard",
"forest_size": null,
"extracted_forest_size_samples": 30,
"extracted_forest_size_stop": 1.0,
"models_dir": "models/boston/stage1",
"dev_size": 0.2,
"test_size": 0.2,
"random_seed_number": 1,
"seeds": [
1,
2,
3,
4,
5
],
"subsets_used": "train,dev",
"normalize_weights": false,
"verbose": false,
"skip_best_hyperparams": true,
"save_experiment_configuration": [
"1",
"omp_wo_params"
],
"job_number": -1,
"extraction_strategy": "omp",
"overwrite": false,
"extracted_forest_size": [
33,
67,
100,
133,
167,
200,
233,
267,
300,
333,
367,
400,
433,
467,
500,
533,
567,
600,
633,
667,
700,
733,
767,
800,
833,
867,
900,
933,
967,
1000
]
}
\ No newline at end of file
{
"experiment_id": 2,
"experiment_configuration": null,
"experiment_configuration_path": "experiments",
"dataset_name": "boston",
"normalize_D": false,
"dataset_normalizer": "standard",
"forest_size": null,
"extracted_forest_size_samples": 30,
"extracted_forest_size_stop": 1.0,
"models_dir": "models/boston/stage1",
"dev_size": 0.2,
"test_size": 0.2,
"random_seed_number": 1,
"seeds": [
1,
2,
3,
4,
5
],
"subsets_used": "train,dev",
"normalize_weights": false,
"verbose": false,
"skip_best_hyperparams": false,
"save_experiment_configuration": [
"1",
"random_with_params"
],
"job_number": -1,
"extraction_strategy": "random",
"overwrite": false,
"extracted_forest_size": [
33,
67,
100,
133,
167,
200,
233,
267,
300,
333,
367,
400,
433,
467,
500,
533,
567,
600,
633,
667,
700,
733,
767,
800,
833,
867,
900,
933,
967,
1000
]
}
\ No newline at end of file
{
"experiment_id": 5,
"experiment_configuration": null,
"experiment_configuration_path": "experiments",
"dataset_name": "boston",
"normalize_D": false,
"dataset_normalizer": "standard",
"forest_size": null,
"extracted_forest_size_samples": 30,
"extracted_forest_size_stop": 1.0,
"models_dir": "models/boston/stage1",
"dev_size": 0.2,
"test_size": 0.2,
"random_seed_number": 1,
"seeds": [
1,
2,
3,
4,
5
],
"subsets_used": "train,dev",
"normalize_weights": false,
"verbose": false,
"skip_best_hyperparams": true,
"save_experiment_configuration": [
"1",
"random_wo_params"
],
"job_number": -1,
"extraction_strategy": "random",
"overwrite": false,
"extracted_forest_size": [
33,
67,
100,
133,
167,
200,
233,
267,
300,
333,
367,
400,
433,
467,
500,
533,
567,
600,
633,
667,
700,
733,
767,
800,
833,
867,
900,
933,
967,
1000
]
}
\ No newline at end of file
{
"experiment_id": 1,
"experiment_configuration": null,
"experiment_configuration_path": "experiments",
"dataset_name": "breast_cancer",
"normalize_D": false,
"dataset_normalizer": "standard",
"forest_size": null,
"extracted_forest_size_samples": 30,
"extracted_forest_size_stop": 1.0,
"models_dir": "models/breast_cancer/stage1",
"dev_size": 0.2,
"test_size": 0.2,
"random_seed_number": 1,
"seeds": [
1,
2,
3,
4,
5
],
"subsets_used": "train,dev",
"normalize_weights": false,
"verbose": false,
"skip_best_hyperparams": false,
"save_experiment_configuration": [
"1",
"none_with_params"
],
"job_number": -1,
"extraction_strategy": "none",
"overwrite": false,
"extracted_forest_size": [
33,
67,
100,
133,
167,
200,
233,
267,
300,
333,
367,
400,
433,
467,
500,
533,
567,
600,
633,
667,
700,
733,
767,
800,
833,
867,
900,
933,
967,
1000
]
}
\ No newline at end of file
{
"experiment_id": 4,
"experiment_configuration": null,
"experiment_configuration_path": "experiments",
"dataset_name": "breast_cancer",
"normalize_D": false,
"dataset_normalizer": "standard",
"forest_size": null,
"extracted_forest_size_samples": 30,
"extracted_forest_size_stop": 1.0,
"models_dir": "models/breast_cancer/stage1",
"dev_size": 0.2,
"test_size": 0.2,
"random_seed_number": 1,
"seeds": [
1,
2,
3,
4,
5
],
"subsets_used": "train,dev",
"normalize_weights": false,
"verbose": false,
"skip_best_hyperparams": true,
"save_experiment_configuration": [
"1",
"none_wo_params"
],
"job_number": -1,
"extraction_strategy": "none",
"overwrite": false,
"extracted_forest_size": [
33,
67,
100,
133,
167,
200,
233,
267,
300,
333,
367,
400,
433,
467,
500,
533,
567,
600,
633,
667,
700,
733,
767,
800,
833,
867,
900,
933,
967,
1000
]
}
\ No newline at end of file
{
"experiment_id": 3,
"experiment_configuration": null,
"experiment_configuration_path": "experiments",
"dataset_name": "breast_cancer",
"normalize_D": false,
"dataset_normalizer": "standard",
"forest_size": null,
"extracted_forest_size_samples": 30,
"extracted_forest_size_stop": 1.0,
"models_dir": "models/breast_cancer/stage1",
"dev_size": 0.2,
"test_size": 0.2,
"random_seed_number": 1,
"seeds": [
1,
2,
3,
4,
5
],
"subsets_used": "train,dev",
"normalize_weights": false,
"verbose": false,
"skip_best_hyperparams": false,
"save_experiment_configuration": [
"1",
"omp_with_params"
],
"job_number": -1,
"extraction_strategy": "omp",
"overwrite": false,
"extracted_forest_size": [
33,
67,
100,
133,
167,
200,
233,
267,
300,