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

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLabProblemsDataAnalysisRegressionPlugin.cs.frame

    r3842 r4082  
    2828  [Plugin("HeuristicLab.Problems.DataAnalysis.Regression","3.3.0.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Problems.DataAnalysis.Regression-3.3.dll", PluginFileType.Assembly)]
    30   [PluginDependency("HeuristicLab.ALGLIB", "2.5.0.0")]
    31   [PluginDependency("HeuristicLab.Analysis", "3.3.0.0")]
    32   [PluginDependency("HeuristicLab.Collections", "3.3.0.0")]
     30  [PluginDependency("HeuristicLab.ALGLIB", "2.5")]
     31  [PluginDependency("HeuristicLab.Analysis", "3.3")]
     32  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3333  [PluginDependency("HeuristicLab.Common", "3.3")]
    34   [PluginDependency("HeuristicLab.Common.Resources", "3.3.0.0")]
    35   [PluginDependency("HeuristicLab.Core", "3.3.0.0")]
    36   [PluginDependency("HeuristicLab.Data", "3.3.0.0")]
    37   [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","3.3.0.0")]
     34  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
     35  [PluginDependency("HeuristicLab.Core", "3.3")]
     36  [PluginDependency("HeuristicLab.Data", "3.3")]
     37  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","3.3")]
    3838  [PluginDependency("HeuristicLab.LibSVM", "1.6.3.0")]
    39   [PluginDependency("HeuristicLab.Operators", "3.3.0.0")]
    40   [PluginDependency("HeuristicLab.Optimization", "3.3.0.0")]
    41   [PluginDependency("HeuristicLab.Optimization.Operators", "3.3.0.0")]
    42   [PluginDependency("HeuristicLab.Parameters", "3.3.0.0")]
    43   [PluginDependency("HeuristicLab.Persistence", "3.3.0.0")]
    44   [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.3.0.0")]
    45   [PluginDependency("HeuristicLab.Random", "3.3.0.0")] 
     39  [PluginDependency("HeuristicLab.Operators", "3.3")]
     40  [PluginDependency("HeuristicLab.Optimization", "3.3")]
     41  [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")]
     42  [PluginDependency("HeuristicLab.Parameters", "3.3")]
     43  [PluginDependency("HeuristicLab.Persistence", "3.3")]
     44  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.3")]
     45  [PluginDependency("HeuristicLab.Random", "3.3")] 
    4646  public class HeuristicLabProblemsDataAnalysisRegressionPlugin : PluginBase {
    4747  }
  • 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.