pyrcc icon indicating copy to clipboard operation
pyrcc copied to clipboard

Can't reproduce the result of circle dataset with rcc

Open yuxiaokang-source opened this issue 4 years ago • 0 comments

in the README.md,I see image I found I get many cluster(>300) with you code. How to adjust the result? my test code is below

import matplotlib.pyplot as plt
import numpy as np
from sklearn.datasets import make_circles
from sklearn.preprocessing import StandardScaler
import pyrcc
from sklearn.metrics import adjusted_mutual_info_score
n_samples = 1500
noisy_circles =make_circles(n_samples=n_samples, factor=.5,noise=.05)

X = noisy_circles[0]
#X = StandardScaler().fit_transform(X)
Y = noisy_circles[1]

clusterer = pyrcc.RccCluster(measure='cosine')

P = clusterer.fit(X)
print('AMI: {}'.format(adjusted_mutual_info_score(Y, P)))
print(np.unique(P))

the result is below image

yuxiaokang-source avatar Apr 21 '21 16:04 yuxiaokang-source