stackoverflow.com/questions/50910370/...

трю на файл CS здесь:https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet/get-started/windows и в моей попытке перевести его на F # он компилируется просто отлично, но выдаетSystem.Reflection.TargetInvocationException когда бегать:FormatException: One of the identified items was in an invalid format, Чего мне не хватает?

Отредактировано: раньше использовал записи
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 SepalWidth : float
    [<Column("2")>] val mutable PetalLength : float
    [<Column("3")>] val mutable PetalWidth : float
    [<Column("4");ColumnName("Label")>] val mutable Label : string

    new(sepLen, sepWid, petLen, petWid, label) = 
        { SepalLength = sepLen
          SepalWidth = sepWid
          PetalLength = petLen
          PetalWidth =  petWid
          Label = label }

type IrisPrediction = 
    [<ColumnName("PredictedLabel")>] val mutable PredictedLabels : string
    new() = { PredictedLabels = "Iris-setosa" }


[<EntryPoint>]
let main argv = 
    let pipeline = new LearningPipeline()
    let dataPath = "iris.data.txt"
    pipeline.Add(new TextLoader<IrisData>(dataPath,separator = ","))
    pipeline.Add(new Dictionarizer("Label"))
    pipeline.Add(new ColumnConcatenator("Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth"))
    pipeline.Add(new StochasticDualCoordinateAscentClassifier())
    pipeline.Add(new PredictedLabelColumnOriginalValueConverter(PredictedLabelColumn = "PredictedLabel") )    
    let model = pipeline.Train<IrisData, IrisPrediction>()


    let prediction = model.Predict(IrisData(3.3, 1.6, 0.2, 5.1,""))

    Console.WriteLine("Predicted flower type is: {prediction.PredictedLabels}")

    0 // return an integer exit code

Ответы на вопрос(1)

Ваш ответ на вопрос