Open LanceElCamino opened 1 year ago
The label column "NextDayClose", was created to only have 2 values, a 1 or 0. Does the InferColumns method infer that data type as boolean since there are only 2 possible values being 1 and 0? If so I assume this would require a Binary Classification scenario instead of Multiclass. In the model builder I can select either scenario on this dataset and it will build the model based on that selection. Is there a way to change the data type of a column that InferColumns is inferring to be whatever we want (single, datetime, boolean, etc)?
@LittleLittleCloud
@LanceElCamino Featurizer
doesn't do anything for label column. So if you want to use multiclass trainer for your dataset, you'll need to map your label column to key type using MapValueToKey
transformer before fedding it to trainer. This is because multiclass trainer in ML.Net requires the label type to be a key type.
However, if you are certain that your label type only has two possible value I would suggest try binary classification instead. In that case you would need to change the trainer in your pipeline to use BinaryClassification and also change metric type in AutoMLExperiment to BinaryClassificationMetric
Is there a way to override the data type that InferColumns is inferring? Looks like it's expecting a bool yet it's a single.
Yep, Simply add or move the corresponding columns in the return result will work
Hi @LanceElCamino,
Did the suggestions from @LittleLittleCloud resolve your issue?
This issue has been marked needs-author-action
and may be missing some important information.
This issue has been automatically marked no-recent-activity
because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity
.
Thanks. Binary Classification works for this scenario.
Windows 10 Microsoft.Ml 2.0 Micorsoft.Ml.AutoML 0.20.0
I receive this error :
System.ArgumentOutOfRangeException: 'Schema mismatch for label column 'NextDayClose': expected Single, got Boolean (Parameter 'labelCol')'
when running this code copied and pasted from the AutoML QuickStart sample:
Attached is the csv file being called.
CSATest.csv
Is there a way to override the data type that InferColumns is inferring? Looks like it's expecting a bool yet it's a single.