Changeset 8601


Ignore:
Timestamp:
09/07/12 16:30:40 (10 years ago)
Author:
sforsten
Message:

#1942: training has now at least one sample

Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.Designer.cs

    r8599 r8601  
    6969      this.TrainingTestTrackBar.Location = new System.Drawing.Point(6, 19);
    7070      this.TrainingTestTrackBar.Maximum = 100;
     71      this.TrainingTestTrackBar.Minimum = 1;
    7172      this.TrainingTestTrackBar.Name = "TrainingTestTrackBar";
    7273      this.TrainingTestTrackBar.Size = new System.Drawing.Size(210, 45);
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj

    r8599 r8601  
    114114    </ProjectReference>
    115115  </ItemGroup>
     116  <ItemGroup>
     117    <EmbeddedResource Include="DataAnalysisImportTypeDialog.resx">
     118      <DependentUpon>DataAnalysisImportTypeDialog.cs</DependentUpon>
     119    </EmbeddedResource>
     120  </ItemGroup>
    116121  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    117122  <PropertyGroup>
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/CSV/ClassifiactionCSVInstanceProvider.cs

    r8599 r8601  
    6969      var allowedInputVars = new List<string>();
    7070      var trainingIndizes = Enumerable.Range(0, (csvFileParser.Rows * 2) / 3);
    71       foreach (var variableName in dataset.DoubleVariables) {
    72         if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
    73           variableName != targetVar)
    74           allowedInputVars.Add(variableName);
     71      if (trainingIndizes.Count() >= 2) {
     72        foreach (var variableName in dataset.DoubleVariables) {
     73          if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
     74            variableName != targetVar)
     75            allowedInputVars.Add(variableName);
     76        }
     77      } else {
     78        allowedInputVars.AddRange(dataset.DoubleVariables.Where(x => x.Equals(targetVar)));
    7579      }
    7680
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Clustering/CSV/ClusteringCSVInstanceProvider.cs

    r8599 r8601  
    6868      var allowedInputVars = new List<string>();
    6969      var trainingIndizes = Enumerable.Range(0, (csvFileParser.Rows * 2) / 3);
    70       foreach (var variableName in dataset.DoubleVariables) {
    71         if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
    72           variableName != targetVar)
    73           allowedInputVars.Add(variableName);
     70      if (trainingIndizes.Count() >= 2) {
     71        foreach (var variableName in dataset.DoubleVariables) {
     72          if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
     73            variableName != targetVar)
     74            allowedInputVars.Add(variableName);
     75        }
     76      } else {
     77        allowedInputVars.AddRange(dataset.DoubleVariables.Where(x => x.Equals(targetVar)));
    7478      }
    7579
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/CSV/RegressionCSVInstanceProvider.cs

    r8599 r8601  
    100100      var allowedInputVars = new List<string>();
    101101      int trainingPartEnd = (csvFileParser.Rows * type.Training) / 100;
     102      trainingPartEnd = trainingPartEnd > 0 ? trainingPartEnd : 1;
    102103      var trainingIndizes = Enumerable.Range(0, trainingPartEnd);
    103       foreach (var variableName in dataset.DoubleVariables) {
    104         if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
    105           variableName != targetVar)
    106           allowedInputVars.Add(variableName);
     104      if (trainingIndizes.Count() >= 2) {
     105        foreach (var variableName in dataset.DoubleVariables) {
     106          if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
     107            variableName != targetVar)
     108            allowedInputVars.Add(variableName);
     109        }
     110      } else {
     111        allowedInputVars.AddRange(dataset.DoubleVariables.Where(x => x.Equals(targetVar)));
    107112      }
    108113
Note: See TracChangeset for help on using the changeset viewer.