Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- var fileName = "AgeRanges.csv";
- var pipeline = new LearningPipeline();
- // standard load from file
- pipeline.Add(new TextLoader(fileName).CreateFrom<AgeRange>(separator: ',', useHeader: true));
- // load data from List<>()
- var data = new List<AgeRange>
- {
- new AgeRange { Name = "John", Age = 12, Sex = "M", Label = "boy"},
- new AgeRange { Name = "Laslo", Age = 2, Sex = "M", Label = "baby"},
- new AgeRange { Name = "Mary", Age = 16, Sex = "F", Label = "teenager"},
- new AgeRange { Name = "Gracie", Age = 6, Sex = "F", Label = "girl"}
- };
- var collection = CollectionDataSource.Create(data);
- pipeline.Add(collection);
- }
Add Comment
Please, Sign In to add comment