dotnet / dotnet/machinelearning
AutoML execute with preFeaturizer should accept Int32 and so
- Dominant language
- C#
- Stars
- 9.4k
- Forks
- 2k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 11
Description
### System information
Microsoft.ML.AutoML (0.14.0)
### Issue
**TL;DR:** `ExperimentBase.Execute` with non-null `preFeaturizer` argument should check the schema types **after** transforming the `preFeaturizer`.
----
I have a flattened object with `long` and `int` fields that I load it to an `IDataView`.
If I want to `Execute` an experiment for this `dataView`, I get this expeption:
> **System.ArgumentException:** 'Only supported feature column types are Boolean, Single, and String. Please change the feature column Feature1 of type Int64 to one of the supported types.
Parameter name: trainData'
So, I have to create an `EstimatorChain` to `ConvertType` from `long` to `Single`, and `Fit` then `Transform` the `dataView`.
Let's say I have this `EstimatorChain` to transform these types. Now I have two options:
1. Transform the `dataView` **before** passing it to the `Execute` method.
With this option, the problem is that I have to create a class that fit to the new schema, if I want to save the model and use it latter.
(The first generic type in `CreatePredictionEngine` must be appropriated to the `inputSchema`)
2. Pass this `EstimatorChain` as `preFeaturizer` argument in the `Execute` method.
But this is not a real solution because the `Execute` method **still throws the exception above!**
Contributor guide
Assessment
This issue has not been assessed yet.