Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
ClassifyStorms
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Leonie Pick
ClassifyStorms
Commits
4f833d33
Commit
4f833d33
authored
May 26, 2019
by
Leonie Pick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test sklearn-versions; Results in article correspond to version 0.20.3.
parent
466dc28d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
173 additions
and
496 deletions
+173
-496
.ipynb_checkpoints/ClassifyStorms-checkpoint.ipynb
.ipynb_checkpoints/ClassifyStorms-checkpoint.ipynb
+83
-224
ClassifyStorms.ipynb
ClassifyStorms.ipynb
+85
-267
Plots.py
Plots.py
+5
-5
No files found.
.ipynb_checkpoints/ClassifyStorms-checkpoint.ipynb
View file @
4f833d33
This diff is collapsed.
Click to expand it.
ClassifyStorms.ipynb
View file @
4f833d33
This diff is collapsed.
Click to expand it.
Plots.py
View file @
4f833d33
...
@@ -20,7 +20,7 @@ def Selection(Time,Date,HMC,Index_thres1,StormIndices,IndexMin,IndexMin1,IndexMi
...
@@ -20,7 +20,7 @@ def Selection(Time,Date,HMC,Index_thres1,StormIndices,IndexMin,IndexMin1,IndexMi
end
=
np
.
where
(
Time
[:,
4
]
==
ends
[
i
])[
0
][
0
]
end
=
np
.
where
(
Time
[:,
4
]
==
ends
[
i
])[
0
][
0
]
ax
[
i
].
plot
(
Time
[
start
:
end
,
4
],
HMC
[
start
:
end
],
color
=
'gray'
)
ax
[
i
].
plot
(
Time
[
start
:
end
,
4
],
HMC
[
start
:
end
],
color
=
'gray'
)
ax
[
i
].
plot
(
Time
[
start
:
end
,
4
],
Index_thres1
[
start
:
end
],
linestyle
=
'--'
,
color
=
'midnightblue'
,
label
=
r
'$Hl_t\in$ ['
+
str
(
np
.
around
(
max
(
Index_thres1
[
start
:
end
]),
2
))
+
' nT
,
'
+
str
(
np
.
around
(
min
(
Index_thres1
[
start
:
end
]),
2
))
+
' nT]'
)
ax
[
i
].
plot
(
Time
[
start
:
end
,
4
],
Index_thres1
[
start
:
end
],
linestyle
=
'--'
,
color
=
'midnightblue'
,
label
=
r
'$Hl_t\in$ ['
+
str
(
np
.
around
(
max
(
Index_thres1
[
start
:
end
]),
2
))
+
' nT
,
'
+
str
(
np
.
around
(
min
(
Index_thres1
[
start
:
end
]),
2
))
+
' nT]'
)
ax
[
i
].
scatter
(
Time
[
StormIndices
,
4
],
HMC
[
StormIndices
],
color
=
'midnightblue'
,
s
=
5
,
zorder
=
3
)
ax
[
i
].
scatter
(
Time
[
StormIndices
,
4
],
HMC
[
StormIndices
],
color
=
'midnightblue'
,
s
=
5
,
zorder
=
3
)
ax
[
i
].
set_xlim
([
Time
[
start
,
4
],
Time
[
end
,
4
]])
ax
[
i
].
set_xlim
([
Time
[
start
,
4
],
Time
[
end
,
4
]])
...
@@ -189,8 +189,8 @@ def IndexDist(Time,YearsIndex,Storms,Kp_all,KpHours_all,HMC,Save):
...
@@ -189,8 +189,8 @@ def IndexDist(Time,YearsIndex,Storms,Kp_all,KpHours_all,HMC,Save):
#ax3.yaxis.label.set_color('maroon')
#ax3.yaxis.label.set_color('maroon')
if
Save
==
True
:
if
Save
==
True
:
fig
.
savefig
(
'./Dump/Fig/development/
KpDist_te
st.pdf'
,
format
=
'pdf'
,
dpi
=
200
,
transparent
=
True
)
fig
.
savefig
(
'./Dump/Fig/development/
HMCDi
st.pdf'
,
format
=
'pdf'
,
dpi
=
200
,
transparent
=
True
)
fig
.
savefig
(
'./Dump/Fig/development/
KpDist_te
st.png'
,
format
=
'png'
,
dpi
=
200
,
transparent
=
True
)
fig
.
savefig
(
'./Dump/Fig/development/
HMCDi
st.png'
,
format
=
'png'
,
dpi
=
200
,
transparent
=
True
)
plt
.
show
()
plt
.
show
()
###
###
###
###
...
@@ -383,7 +383,7 @@ def CM(CM,Condition,n_classes,Save,SaveName):
...
@@ -383,7 +383,7 @@ def CM(CM,Condition,n_classes,Save,SaveName):
ax
.
grid
(
False
)
ax
.
grid
(
False
)
if
Save
==
True
:
if
Save
==
True
:
fig
.
savefig
(
'./Dump/Fig/development/Confusion_'
+
SaveName
+
'.pdf'
,
format
=
'pdf'
,
dpi
=
300
,
transparent
=
True
)
fig
.
savefig
(
'./Dump/Fig/development/Confusion
Row
_'
+
SaveName
+
'.pdf'
,
format
=
'pdf'
,
dpi
=
300
,
transparent
=
True
)
#fig.savefig('./Dump/Fig/ConfusionCol.png',format='png',dpi=300,transparent=True)
#fig.savefig('./Dump/Fig/ConfusionCol.png',format='png',dpi=300,transparent=True)
plt
.
show
()
plt
.
show
()
...
@@ -640,7 +640,7 @@ def Musical(Time,HTime,Storms,Kp_all,KpHours_all,SN,SNYears,HMC,HMC_filt,Referen
...
@@ -640,7 +640,7 @@ def Musical(Time,HTime,Storms,Kp_all,KpHours_all,SN,SNYears,HMC,HMC_filt,Referen
if
Save
==
True
:
if
Save
==
True
:
fig
.
savefig
(
'./Dump/Fig/development/StormsSetup.pdf'
,
format
=
'pdf'
,
dpi
=
200
)
#,transparent=True)
fig
.
savefig
(
'./Dump/Fig/development/StormsSetup.pdf'
,
format
=
'pdf'
,
dpi
=
200
)
#,transparent=True)
#
fig.savefig('./Dump/Fig/development/StormsSetup.png',format='png',dpi=200)#,transparent=True)
fig
.
savefig
(
'./Dump/Fig/development/StormsSetup.png'
,
format
=
'png'
,
dpi
=
200
)
#,transparent=True)
plt
.
show
()
plt
.
show
()
###
###
###
###
...
...
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