Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
analytics-tetradymite-PRM2020.ipynb
Commits
991c797c
Commit
991c797c
authored
Sep 28, 2020
by
Luigi Sbailo
Browse files
First prototype of the notebook
parent
368e38ee
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
tetradymite_PRM2020.ipynb
View file @
991c797c
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
tetradymite_PRM2020/visualizer.py
View file @
991c797c
...
...
@@ -80,7 +80,8 @@ class Visualizer:
x_cls1
=
df
[
self
.
features
[
0
]][
self
.
df_cls1
]
y_cls1
=
df
[
self
.
features
[
1
]][
self
.
df_cls1
]
line_x
,
line_y
=
self
.
f_x
(
self
.
features
[
0
],
self
.
features
[
1
])
hullx_cls0
,
hully_cls0
,
hullx_cls1
,
hully_cls1
=
self
.
make_hull
(
self
.
features
[
0
],
self
.
features
[
1
])
# custom_cls0 = np.dstack((self.target_train[self.df_cls0],
# self.target_predict[self.df_cls0]))[0]
# custom_cls1 = np.dstack((self.target_train[self.df_cls1],
...
...
@@ -122,25 +123,41 @@ class Visualizer:
marker
=
dict
(
color
=
self
.
colors_cls1
),
)
))
self
.
fig
.
add_trace
(
go
.
Scatter
(
x
=
hullx_cls0
,
y
=
hully_cls0
,
line
=
dict
(
color
=
'Grey'
,
width
=
1
,
dash
=
self
.
line_styles
[
0
]),
name
=
r
'Convex'
+
'<br>'
+
'hull 0'
,
visible
=
False
),
)
self
.
fig
.
add_trace
(
go
.
Scatter
(
x
=
hullx_cls1
,
y
=
hully_cls1
,
line
=
dict
(
color
=
'Grey'
,
width
=
1
,
dash
=
self
.
line_styles
[
0
]),
name
=
r
'Convex'
+
'<br>'
+
'hull 1'
,
visible
=
False
),
try
:
hullx_cls0
,
hully_cls0
,
hullx_cls1
,
hully_cls1
=
self
.
make_hull
(
self
.
features
[
0
],
self
.
features
[
1
])
self
.
fig
.
add_trace
(
go
.
Scatter
(
x
=
hullx_cls0
,
y
=
hully_cls0
,
line
=
dict
(
color
=
'Grey'
,
width
=
1
,
dash
=
self
.
line_styles
[
0
]),
name
=
r
'Convex'
+
'<br>'
+
'hull 0'
,
visible
=
False
),
)
self
.
fig
.
add_trace
(
go
.
Scatter
(
x
=
hullx_cls1
,
y
=
hully_cls1
,
line
=
dict
(
color
=
'Grey'
,
width
=
1
,
dash
=
self
.
line_styles
[
0
]),
name
=
r
'Convex'
+
'<br>'
+
'hull 1'
,
visible
=
False
),
)
except
:
self
.
fig
.
add_trace
(
go
.
Scatter
(
visible
=
False
),
)
self
.
fig
.
add_trace
(
go
.
Scatter
(
visible
=
False
),
)
)
self
.
fig
.
add_trace
(
go
.
Scatter
(
x
=
line_x
,
...
...
Write
Preview
Supports
Markdown
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