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
720e4ae1
Commit
720e4ae1
authored
May 22, 2024
by
Joaquin Torres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ready to re run everything
parent
1977e62f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
model_selection/hyperparam_tuning.py
model_selection/hyperparam_tuning.py
+12
-12
No files found.
model_selection/hyperparam_tuning.py
View file @
720e4ae1
...
@@ -72,22 +72,22 @@ if __name__ == "__main__":
...
@@ -72,22 +72,22 @@ if __name__ == "__main__":
# --------------------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------------
# 1. No class weight
# 1. No class weight
models_simple
=
{
"DT"
:
DecisionTreeClassifier
(),
models_simple
=
{
"DT"
:
DecisionTreeClassifier
(),
#
"RF" : RandomForestClassifier(),
"RF"
:
RandomForestClassifier
(),
#
"Bagging" : BaggingClassifier(),
"Bagging"
:
BaggingClassifier
(),
#
"AB" : AdaBoostClassifier(algorithm='SAMME'),
"AB"
:
AdaBoostClassifier
(
algorithm
=
'SAMME'
),
#
"XGB": XGBClassifier(),
"XGB"
:
XGBClassifier
(),
#
"LR" : LogisticRegression(max_iter=1000),
"LR"
:
LogisticRegression
(
max_iter
=
1000
),
#
"SVM" : SVC(probability=True, max_iter=1000),
"SVM"
:
SVC
(
probability
=
True
,
max_iter
=
1000
),
#
"MLP" : MLPClassifier(max_iter=500)
"MLP"
:
MLPClassifier
(
max_iter
=
500
)
}
}
# 2. Class weight: cost-sensitive learning
# 2. Class weight: cost-sensitive learning
models_CS
=
{
"DT"
:
DecisionTreeClassifier
(
class_weight
=
'balanced'
),
models_CS
=
{
"DT"
:
DecisionTreeClassifier
(
class_weight
=
'balanced'
),
#
"RF" : RandomForestClassifier(class_weight='balanced'),
"RF"
:
RandomForestClassifier
(
class_weight
=
'balanced'
),
#
"Bagging" : BaggingClassifier(estimator= DecisionTreeClassifier(class_weight='balanced')),
"Bagging"
:
BaggingClassifier
(
estimator
=
DecisionTreeClassifier
(
class_weight
=
'balanced'
)),
#
"AB" : AdaBoostClassifier(estimator= DecisionTreeClassifier(class_weight='balanced'), algorithm='SAMME'),
"AB"
:
AdaBoostClassifier
(
estimator
=
DecisionTreeClassifier
(
class_weight
=
'balanced'
),
algorithm
=
'SAMME'
),
#
"LR" : LogisticRegression(max_iter=1000, class_weight='balanced'),
"LR"
:
LogisticRegression
(
max_iter
=
1000
,
class_weight
=
'balanced'
),
# "SVM" : SVC(probability=True, max_iter = 1000, class_weight='balanced'),
"SVM"
:
SVC
(
probability
=
True
,
max_iter
=
1000
,
class_weight
=
'balanced'
)
}
}
# --------------------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------------
...
...
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