You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am sure you will solve this issue..
I am sendng you relevant part of code here
graph = mapper.map(projected_data,X,nr_cubes=14,overlap_perc=0.8,clusterer=sklearn.cluster.DBSCAN(eps=15, min_samples=4))
model = ensemble.IsolationForest(random_state=1729)
model.fit(X)
usecolor = model.decision_function(X).reshape((X.shape[0], 1))
node=graph['nodes'].values()
cluster= list(node)
# My own Function..I am trying to color each node by avg anomaly score of the data points in that node
z=[]
for i in range(0,len(cluster)):
z.append(np.round(np.mean(usecolor[cluster[i]])*10,decimals=4,out=None))
print(z)
s=np.asarray(z)
s
The color_function is must have the same number of entries as data points. So for you dataset with 150 observations, you would need it length 150, with each entry associated to each observation. The visualize method will then take the average of these values for you.
Hi @ dev
I am sure you will solve this issue..
I am sendng you relevant part of code here
I am getting following output
Now I go to next part of code
But I am getting error
The text was updated successfully, but these errors were encountered: