Spaces:
Build error
Build error
added som plots revisions
Browse files- funcs/som.py +1 -4
funcs/som.py
CHANGED
@@ -223,10 +223,7 @@ class ClusterSOM:
|
|
223 |
if len(self.som_models) == 0:
|
224 |
raise ValueError("SOM models not trained yet.")
|
225 |
|
226 |
-
|
227 |
-
prediction = self.predict([data[int(slice_select)-1]])[0]
|
228 |
-
except:
|
229 |
-
prediction = self.predict([data[int(slice_select)-2]])[0]
|
230 |
|
231 |
fig, axes = plt.subplots(1, len(self.som_models), figsize=(20, 5), sharex=True, sharey=True)
|
232 |
fig.suptitle(f"Activation map for A {prediction[0]}, node {prediction[1]}", fontsize=16)
|
|
|
223 |
if len(self.som_models) == 0:
|
224 |
raise ValueError("SOM models not trained yet.")
|
225 |
|
226 |
+
prediction = self.predict([data[int(slice_select)-1]])[0]
|
|
|
|
|
|
|
227 |
|
228 |
fig, axes = plt.subplots(1, len(self.som_models), figsize=(20, 5), sharex=True, sharey=True)
|
229 |
fig.suptitle(f"Activation map for A {prediction[0]}, node {prediction[1]}", fontsize=16)
|