Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/21/10 13:21:14 (15 years ago)
Author:
mkommend
Message:

removed cloning of dataset and made it readonly (ticket #938)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/SupportVectorRegression/SupportVectorRegressionSolution.cs

    r3916 r3933  
    6565    private Dataset CalculateSupportVectors() {
    6666      if (Model.Model.SupportVectorIndizes.Length == 0)
    67         return new Dataset();
     67        return new Dataset(new List<string>(),new double[0,0]);
    6868
    69       Dataset dataset = new Dataset(ProblemData.Dataset.VariableNames, new double[Model.Model.SupportVectorCount, ProblemData.Dataset.Columns]);
     69      double[,] data = new double[Model.Model.SupportVectorIndizes.Length, ProblemData.Dataset.Columns];
    7070      for (int i = 0; i < Model.Model.SupportVectorIndizes.Length; i++) {
    7171        for (int column = 0; column < ProblemData.Dataset.Columns; column++)
    72           dataset[i, column] = ProblemData.Dataset[Model.Model.SupportVectorIndizes[i], column];
     72          data[i, column] = ProblemData.Dataset[Model.Model.SupportVectorIndizes[i], column];
    7373      }
    74       return dataset;
     74      return new Dataset(ProblemData.Dataset.VariableNames, data);
    7575    }
    7676
Note: See TracChangeset for help on using the changeset viewer.