Skip to content

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

Closed

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

Activity

  1. Ivanidzo4ka commented on Oct 18, 2018

    @Ivanidzo4ka
    ContributorAuthor

    DRI RESPONSE: This is a thread about old API.
    New API doesn't have such problems anymore.

  2. ghost locked as resolved and limited conversation to collaborators on Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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