Я пытаюсь приспособить иерархическую кластеризацию к 23-мерному набору данных из 100 000 объектов.Как решить следующую ошибку?
>>>ac = AgglomerativeClustering(n_clusters=2, affinity='euclidean', linkage='complete')
>>>k=hf.features_itter(hf.file)
>>>k
array([[49, 0, 3, ..., 0, 0, 3],
[39, 1, 4, ..., 0, 0, 3],
[25, 0, 3, ..., 0, 0, 1],
...,
[21, 0, 6, ..., 0, 0, 1],
[47, 0, 8, ..., 0, 0, 2],
[28, 1, 2, ..., 0, 1, 3]], dtype=uint8)
>>>res = ac.fit_predict(k)
Traceback (most recent call last):
File "<pyshell#18>", line 1, in <module>
hierarchical()
File "C:\Users\Tolis\Downloads\WPy-3670\notebooks\ergasia\clustering.py", line 39, in hierarchical
ac.fit_predict(k)
File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\sklearn\base.py", line 355, in fit_predict
self.fit(X)
File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\sklearn\cluster\hierarchical.py", line 830, in fit
**kwargs)
File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\sklearn\externals\joblib\memory.py", line 329, in __call__
return self.func(*args, **kwargs)
File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\sklearn\cluster\hierarchical.py", line 584, in _complete_linkage
return linkage_tree(*args, **kwargs)
File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\sklearn\cluster\hierarchical.py", line 470, in linkage_tree
out = hierarchy.linkage(X, method=linkage, metric=affinity)
File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\scipy\cluster\hierarchy.py", line 708, in linkage
y = distance.pdist(y, metric)
File "C:\Users\Tolis\Downloads\WPy-3670\python-3.6.7\lib\site-packages\scipy\spatial\distance.py", line 1877, in pdist
dm = np.empty((m * (m - 1)) // 2, dtype=np.double)
ValueError: Maximum allowed dimension exceeded
ValueError: Превышен максимально допустимый размер