Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4780


Ignore:
Timestamp:
11/12/10 13:25:24 (14 years ago)
Author:
mkommend
Message:

Corrected updating of ´ClassificationProblemData` parameters after data import (ticket #939).

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Classification/3.3/ClassificationProblemData.cs

    r4722 r4780  
    255255    }
    256256
     257    protected override void OnProblemDataChanged(EventArgs e) {
     258      base.OnProblemDataChanged(e);
     259      UpdateClassValues();
     260    }
     261
    257262    private void UpdateClassValues() {
    258263      sortedClassValues = Dataset.GetVariableValues(TargetVariable.Value).Distinct().ToList();
     
    271276      }
    272277      ClassNames = array;
     278      UpdateMisclassifciationMatrixHeaders();
    273279      RegisterParameterValueEvents();
    274280    }
     
    304310
    305311    private void UpdateMisclassifciationMatrixHeaders() {
    306       MisclassificationMatrix.RowNames = ClassNames.Select(name => "Estimated " + name);
    307       MisclassificationMatrix.ColumnNames = ClassNames.Select(name => "Actual " + name);
     312      MisclassificationMatrix.RowNames = ClassNames.Select(name => "Estimated " + name).ToList() ;
     313      MisclassificationMatrix.ColumnNames = ClassNames.Select(name => "Actual " + name).ToList();
    308314    }
    309315  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisProblemData.cs

    r4722 r4780  
    405405      InputVariables.SetItemCheckedState(variableNames.First(), false);
    406406      int middle = (int)(csvFileParser.Rows * 0.5);
     407      TrainingSamplesEnd = new IntValue(middle);
    407408      TrainingSamplesStart = new IntValue(0);
    408       TrainingSamplesEnd = new IntValue(middle);
     409      TestSamplesEnd = new IntValue(csvFileParser.Rows);
    409410      TestSamplesStart = new IntValue(middle);
    410       TestSamplesEnd = new IntValue(csvFileParser.Rows);
    411411      suppressEvents = false;
    412412      OnProblemDataChanged(EventArgs.Empty);
Note: See TracChangeset for help on using the changeset viewer.