Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Noric Couderc
JBrainy
Commits
a4863ab9
Commit
a4863ab9
authored
Nov 15, 2021
by
Noric Couderc
Browse files
Switch to ANN for classification
Brainy uses ANNs, so we should too. Note: Random Forest yield better results.
parent
df35bd24
Changes
1
Hide whitespace changes
Inline
Side-by-side
train_model.py
View file @
a4863ab9
...
...
@@ -602,11 +602,12 @@ if __name__ == "__main__":
classifier_creators
=
{
"RandomForest"
:
lambda
:
RandomForestClassifier
(),
"LDA"
:
lambda
:
LinearDiscriminantAnalysis
(
n_components
=
2
),
"ANN"
:
lambda
:
MLPClassifier
(
solver
=
'lbfgs'
,
alpha
=
1e-5
,
hidden_layer_sizes
=
(
5
,
5
),
"ANN"
:
lambda
:
MLPClassifier
(
solver
=
'lbfgs'
,
alpha
=
1e-5
,
max_iter
=
1000
,
hidden_layer_sizes
=
(
5
,
5
),
random_state
=
1
)
}
classifiers
=
train_classifiers
(
training_data
[
"data"
],
classifier_creators
[
"
RandomForest
"
],
classifier_creators
[
"
ANN
"
],
"Best datastructure"
,
training_data
[
"software_selected_columns"
]
+
training_data
[
"hardware_selected_columns"
],
"Param: datastructureName"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment