dotnet / machinelearning-modelbuilder

Simple UI tool to build custom machine learning models.
Creative Commons Attribution 4.0 International
264 stars 56 forks source link

Auto-detect headers #623

Closed luisquintanilla closed 4 years ago

luisquintanilla commented 4 years ago

System Information (please complete the following information):

Training on a file without header because has-header flag default is true takes the first row as the column names. It would be good to have it default to false and autodetect/generate headers unless users explicitly say it had header.

Dataset:

Wow... Loved this place.    1
Crust is not good.  0
Not tasty and the texture was just nasty.   0

Command:

mlnet classification --name classification --dataset yelp_labelled.txt --label-col 1

ModelInput:

// This file was auto-generated by ML.NET Model Builder. 

using Microsoft.ML.Data;

namespace Classification.Model
{
    public class ModelInput
    {
        [ColumnName("Wow... Loved this place."), LoadColumn(0)]
        public string Wow____Loved_this_place_ { get; set; }

        [ColumnName("1"), LoadColumn(1)]
        public string _1 { get; set; }

    }
}
JakeRadMSFT commented 4 years ago

@justinormont @beccamc do we have anything that is good at guessing if there is a header?

LittleLittleCloud commented 4 years ago

Add a third option for has-header flag should be able to solve this