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
620b8a59
Commit
620b8a59
authored
May 22, 2024
by
Joaquin Torres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected hyperparam_tuning metric computation
parent
5b97dbfb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
model_selection/hyperparam_tuning.py
model_selection/hyperparam_tuning.py
+9
-9
No files found.
model_selection/hyperparam_tuning.py
View file @
620b8a59
...
@@ -73,13 +73,13 @@ if __name__ == "__main__":
...
@@ -73,13 +73,13 @@ 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
)
# "ElNet" : LogisticRegression(max_iter=1000, penalty='elasticnet')
# "ElNet" : LogisticRegression(max_iter=1000, penalty='elasticnet')
}
}
...
@@ -141,8 +141,8 @@ if __name__ == "__main__":
...
@@ -141,8 +141,8 @@ if __name__ == "__main__":
# --------------------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------------
# Store each df as a sheet in an excel file
# Store each df as a sheet in an excel file
sheets_dict
=
{}
sheets_dict
=
{}
for
i
,
group
in
enumerate
([
'pre'
]):
#['pre', 'post']
for
i
,
group
in
enumerate
([
'pre'
,
'post'
]):
for
j
,
method
in
enumerate
([
'
under_'
]):
#['', '', 'over_', 'under_']
for
j
,
method
in
enumerate
([
'
'
,
''
,
'over_'
,
'under_'
]):
# Get dataset based on group and method
# Get dataset based on group and method
X
=
data_dic
[
'X_train_'
+
method
+
group
]
X
=
data_dic
[
'X_train_'
+
method
+
group
]
y
=
data_dic
[
'y_train_'
+
method
+
group
]
y
=
data_dic
[
'y_train_'
+
method
+
group
]
...
...
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