pyrcc
pyrcc copied to clipboard
Can't reproduce the result of circle dataset with rcc
in the README.md,I see
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
