Skip to content

TrainTestEvaluator can't accept same collection for train and testing. #307

Closed
@Ivanidzo4ka

Description

@Ivanidzo4ka

System information
.NET Version (eg., dotnet --info): 0.3.0-preview-26604-1

var pipeline = new LearningPipeline();
var data = new List<IrisData>() {
    new IrisData { SepalLength = 1f, SepalWidth = 1f ,PetalLength=0.3f, PetalWidth=5.1f, Label=1},
    new IrisData { SepalLength = 1f, SepalWidth = 1f ,PetalLength=0.3f, PetalWidth=5.1f, Label=1},
    new IrisData { SepalLength = 1.2f, SepalWidth = 0.5f ,PetalLength=0.3f, PetalWidth=5.1f, Label=0}
};
var collection = CollectionDataSource.Create(data);
pipeline.Add(collection);
pipeline.Add(new ColumnConcatenator(outputColumn: "Features",
    "SepalLength", "SepalWidth", "PetalLength", "PetalWidth"));
pipeline.Add(new StochasticDualCoordinateAscentClassifier());
var tt = new TrainTestEvaluator().TrainTestEvaluate<IrisData, IrisPrediction>(pipeline, collection);

Message: System.InvalidOperationException : Port 'Var_c3b11d6c322a4a65ab0b8a5c7054c94c' is already set

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions