You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find it more intuitive to have a class decorated with metadata to use to load data instead of imperatively building up a schema in code, like the following:
privatestaticTextLoader.ColumnScalarCol(stringname,intordinal,DataKindkind=DataKind.Num)=>newTextLoader.Column(){Name=name,Type=kind,Source=new[]{newTextLoader.Range(){Min=ordinal,Max=ordinal}}};varloader=newTextLoader(env,newTextLoader.Arguments(){HasHeader=true,SeparatorChars=newchar[]{','},// These column declarations are meant to mirror those that appear in HousePriceData.Column=new[]{ScalarCol("Id",0,DataKind.Text),ScalarCol("Date",1,DataKind.Text),ScalarCol("Label",2),ScalarCol("Bedrooms",3),ScalarCol("Bathrooms",4),ScalarCol("SqftLiving",5),ScalarCol("SqftLot",6),},newMultiFileSource(dataPath));
This issue is being opened to ensure we preserve this behavior with the new direct access API design proposed in #371 (possibly using a different API design, but preserving the functionality).
Agreed. I wasn't proposing to remove the imperative API to build the columns up using code. That is definitely necessary. I was proposing building a "convenience" API on top of it, which built up the objects from metadata.
In the
LearningPipeline
API, we have the ability to create a TextLoader object using metadata applied to a regular C# class:I find it more intuitive to have a class decorated with metadata to use to load data instead of imperatively building up a schema in code, like the following:
This issue is being opened to ensure we preserve this behavior with the new direct access API design proposed in #371 (possibly using a different API design, but preserving the functionality).
/cc @ericstj @TomFinley @Zruty0 @terrajobst
The text was updated successfully, but these errors were encountered: