Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tom Rink
python
Commits
d54e5339
Commit
d54e5339
authored
10 months ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
cdad9919
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/machine_learning/classification.py
+8
-0
8 additions, 0 deletions
modules/machine_learning/classification.py
with
8 additions
and
0 deletions
modules/machine_learning/classification.py
+
8
−
0
View file @
d54e5339
...
@@ -15,6 +15,12 @@ import sklearn.tree as tree
...
@@ -15,6 +15,12 @@ import sklearn.tree as tree
from
sklearn.tree
import
export_graphviz
from
sklearn.tree
import
export_graphviz
# def analyze(dataFrame):
# no_icing_df = dataFrame[dataFrame['icing_intensity'] == -1]
# icing_df = dataFrame[dataFrame['icing_intensity'] >= 1]
# return no_icing_df, icing_df
def
plot_confusion_matrix
(
cm
,
classes
,
def
plot_confusion_matrix
(
cm
,
classes
,
normalize
=
False
,
normalize
=
False
,
title
=
'
Confusion matrix
'
,
title
=
'
Confusion matrix
'
,
...
@@ -80,6 +86,8 @@ def get_feature_target_data(data_frame, standardize=True):
...
@@ -80,6 +86,8 @@ def get_feature_target_data(data_frame, standardize=True):
'
cld_opd_dcomp
'
,
'
iwc_dcomp
'
]
'
cld_opd_dcomp
'
,
'
iwc_dcomp
'
]
# Remove this column
# Remove this column
icing_df
=
icing_df
.
drop
(
'
lwc_dcomp
'
,
axis
=
1
)
icing_df
=
icing_df
.
drop
(
'
lwc_dcomp
'
,
axis
=
1
)
# Remove this column
icing_df
=
icing_df
.
drop
(
'
cld_geo_thick
'
,
axis
=
1
)
# Remove rows with NaN values
# Remove rows with NaN values
# icing_df = icing_df.dropna()
# icing_df = icing_df.dropna()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment