NimbusML icon indicating copy to clipboard operation
NimbusML copied to clipboard

DatasetTransformer to work with predictor models

Open ganik opened this issue 5 years ago • 2 comments

Currently if you DatasetTransformer with predictor model it outputs all the hidden fields. It needs to ouput only Score and optionally PredictedLabel if its classifier for ex, Probabilities if available.

ganik avatar Nov 25 '19 15:11 ganik

This is the code snipped that should be taking care of hidden fields that are coming from ML.NET to NimbusML:

https://github.com/microsoft/NimbusML/blob/56bbda6cbe02c1fe79fa48d9e756be2450720a10/src/DotNetBridge/NativeDataInterop.cs#L127-L128

mstfbl avatar Nov 26 '19 23:11 mstfbl

The exact problem that this issue addresses is as follows:

Add support to DatasetTransformer so that it can use model files that contain predictors by calling the .transform() function. So then the following would work as expected:

pipeline = Pipeline([RangeFilter(), OrdinaryLeastSquares()])
pipeline.fit(data)
 
pipeline2 = Pipeline([DatasetTransformer(transform_model=pipeline.model)])
pipeline2.fit(data)
pipeline.transform(…)

mstfbl avatar Dec 13 '19 18:12 mstfbl