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: ...@@ -80,7 +80,8 @@ class Visualizer:
x_cls1 = df[self.features[0]][self.df_cls1] x_cls1 = df[self.features[0]][self.df_cls1]
y_cls1 = df[self.features[1]][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]) 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], # custom_cls0 = np.dstack((self.target_train[self.df_cls0],
# self.target_predict[self.df_cls0]))[0] # self.target_predict[self.df_cls0]))[0]
# custom_cls1 = np.dstack((self.target_train[self.df_cls1], # custom_cls1 = np.dstack((self.target_train[self.df_cls1],
...@@ -122,25 +123,41 @@ class Visualizer: ...@@ -122,25 +123,41 @@ class Visualizer:
marker=dict(color=self.colors_cls1), marker=dict(color=self.colors_cls1),
) )
)) ))
self.fig.add_trace( try:
go.Scatter( hullx_cls0, hully_cls0, hullx_cls1, hully_cls1 = self.make_hull(self.features[0], self.features[1])
x=hullx_cls0,
y=hully_cls0, self.fig.add_trace(
line=dict(color='Grey', width=1, dash=self.line_styles[0]), go.Scatter(
name=r'Convex' + '<br>' + 'hull 0', x=hullx_cls0,
visible=False y=hully_cls0,
), line=dict(color='Grey', width=1, dash=self.line_styles[0]),
) name=r'Convex' + '<br>' + 'hull 0',
self.fig.add_trace( visible=False
go.Scatter( ),
x=hullx_cls1, )
y=hully_cls1, self.fig.add_trace(
line=dict(color='Grey', width=1, dash=self.line_styles[0]), go.Scatter(
name=r'Convex' + '<br>' + 'hull 1', x=hullx_cls1,
visible=False 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( self.fig.add_trace(
go.Scatter( go.Scatter(
x=line_x, 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