- Timestamp:
- 07/22/10 15:59:57 (14 years ago)
- 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 28 28 [Plugin("HeuristicLab.Problems.DataAnalysis.Regression","3.3.0.$WCREV$")] 29 29 [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")] 33 33 [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")] 38 38 [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")] 46 46 public class HeuristicLabProblemsDataAnalysisRegressionPlugin : PluginBase { 47 47 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/LinearRegression/LinearRegressionSolutionCreator.cs
r4068 r4082 92 92 93 93 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); 95 96 return base.Apply(); 96 97 } 97 98 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) { 99 100 double[,] inputMatrix = LinearRegressionUtil.PrepareInputMatrix(dataset, targetVariable, allowedInputVariables, start, end); 100 101 … … 108 109 alglib.linreg.lrbuild(ref inputMatrix, nRows, nFeatures, ref retVal, ref lm, ref ar); 109 110 if (retVal != 1) throw new ArgumentException("Error in calculation of linear regression model"); 111 rmsError = ar.rmserror; 112 cvRmsError = ar.cvrmserror; 110 113 111 114 for (int i = 0; i < nFeatures + 1; i++)
Note: See TracChangeset
for help on using the changeset viewer.