forked from udacity/nd0821-c3-starter-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
73 lines (73 loc) · 1.81 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
data_path: "./data/census.csv"
test_size: 0.2
random_seed: 42
target: "salary"
features:
numerical:
- "age"
- "fnlgt"
- "education_num"
- "capital_gain"
- "capital_loss"
- "hours_per_week"
categorical:
- "workclass"
- "education"
- "marital_status"
- "occupation"
- "relationship"
- "race"
- "sex"
- "native_country"
random_forest_parameters:
# This section is passed to the random forest model
# as a dictionary of parameters, thus names must match with
# the sklearn API.
# Whenever we have model or other object with many parameters
# we should write config files for them.
# That is easier than passing parameters in the code or via CLI
# and we can guarantee compatibility in the code in case the model API changes
# (i.e., we would simply change the config file).
# NOTE: These default parameters can be overwritten
# by the hyperparameter tuning
n_estimators: 100
criterion: 'gini'
max_depth: 13
min_samples_split: 2
min_samples_leaf: 1
min_weight_fraction_leaf: 0.0
max_features: 'auto'
max_leaf_nodes: null
min_impurity_decrease: 0.0
bootstrap: true
oob_score: false
n_jobs: null
random_state: 42
verbose: 0
warm_start: false
class_weight: "balanced"
ccp_alpha: 0.0
max_samples: null
random_forest_grid_search:
hyperparameters:
n_estimators:
- 100
- 150
- 200
max_features:
- "sqrt"
- "log2"
criterion:
- "gini"
- "entropy"
max_depth:
- 5
- 10
- 15
cv: 3
scoring: 'f1'
slicing_min_data_points: 5
model_artifact: "./exported_artifacts/model.pickle"
processing_artifact: "./exported_artifacts/processing_parameters.pickle"
evaluation_artifact: "./exported_artifacts/evaluation_report.txt"
slicing_artifact: "./exported_artifacts/slice_output.txt"