diff --git a/python/cuML/dbscan/dbscan_wrapper.pyx b/python/cuML/dbscan/dbscan_wrapper.pyx index d3718ac8ec..3d9cedb3a9 100644 --- a/python/cuML/dbscan/dbscan_wrapper.pyx +++ b/python/cuML/dbscan/dbscan_wrapper.pyx @@ -116,6 +116,7 @@ class DBSCAN: self.min_samples, labels_ptr) del(X_m) + return self def fit_predict(self, X): """ diff --git a/python/cuML/kmeans/kmeans_wrapper.pyx b/python/cuML/kmeans/kmeans_wrapper.pyx index b6097a3d91..d2f7b2953b 100644 --- a/python/cuML/kmeans/kmeans_wrapper.pyx +++ b/python/cuML/kmeans/kmeans_wrapper.pyx @@ -134,8 +134,6 @@ class KMeans: """ self.gdf_datatype = np.dtype(X[X.columns[0]]._column.dtype) - self.n_rows = len(X) - self.n_cols = len(X._cols) cdef uintptr_t input_ptr if (isinstance(X, cudf.DataFrame)): @@ -235,8 +233,6 @@ class KMeans: """ self.gdf_datatype = np.dtype(X[X.columns[0]]._column.dtype) - self.n_rows = len(X) - self.n_cols = len(X._cols) cdef uintptr_t input_ptr if (isinstance(X, cudf.DataFrame)): @@ -319,9 +315,6 @@ class KMeans: """ - self.n_rows = len(X) - self.n_cols = len(X._cols) - cdef uintptr_t input_ptr if (isinstance(X, cudf.DataFrame)): self.gdf_datatype = np.dtype(X[X.columns[0]]._column.dtype) @@ -349,10 +342,6 @@ class KMeans: cdef uintptr_t preds_ptr = self._get_ctype_ptr(preds_data) - ary = np.array([1.0, 1.5, 3.5, 2.5], dtype=np.float32) - dary = cuda.to_device(ary) - cdef uintptr_t ptr2 = dary.device_ctypes_pointer.value - if self.gdf_datatype.type == np.float32: c_kmeans.kmeans_transform( self.verbose, # verbose diff --git a/python/cuML/pca/pca_wrapper.pyx b/python/cuML/pca/pca_wrapper.pyx index d24df702b5..3358bd6fb7 100644 --- a/python/cuML/pca/pca_wrapper.pyx +++ b/python/cuML/pca/pca_wrapper.pyx @@ -297,6 +297,8 @@ class PCA: if (isinstance(X, cudf.DataFrame)): del(X_m) + return self + def fit_transform(self, X): """ Fit the model with X and apply the dimensionality reduction on X. diff --git a/python/cuML/tsvd/tsvd_wrapper.pyx b/python/cuML/tsvd/tsvd_wrapper.pyx index 6b91f9b79e..251e6fcc47 100644 --- a/python/cuML/tsvd/tsvd_wrapper.pyx +++ b/python/cuML/tsvd/tsvd_wrapper.pyx @@ -244,6 +244,7 @@ class TruncatedSVD: self.singular_values_ptr = singular_vals_ptr del(X_m) + return self def fit_transform(self, X): """