- Timestamp:
- 03/07/11 18:11:23 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring
- Files:
-
- 9 added
- 27 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj
r5617 r5624 120 120 </Compile> 121 121 <Compile Include="Properties\AssemblyInfo.cs" /> 122 <Compile Include="SupportVectorMachine\SupportVectorMachineUtil.cs"> 123 <SubType>Code</SubType> 124 </Compile> 125 <Compile Include="SupportVectorMachine\SupportVectorRegression.cs"> 126 <SubType>Code</SubType> 127 </Compile> 128 <Compile Include="SupportVectorMachine\SupportVectorRegressionModel.cs"> 129 <SubType>Code</SubType> 130 </Compile> 131 <Compile Include="SupportVectorMachine\SupportVectorRegressionSolution.cs"> 132 <SubType>Code</SubType> 133 </Compile> 122 134 </ItemGroup> 123 135 <ItemGroup> … … 154 166 <Name>HeuristicLab.ALGLIB-3.1.0 %28HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0%29</Name> 155 167 </ProjectReference> 168 <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.LibSVM\1.6.3\HeuristicLab.LibSVM-1.6.3\HeuristicLab.LibSVM-1.6.3.csproj"> 169 <Project>{89B50302-9CEE-4D13-9779-633EADCAE624}</Project> 170 <Name>HeuristicLab.LibSVM-1.6.3 %28HeuristicLab.ExtLibs\HeuristicLab.LibSVM\HeuristicLab.LibSVM-1.6.3\HeuristicLab.LibSVM-1.6.3%29</Name> 171 </ProjectReference> 172 <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.LibSVM\1.6.3\LibSVM-1.6.3\LibSVM-1.6.3.csproj"> 173 <Project>{A16F23B5-FB62-499E-A831-26953AA56FE2}</Project> 174 <Name>LibSVM-1.6.3</Name> 175 </ProjectReference> 156 176 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj"> 157 177 <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project> … … 173 193 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project> 174 194 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 195 </ProjectReference> 196 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj"> 197 <Project>{05BAE4E1-A9FA-4644-AA77-42558720159E}</Project> 198 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4</Name> 199 </ProjectReference> 200 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj"> 201 <Project>{5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}</Project> 202 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4</Name> 175 203 </ProjectReference> 176 204 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj"> -
branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs
r5617 r5624 32 32 using System.Collections.Generic; 33 33 using HeuristicLab.Problems.DataAnalysis.Symbolic; 34 using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression; 34 35 35 36 namespace HeuristicLab.Algorithms.DataAnalysis { … … 61 62 protected override void Run() { 62 63 double rmsError, cvRmsError; 63 IRegressionProblemData problemData = Problem.ProblemData; 64 int samplesStart = problemData.TrainingPartitionStart.Value; 65 int samplesEnd = problemData.TrainingPartitionEnd.Value; 66 IEnumerable<string> selectedInputVariables = problemData.InputVariables.CheckedItems.Select(x => x.Value); 67 var solution = CreateLinearRegressionSolution(problemData.Dataset, problemData.TargetVariable, selectedInputVariables, samplesStart, samplesEnd, out rmsError, out cvRmsError); 64 var solution = CreateLinearRegressionSolution(Problem.ProblemData, out rmsError, out cvRmsError); 68 65 Results.Add(new Result(LinearRegressionModelResultName, "The linear regression model.", solution)); 69 66 Results.Add(new Result("Root mean square error", "The root of the mean of squared errors of the linear regression model on the training set.", new DoubleValue(rmsError))); … … 71 68 } 72 69 73 public static ISymbolicExpressionTree CreateLinearRegressionSolution(Dataset dataset, string targetVariable, IEnumerable<string> allowedInputVariables, int start, int end, out double rmsError, out double cvRmsError) { 74 double[,] inputMatrix = LinearRegressionUtil.PrepareInputMatrix(dataset, targetVariable, allowedInputVariables, start, end); 70 public static ISymbolicRegressionSolution CreateLinearRegressionSolution(IRegressionProblemData problemData, out double rmsError, out double cvRmsError) { 71 Dataset dataset = problemData.Dataset; 72 string targetVariable = problemData.TargetVariable; 73 IEnumerable<string> allowedInputVariables = problemData.InputVariables.CheckedItems.Select(x => x.Value); 74 int samplesStart = problemData.TrainingPartitionStart.Value; 75 int samplesEnd = problemData.TrainingPartitionEnd.Value; 76 77 IEnumerable<string> selectedInputVariables = problemData.InputVariables.CheckedItems.Select(x => x.Value); 78 79 double[,] inputMatrix = LinearRegressionUtil.PrepareInputMatrix(dataset, targetVariable, allowedInputVariables, samplesStart, samplesEnd); 75 80 76 81 alglib.linearmodel lm = new alglib.linearmodel(); … … 107 112 addition.AddSubTree(cNode); 108 113 109 return tree; 114 SymbolicRegressionSolution solution = new SymbolicRegressionSolution(new SymbolicRegressionModel(tree, new SymbolicDataAnalysisExpressionTreeInterpreter()), problemData); 115 return solution; 110 116 } 111 117 #endregion -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj
r5618 r5624 120 120 <Compile Include="SingleObjective\SymbolicClassificationSingleObjectiveProblem.cs" /> 121 121 <Compile Include="SingleObjective\SymbolicClassificationSingleObjectiveTrainingBestSolutionAnalyzer.cs" /> 122 <Compile Include="SymbolicClassificationModel.cs" /> 123 <Compile Include="SymbolicClassificationSolution.cs" /> 122 124 <None Include="HeuristicLab.snk" /> 123 125 <None Include="HeuristicLabProblemsDataAnalysisSymbolicClassificationPlugin.cs.frame" /> -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Interfaces/ISymbolicClassificationModel.cs
r5557 r5624 22 22 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 23 23 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification { 24 public interface ISymbolicClassificationModel : I SymbolicDataAnalysisModel {24 public interface ISymbolicClassificationModel : IClassificationModel, ISymbolicDataAnalysisModel { 25 25 } 26 26 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Interfaces/ISymbolicClassificationSolution.cs
r5613 r5624 23 23 using HeuristicLab.Problems.DataAnalysis.Symbolic; 24 24 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification { 25 public interface ISymbolicClassificationSolution : I SymbolicDataAnalysisSolution {25 public interface ISymbolicClassificationSolution : IClassificationSolution, ISymbolicDataAnalysisSolution { 26 26 new ISymbolicClassificationModel Model { get; } 27 27 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs
r5618 r5624 51 51 } 52 52 53 public static double[] Calculate(ISymbolicDataAnalysis TreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {53 public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) { 54 54 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 55 55 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
r5618 r5624 30 30 } 31 31 32 public static double[] Calculate(ISymbolicDataAnalysis TreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {32 public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) { 33 33 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 34 34 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs
r5618 r5624 51 51 } 52 52 53 public static double Calculate(ISymbolicDataAnalysis TreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {53 public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) { 54 54 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 55 55 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs
r5613 r5624 51 51 } 52 52 53 public static double Calculate(ISymbolicDataAnalysis TreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {53 public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) { 54 54 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 55 55 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
r5618 r5624 108 108 </ItemGroup> 109 109 <ItemGroup> 110 <Compile Include="SymbolicRegressionModel.cs" /> 110 111 <Compile Include="Interfaces\ISymbolicRegressionModel.cs" /> 111 112 <Compile Include="Interfaces\ISymbolicRegressionProblem.cs" /> -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Interfaces/ISymbolicRegressionModel.cs
r5557 r5624 22 22 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 23 23 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 24 public interface ISymbolicRegressionModel : I SymbolicDataAnalysisModel {24 public interface ISymbolicRegressionModel : IRegressionModel, ISymbolicDataAnalysisModel { 25 25 } 26 26 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Interfaces/ISymbolicRegressionSolution.cs
r5613 r5624 23 23 using HeuristicLab.Problems.DataAnalysis.Symbolic; 24 24 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 25 public interface ISymbolicRegressionSolution : I SymbolicDataAnalysisSolution {25 public interface ISymbolicRegressionSolution : IRegressionSolution, ISymbolicDataAnalysisSolution { 26 26 new ISymbolicRegressionModel Model { get; } 27 27 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs
r5613 r5624 51 51 } 52 52 53 public static double[] Calculate(ISymbolicDataAnalysis TreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {53 public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) { 54 54 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 55 55 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
r5618 r5624 51 51 } 52 52 53 public static double[] Calculate(ISymbolicDataAnalysis TreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {53 public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) { 54 54 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 55 55 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs
r5618 r5624 51 51 } 52 52 53 public static double Calculate(ISymbolicDataAnalysis TreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {53 public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) { 54 54 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 55 55 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs
r5618 r5624 51 51 } 52 52 53 public static double Calculate(ISymbolicDataAnalysis TreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {53 public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) { 54 54 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 55 55 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs
r5607 r5624 32 32 using System; 33 33 34 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {34 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 35 35 /// <summary> 36 36 /// Represents a symbolic regression solution (model + data) and attributes of the solution like accuracy and complexity … … 38 38 [StorableClass] 39 39 [Item(Name = "SymbolicRegressionSolution", Description = "Represents a symbolic regression solution (model + data) and attributes of the solution like accuracy and complexity.")] 40 public class SymbolicRegressionSolution : SymbolicDataAnalysisSolution, IRegressionSolution { 41 #region properties 42 public new IRegressionModel Model { 43 get { throw new NotImplementedException(); } 40 public class SymbolicRegressionSolution : RegressionSolution, ISymbolicRegressionSolution { 41 #region ISymbolicRegressionSolution Members 42 43 public new ISymbolicRegressionModel Model { 44 get { return (ISymbolicRegressionModel)base.Model; } 44 45 } 45 46 public new IRegressionProblemData ProblemData { 47 get { throw new NotImplementedException(); } 48 } 49 50 public IEnumerable<double> EstimatedValues { 51 get { throw new NotImplementedException(); } 52 } 53 54 public IEnumerable<double> EstimatedTrainingValues { 55 get { throw new NotImplementedException(); } 56 } 57 58 public IEnumerable<double> EstimatedTestValues { 59 get { throw new NotImplementedException(); } 60 } 61 62 public IEnumerable<double> GetEstimatedValues(IEnumerable<int> rows) { 63 throw new NotImplementedException(); 46 ISymbolicDataAnalysisModel ISymbolicDataAnalysisSolution.Model { 47 get { return (ISymbolicDataAnalysisModel)base.Model; } 64 48 } 65 49 … … 71 55 : base(original, cloner) { 72 56 } 73 public SymbolicRegressionSolution( )74 : base( ) {57 public SymbolicRegressionSolution(ISymbolicRegressionModel model, IRegressionProblemData problemData) 58 : base(model, problemData) { 75 59 } 76 60 … … 78 62 return new SymbolicRegressionSolution(this, cloner); 79 63 } 80 81 protected override void OnModelChanged(EventArgs e) {82 base.OnModelChanged(e);83 }84 85 protected override void OnProblemDataChanged(EventArgs e) {86 base.OnProblemDataChanged(e);87 }88 64 } 89 65 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs
r5618 r5624 55 55 get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; } 56 56 } 57 public IValueLookupParameter<ISymbolicDataAnalysis TreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {58 get { return (IValueLookupParameter<ISymbolicDataAnalysis TreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }57 public IValueLookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter { 58 get { return (IValueLookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; } 59 59 } 60 60 public IValueLookupParameter<T> ProblemDataParameter { … … 88 88 get { return SymbolicExpressionTreeParameter.ActualValue; } 89 89 } 90 public ISymbolicDataAnalysis TreeInterpreter SymbolicDataAnalysisTreeInterpreter {90 public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicDataAnalysisTreeInterpreter { 91 91 get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; } 92 92 } … … 119 119 : base() { 120 120 Parameters.Add(new ValueLookupParameter<IRandom>(RandomParameterName, "The random generator to use.")); 121 Parameters.Add(new ValueLookupParameter<ISymbolicDataAnalysis TreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));121 Parameters.Add(new ValueLookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree.")); 122 122 Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic data analysis solution encoded as a symbolic expression tree.")); 123 123 Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated.")); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r5618 r5624 118 118 </Compile> 119 119 <Compile Include="Analyzers\SymbolicDataAnalysisVariableFrequencyAnalyzer.cs" /> 120 <Compile Include="Interfaces\ISymbolicDataAnalysisExpressionTreeInterpreter.cs" /> 120 121 <Compile Include="SymbolicDataAnalysisExpressionTreeCreator.cs" /> 122 <Compile Include="SymbolicDataAnalysisModel.cs"> 123 <SubType>Code</SubType> 124 </Compile> 121 125 <Compile Include="SymbolicDataAnalysisMultiObjectiveProblem.cs" /> 122 126 <Compile Include="Interfaces\ISymbolicDataAnalysisValidationAnalyzer.cs" /> … … 128 132 <Compile Include="Interfaces\ISymbolicDataAnalysisAnalyzer.cs" /> 129 133 <Compile Include="SymbolicDataAnalysisSingleObjectiveProblem.cs" /> 130 <Compile Include="SymbolicDataAnalysisSolution.cs" />131 134 <Compile Include="SymbolicDataAnalysisExpressionTreeInterpreter.cs" /> 132 135 <Compile Include="SymbolicDataAnalysisExpressionTreeSimplifier.cs" /> … … 181 184 <Compile Include="Interfaces\ISymbolicDataAnalysisSolution.cs" /> 182 185 <Compile Include="Interfaces\ISymbolicDataAnalysisSolutionCreator.cs" /> 183 <Compile Include="Interfaces\ISymbolicDataAnalysisTreeInterpreter.cs" />184 186 <Compile Include="Interfaces\ISymbolicDataAnalysisProblem.cs" /> 185 187 <Compile Include="Properties\AssemblyInfo.cs" /> -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisExpressionTreeInterpreter.cs
r5621 r5624 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 27 public interface ISymbolicDataAnalysis TreeInterpreter : INamedItem {27 public interface ISymbolicDataAnalysisExpressionTreeInterpreter : INamedItem { 28 28 IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows); 29 29 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisInterpreterOperator.cs
r5514 r5624 24 24 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 25 25 public interface ISymbolicDataAnalysisInterpreterOperator : IOperator { 26 IValueLookupParameter<ISymbolicDataAnalysis TreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter { get; }26 IValueLookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter { get; } 27 27 } 28 28 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisModel.cs
r5514 r5624 24 24 public interface ISymbolicDataAnalysisModel : IDataAnalysisModel { 25 25 ISymbolicExpressionTree SymbolicExpressionTree { get; } 26 ISymbolicDataAnalysis TreeInterpreter Interpreter { get; }26 ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get; } 27 27 } 28 28 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs
r5574 r5624 30 30 [StorableClass] 31 31 [Item("SymbolicDataAnalysisExpressionTreeInterpreter", "Interpreter for symbolic expression trees including automatically defined functions.")] 32 public sealed class SymbolicDataAnalysisExpressionTreeInterpreter : NamedItem, ISymbolicDataAnalysis TreeInterpreter {32 public sealed class SymbolicDataAnalysisExpressionTreeInterpreter : NamedItem, ISymbolicDataAnalysisExpressionTreeInterpreter { 33 33 private class InterpreterState { 34 34 private const int ARGUMENT_STACK_SIZE = 1024; -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r5623 r5624 75 75 get { return (IValueParameter<ISymbolicDataAnalysisGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; } 76 76 } 77 public IValueParameter<ISymbolicDataAnalysis TreeInterpreter> SymbolicExpressionTreeInterpreterParameter {78 get { return (IValueParameter<ISymbolicDataAnalysis TreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }77 public IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter { 78 get { return (IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; } 79 79 } 80 80 public IFixedValueParameter<DoubleValue> LowerEstimationLimitParameter { … … 114 114 set { SymbolicExpressionTreeGrammarParameter.Value = value; } 115 115 } 116 public ISymbolicDataAnalysis TreeInterpreter SymbolicExpressionTreeInterpreter {116 public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicExpressionTreeInterpreter { 117 117 get { return SymbolicExpressionTreeInterpreterParameter.Value; } 118 118 set { SymbolicExpressionTreeInterpreterParameter.Value = value; } … … 155 155 Parameters.Add(new ValueParameter<T>(ProblemDataParameterName, ProblemDataParameterDescription, problemData)); 156 156 Parameters.Add(new ValueParameter<ISymbolicDataAnalysisGrammar>(SymbolicExpressionTreeGrammarParameterName, SymbolicExpressionTreeGrammarParameterDescription)); 157 Parameters.Add(new ValueParameter<ISymbolicDataAnalysis TreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, SymoblicExpressionTreeInterpreterParameterDescription));157 Parameters.Add(new ValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, SymoblicExpressionTreeInterpreterParameterDescription)); 158 158 Parameters.Add(new FixedValueParameter<DoubleValue>(LowerEstimationLimitParameterName, LowerEstimationLimitParameterDescription, new DoubleValue())); 159 159 Parameters.Add(new FixedValueParameter<DoubleValue>(UpperEstimationLimitParameterName, UpperEstimationLimitParameterDescription, new DoubleValue())); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/Util.cs
r5574 r5624 79 79 } 80 80 81 public static double CalculateEvaluatedNodesPerSec(ISymbolicExpressionTree[] trees, ISymbolicDataAnalysis TreeInterpreter interpreter, Dataset dataset, int repetitions) {81 public static double CalculateEvaluatedNodesPerSec(ISymbolicExpressionTree[] trees, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset dataset, int repetitions) { 82 82 // warm up 83 83 IEnumerable<int> rows = Enumerable.Range(0, dataset.Rows); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClassificationSolution.cs
r5620 r5624 43 43 : base(original, cloner) { 44 44 } 45 public ClassificationSolution( )46 : base( ) {45 public ClassificationSolution(IClassificationModel model, IClassificationProblemData problemData) 46 : base(model, problemData) { 47 47 DoubleArray thresholds = new DoubleArray(); 48 48 Add(new Result(ThresholdsResultsName, "The threshold values for class boundaries.", thresholds)); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisSolution.cs
r5620 r5624 30 30 using HeuristicLab.Optimization; 31 31 using System; 32 using System.Drawing; 32 33 33 34 namespace HeuristicLab.Problems.DataAnalysis { … … 39 40 private const string ModelResultName = "Model"; 40 41 private const string ProblemDataResultName = "ProblemData"; 42 43 public override Image ItemImage { 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; } 45 } 46 41 47 #region properties 42 43 48 public IDataAnalysisModel Model { 44 49 get { return (IDataAnalysisModel)this[ModelResultName].Value; } 45 set {46 if (this[ModelResultName].Value != value) {47 if (value != null) {48 this[ModelResultName].Value = value;49 OnModelChanged(EventArgs.Empty);50 }51 }52 }50 //set { 51 // if (this[ModelResultName].Value != value) { 52 // if (value != null) { 53 // this[ModelResultName].Value = value; 54 // OnModelChanged(EventArgs.Empty); 55 // } 56 // } 57 //} 53 58 } 54 59 55 60 public IDataAnalysisProblemData ProblemData { 56 61 get { return (IDataAnalysisProblemData)this[ProblemDataResultName].Value; } 57 set { 58 if (this[ProblemDataResultName].Value != value) { 59 if (value != null) { 60 this[ProblemDataResultName].Value = value; 61 OnProblemDataChanged(EventArgs.Empty); 62 } 63 } 64 } 62 //set { 63 // if (this[ProblemDataResultName].Value != value) { 64 // if (value != null) { 65 // ProblemData.Changed -= new EventHandler(ProblemData_Changed); 66 // this[ProblemDataResultName].Value = value; 67 // ProblemData.Changed += new EventHandler(ProblemData_Changed); 68 // OnProblemDataChanged(EventArgs.Empty); 69 // } 70 // } 71 //} 65 72 } 66 73 #endregion … … 73 80 description = original.Description; 74 81 } 75 public DataAnalysisSolution( )82 public DataAnalysisSolution(IDataAnalysisModel model, IDataAnalysisProblemData problemData) 76 83 : base() { 77 84 name = string.Empty; 78 85 description = string.Empty; 79 Add(new Result(ModelResultName, "The symbolic data analysis model.", typeof(IDataAnalysisModel))); 80 Add(new Result(ProblemDataResultName, "The symbolic data analysis problem data.", typeof(IDataAnalysisProblemData))); 86 Add(new Result(ModelResultName, "The symbolic data analysis model.", model)); 87 Add(new Result(ProblemDataResultName, "The symbolic data analysis problem data.", problemData)); 88 89 problemData.Changed += new EventHandler(ProblemData_Changed); 90 } 91 92 private void ProblemData_Changed(object sender, EventArgs e) { 93 OnProblemDataChanged(e); 81 94 } 82 95 -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/RegressionSolution.cs
r5620 r5624 42 42 : base(original, cloner) { 43 43 } 44 public RegressionSolution( )45 : base( ) {44 public RegressionSolution(IRegressionModel model, IRegressionProblemData problemData) 45 : base(model, problemData) { 46 46 } 47 47
Note: See TracChangeset
for help on using the changeset viewer.