Commit 991c797c authored by Luigi Sbailo's avatar Luigi Sbailo
Browse files

First prototype of the notebook

parent 368e38ee
This diff is collapsed.
This diff is collapsed.
......@@ -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,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment