NimbusML icon indicating copy to clipboard operation
NimbusML copied to clipboard

KMeansPlusPlus PredictedLabel Type

Open Lynx1820 opened this issue 4 years ago • 0 comments

The expected type for PredictedLabel should be uint32, since ML.NET returns key values, but it's actually int32.

`Taken from example code:

from nimbusml import Pipeline, FileDataStream from nimbusml.cluster import KMeansPlusPlus from nimbusml.datasets import get_dataset from nimbusml.feature_extraction.categorical import OneHotVectorizer

path = get_dataset('infert').as_filepath()

data = FileDataStream.read_csv(path) print(data.head()) pipeline = Pipeline([ OneHotVectorizer(columns={'edu': 'education'}), KMeansPlusPlus(n_clusters=5, feature=['induced', 'edu', 'parity']) ]) metrics, predictions = pipeline
.fit(data)
.test(data, 'induced', output_scores=True) print(predictions.head()) print(predictions['PredictedLabel'].dtype) `

Lynx1820 avatar Mar 14 '20 00:03 Lynx1820