Skip to content

Conversation

@artidoro
Copy link
Owner

@artidoro artidoro commented Mar 23, 2019

I am a bit concerned about the fact that we have to .Fit(...) for non trainable transforms. I think it can make ML.NET look really bad! I worked on a solution for the problem...

I tried three approaches:

  1. Create a new interface that combines IEstimator and ITransformer:ITrivialEstiamtor : IEstimator , ITransformer
  2. Make the trivial estimator class implement ITransformer:TrivialEstimator : IEstimator, ITransformer
  3. Simply add a method .Transform(IDataView input) in  the TrivialEstimator class.

For each one of these the difficult part is making sure that the estimator/transformer chains work properly. So I implemented a TrivialEstiamtorChain that mimics EstimatorChain but on the class TrivialEstimator instead of the interface IEstimator.

For 1. and 2. I did not manage to make it work... When you .Append() two trivialestimators it will just have a difficult time to distinguish whether you want to create a new EstimatorChain or a TransformerChain. 

For 3. I managed to make it work, I think! The .Append() works and will switch to an EstimatorChain as soon as a trainable estimator is added to the pipeline.

Is it fine not having a class/interface that combines ITransformer and IEstimator?

@artidoro artidoro force-pushed the trivialestimatoritransformer branch from 7360786 to d5bef0f Compare May 8, 2019 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants