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
from cuml import KMeans
from cuml.cluster import KMeans
import cudf
import numpy as np
import pandas as pd
def np2cudf(df):
# convert numpy array to cuDF dataframe
df = pd.DataFrame({'fea%d'%i:df[:,i] for i in range(df.shape[1])})
pdf = cudf.DataFrame()
for c,column in enumerate(df):
pdf[str(c)] = df[column]
return pdf
a = np.asarray([[1.0, 1.0], [1.0, 2.0], [3.0, 2.0], [4.0, 3.0]],
dtype=np.float32)
b = np2cudf(a)
print("input:")
print(b)
print("Calling fit")
kmeans_float = KMeans(n_clusters=2)
kmeans_float.fit_transform(b)
input:
0 1
0 1.0 1.0
1 1.0 2.0
2 3.0 2.0
3 4.0 3.0
Calling fit
Traceback (most recent call last):
File "gocuml.py", line 24, in <module>
kmeans_float.fit_transform(b)
File "/home/jon/minicondadai_py38/lib/python3.8/site-packages/cuml/internals/api_decorators.py", line 586, in inner_get
ret_val = func(*args, **kwargs)
File "cuml/cluster/kmeans.pyx", line 628, in cuml.cluster.kmeans.KMeans.fit_transform
File "/home/jon/minicondadai_py38/lib/python3.8/site-packages/cuml/internals/api_decorators.py", line 586, in inner_get
ret_val = func(*args, **kwargs)
File "cuml/cluster/kmeans.pyx", line 546, in cuml.cluster.kmeans.KMeans.transform
TypeError: transform() got an unexpected keyword argument 'sample_weight'
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: