Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
C
covid_analysis
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
COMPARA
covid_analysis
Commits
af398543
Commit
af398543
authored
May 10, 2024
by
Joaquin Torres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style fix
parent
cbf63f20
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
model_selection/test_models.py
model_selection/test_models.py
+7
-6
No files found.
model_selection/test_models.py
View file @
af398543
...
...
@@ -55,13 +55,14 @@ def get_tuned_models(group_id, method_id):
# 1.2) Trained with original dataset and cost-sensitive learning
elif
method_id
==
1
:
tuned_models
=
{
"DT"
:
DecisionTreeClassifier
(
**
{
'splitter'
:
'best'
,
'max_features'
:
'log2'
,
'criterion'
:
'log_loss'
,
'class_weight'
:
'balanced'
}),
"RF"
:
RandomForestClassifier
(
**
{
'criterion'
:
'entropy'
,
'max_features'
:
'sqrt'
,
'n_estimators'
:
118
,
'class_weight'
:
'balanced'
}),
"Bagging"
:
BaggingClassifier
(
**
{
'max_features'
:
1.0
,
'max_samples'
:
1.0
,
'n_estimators'
:
15
,
'warm_start'
:
False
},
estimator
=
DecisionTreeClassifier
(
class_weight
=
'balanced'
)
),
"AB"
:
AdaBoostClassifier
(
**
{
'learning_rate'
:
0.8159074545140872
,
'n_estimators'
:
121
},
estimator
=
DecisionTreeClassifier
(
class_weight
=
'balanced'
),
algorithm
=
'SAMME'
),
"LR"
:
LogisticRegression
(
**
{
'solver'
:
'lbfgs'
,
'penalty'
:
None
},
max_iter
=
1000
,
class_weight
=
'balanced'
),
"SVM"
:
SVC
(
**
{
'C'
:
1.5550524351360953
,
'kernel'
:
'linear'
},
max_iter
=
1000
,
class_weight
=
'balanced'
),
"DT"
:
DecisionTreeClassifier
(
**
{
'splitter'
:
'best'
,
'max_features'
:
'log2'
,
'criterion'
:
'entropy'
,
'class_weight'
:
'balanced'
}),
"RF"
:
RandomForestClassifier
(
**
{
'criterion'
:
'entropy'
,
'max_features'
:
'sqrt'
,
'n_estimators'
:
118
,
'class_weight'
:
'balanced'
}),
"Bagging"
:
BaggingClassifier
(
**
{
'max_features'
:
1.0
,
'max_samples'
:
1.0
,
'n_estimators'
:
15
,
'warm_start'
:
False
,
'estimator'
:
DecisionTreeClassifier
(
class_weight
=
'balanced'
)}
),
"AB"
:
AdaBoostClassifier
(
**
{
'learning_rate'
:
0.8159074545140872
,
'n_estimators'
:
121
,
'algorithm'
:
'SAMME'
,
'estimator'
:
DecisionTreeClassifier
(
class_weight
=
'balanced'
)}),
"LR"
:
LogisticRegression
(
**
{
'solver'
:
'lbfgs'
,
'penalty'
:
'none'
,
'max_iter'
:
1000
,
'class_weight'
:
'balanced'
}),
"SVM"
:
SVC
(
**
{
'C'
:
1.5550524351360953
,
'kernel'
:
'linear'
,
'max_iter'
:
1000
,
'class_weight'
:
'balanced'
}),
}
# 1.3) Trained with oversampled training dataset
elif
method_id
==
2
:
tuned_models
=
{
...
...
Write
Preview
Markdown
is supported
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