NimbusML
NimbusML copied to clipboard
KMeansPlusPlus PredictedLabel Type
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)
`