ml.net

ML.net - Bad value at line 1 in column label

不羁岁月 提交于 2019-12-06 13:14:34
I am following the Iris tutorial for ML.Net, I typed out the instructions instead of copy/pasting them so I could learn the API better, but now I am getting some errors. When I run this line from the tutorial a System.Reflection.TargetInvocationException is thrown: var model = pipeline.Train<IrisData, IrisPrediction>(); The console errors I am getting during runtime are: Bad value at line 2 in column Label ... Bad value at line 8 in column Label Suppressing further bad value messages ... Processed 150 rows with 150 bad values and 0 format errors Warning: Term map for output column 'Label'

Dynamic classes/objects ML.net's PredictionMoadel<TInput, TOutput> Train()

醉酒当歌 提交于 2019-12-06 06:11:55
问题 I am using Microsoft's ML.net library. I would like to train data based on a model who's contract is generated at run-time (meaning the fields are not known at compile-time). Can this be achieve using the current ML.net's Train() method siganture? So far i am trying to call this Train method by passing in the instance of the TInput and TOutput objects (rather than the T class). 回答1: According to the docs, LearningPipeline only has one method, Train<TIn, TOut> for training, and it implies that

Dynamic classes/objects ML.net's PredictionMoadel<TInput, TOutput> Train()

不羁的心 提交于 2019-12-04 11:33:46
I am using Microsoft's ML.net library. I would like to train data based on a model who's contract is generated at run-time (meaning the fields are not known at compile-time). Can this be achieve using the current ML.net's Train() method siganture? So far i am trying to call this Train method by passing in the instance of the TInput and TOutput objects (rather than the T class). According to the docs, LearningPipeline only has one method, Train<TIn, TOut> for training, and it implies that TIn and TOut are actual classes: TIn an input to prediction, and TOut an output. The underlying ML.NET code

ml.net train model input from string instead of a file

◇◆丶佛笑我妖孽 提交于 2019-12-02 05:36:11
问题 I've been using the following line of code to load text data: pipeline.Add(new TextLoader(dataPath).CreateFrom<SentimentData>(separator: ',')); But is there a way to inject a string as data? Let's say we want to grab the model from a database, I don't have to save the string to a file first, or do I? The documentation at this date is really poor, but it's also a shiny new tool Microsoft gave us. Thanks 回答1: You'll want to use a CollectionDataSource which was introduced in v0.2 of ML.NET. You

ml.net train model input from string instead of a file

南楼画角 提交于 2019-12-02 02:31:07
I've been using the following line of code to load text data: pipeline.Add(new TextLoader(dataPath).CreateFrom<SentimentData>(separator: ',')); But is there a way to inject a string as data? Let's say we want to grab the model from a database, I don't have to save the string to a file first, or do I? The documentation at this date is really poor, but it's also a shiny new tool Microsoft gave us. Thanks You'll want to use a CollectionDataSource which was introduced in v0.2 of ML.NET. You can either grab fresh github bits or the nuget, and then you can use CollectionDataSource on top of an

How to predict multiple labels with ML.NET using regression task?

 ̄綄美尐妖づ 提交于 2019-12-02 01:38:36
I'm very new to machine learning and I've stumbled upon the following problem. Considering an official NYC Taxi fare amount prediction tutorial , let's say I'd like to predict another real value, e.g. TripTime . I've modified my code as follows: public class TripFarePrediction // this class is used to store prediction result { [ColumnName("Score")] public float FareAmount { get; set; } [ColumnName("Score2")] public float TripTime { get; set; } } private static ITransformer Train(MLContext mlContext, string trainDataPath) { IDataView dataView = _textLoader.Read(trainDataPath); var

ML.Net retrain existing model rather than training new model

拟墨画扇 提交于 2019-12-01 17:59:18
问题 I am training a ML.Net machine learning model. I can train it and predict from it, and save/load it from the disk. But I need to be able to load it off the disk, then retrain it, or add to it with new information to improve it over time. Does anyone know if this is possible? I have not found anything in the MS docs of how to do it, but it's a pretty standard thing for ML, so I'd be surprised if it's not possible. Thanks 回答1: This functionality exists in ML.NET but it is not possible with the

How to translate the intro ML.Net demo to F#?

孤街浪徒 提交于 2019-12-01 03:30:58
I'm looking at a the cs file here: https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet/get-started/windows and in my attempt to translate it to F# it compiles just fine but throws a System.Reflection.TargetInvocationException when run: FormatException: One of the identified items was in an invalid format . What am I missing? Editted: Was using records before open Microsoft.ML open Microsoft.ML.Runtime.Api open Microsoft.ML.Trainers open Microsoft.ML.Transforms open System type IrisData = [<Column("0")>] val mutable SepalLength : float [<Column("1")>] val mutable