Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/22/10 15:59:57 (14 years ago)
Author:
gkronber
Message:

Added plugin for evolutionary feature selection. #1097

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/LinearRegression/LinearRegressionSolutionCreator.cs

    r4068 r4082  
    9292
    9393    public override IOperation Apply() {
    94       SymbolicExpressionTree = CreateSymbolicExpressionTree(DataAnalysisProblemData.Dataset, DataAnalysisProblemData.TargetVariable.Value, DataAnalysisProblemData.InputVariables.CheckedItems.Select(x => x.Value.Value), SamplesStart.Value, SamplesEnd.Value);
     94      double rmsError, cvRmsError;
     95      SymbolicExpressionTree = CreateSymbolicExpressionTree(DataAnalysisProblemData.Dataset, DataAnalysisProblemData.TargetVariable.Value, DataAnalysisProblemData.InputVariables.CheckedItems.Select(x => x.Value.Value), SamplesStart.Value, SamplesEnd.Value, out rmsError, out cvRmsError);
    9596      return base.Apply();
    9697    }
    9798
    98     public static SymbolicExpressionTree CreateSymbolicExpressionTree(Dataset dataset, string targetVariable, IEnumerable<string> allowedInputVariables, int start, int end) {
     99    public static SymbolicExpressionTree CreateSymbolicExpressionTree(Dataset dataset, string targetVariable, IEnumerable<string> allowedInputVariables, int start, int end, out double rmsError, out double cvRmsError) {
    99100      double[,] inputMatrix = LinearRegressionUtil.PrepareInputMatrix(dataset, targetVariable, allowedInputVariables, start, end);
    100101
     
    108109      alglib.linreg.lrbuild(ref inputMatrix, nRows, nFeatures, ref retVal, ref lm, ref ar);
    109110      if (retVal != 1) throw new ArgumentException("Error in calculation of linear regression model");
     111      rmsError = ar.rmserror;
     112      cvRmsError = ar.cvrmserror;
    110113
    111114      for (int i = 0; i < nFeatures + 1; i++)
Note: See TracChangeset for help on using the changeset viewer.