- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/LinearRegression
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/LinearRegression/LinearRegressionSolutionCreator.cs
r3848 r4068 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using System.Text; 25 using HeuristicLab.Core; 26 using HeuristicLab.Data; 27 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; 29 using HeuristicLab.Operators; 26 30 using HeuristicLab.Optimization; 27 using HeuristicLab. Operators;31 using HeuristicLab.Parameters; 28 32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Core;30 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;31 using HeuristicLab.Problems.DataAnalysis.Symbolic;32 33 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols; 33 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;34 using HeuristicLab.Parameters;35 using HeuristicLab.Data;36 34 37 35 namespace HeuristicLab.Problems.DataAnalysis.Regression.LinearRegression { … … 50 48 Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The resulting solution encoded as a symbolic expression tree.")); 51 49 Parameters.Add(new LookupParameter<DataAnalysisProblemData>(DataAnalysisProblemDataParameterName, "The problem data on which the linear regression should be calculated.")); 52 Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName, "The start of the samples on which the linear regression should be applied."));53 Parameters.Add(new ValueLookupParameter<IntValue>(SamplesEndParameterName, "The end of the samples on which the linear regression should be applied."));50 Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName, "The start of the samples on which the linear regression should be applied.")); 51 Parameters.Add(new ValueLookupParameter<IntValue>(SamplesEndParameterName, "The end of the samples on which the linear regression should be applied.")); 54 52 } 55 53 [StorableConstructor] … … 94 92 95 93 public override IOperation Apply() { 96 SymbolicExpressionTree = CreateSymbolicExpressionTree(DataAnalysisProblemData.Dataset, DataAnalysisProblemData.TargetVariable.Value, DataAnalysisProblemData.InputVariables.CheckedItems.Select(x => x.Value.Value), SamplesStart.Value, SamplesEnd.Value);94 SymbolicExpressionTree = CreateSymbolicExpressionTree(DataAnalysisProblemData.Dataset, DataAnalysisProblemData.TargetVariable.Value, DataAnalysisProblemData.InputVariables.CheckedItems.Select(x => x.Value.Value), SamplesStart.Value, SamplesEnd.Value); 97 95 return base.Apply(); 98 96 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/LinearRegression/LinearRegressionUtil.cs
r3848 r4068 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 23 using System.Linq; 25 using System.Text;26 24 27 25 namespace HeuristicLab.Problems.DataAnalysis.Regression.LinearRegression { … … 30 28 List<int> allowedRows = CalculateAllowedRows(dataset, targetVariable, allowedInputVariables, start, end); 31 29 32 double[,] matrix = new double[allowedRows.Count, allowedInputVariables.Count() + 1];30 double[,] matrix = new double[allowedRows.Count, allowedInputVariables.Count() + 1]; 33 31 for (int row = 0; row < allowedRows.Count; row++) { 34 32 int col = 0;
Note: See TracChangeset
for help on using the changeset viewer.