Changeset 5577
- Timestamp:
- 03/01/11 12:04:53 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring
- Files:
-
- 3 added
- 17 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Interfaces/ISymbolicClassificationEvaluator.cs
r5509 r5577 21 21 22 22 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification { 23 public interface ISymbolicClassificationEvaluator : I ClassificationEvaluator, ISymbolicDataAnalysisEvaluator<IClassificationProblemData> {23 public interface ISymbolicClassificationEvaluator : ISymbolicDataAnalysisEvaluator<IClassificationProblemData> { 24 24 } 25 25 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
r5557 r5577 109 109 <ItemGroup> 110 110 <Compile Include="Interfaces\ISymbolicRegressionModel.cs" /> 111 <Compile Include="Interfaces\ISymbolicRegressionProblem.cs" /> 112 <Compile Include="Interfaces\ISymbolicRegressionSingleObjectiveProblem.cs" /> 111 113 <Compile Include="Interfaces\ISymbolicRegressionSolution.cs" /> 112 114 <Compile Include="Interfaces\ISymbolicRegressionEvaluator.cs" /> -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Interfaces/ISymbolicRegressionEvaluator.cs
r5509 r5577 22 22 23 23 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 24 public interface ISymbolicRegressionEvaluator : I RegressionEvaluator, ISymbolicDataAnalysisEvaluator<IRegressionProblemData> {24 public interface ISymbolicRegressionEvaluator : ISymbolicDataAnalysisEvaluator<IRegressionProblemData> { 25 25 } 26 26 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r5574 r5577 125 125 <Compile Include="SymbolicDataAnalysisExpressionTreeInterpreter.cs" /> 126 126 <Compile Include="SymbolicDataAnalysisExpressionTreeSimplifier.cs" /> 127 <Compile Include="SymbolicDataAnalysisProblem.cs" /> 127 128 <Compile Include="Symbols\Addition.cs" /> 128 129 <Compile Include="Symbols\And.cs" /> -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisBoundedEvaluator.cs
r5509 r5577 25 25 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 26 26 public interface ISymbolicDataAnalysisBoundedEvaluator<T> : ISymbolicDataAnalysisEvaluator<T> 27 where T : class,IDataAnalysisProblemData {27 where T : class,IDataAnalysisProblemData { 28 28 IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter { get; } 29 29 IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter { get; } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisEvaluator.cs
r5514 r5577 22 22 using HeuristicLab.Data; 23 23 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 24 using HeuristicLab.Optimization; 24 25 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 25 public interface ISymbolicDataAnalysisEvaluator<T> : I DataAnalysisEvaluator<T>26 where T : class,IDataAnalysisProblemData {26 public interface ISymbolicDataAnalysisEvaluator<T> : IEvaluator 27 where T : class,IDataAnalysisProblemData { 27 28 ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { get; } 28 29 IValueLookupParameter<IntValue> SamplesStartParameter { get; } 29 30 IValueLookupParameter<IntValue> SamplesEndParameter { get; } 31 32 IValueLookupParameter<T> ProblemDataParameter { get; } 33 T ProblemData { get; } 30 34 } 31 35 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisMultiObjectiveEvaluator.cs
r5509 r5577 26 26 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 27 27 public interface ISymbolicDataAnalysisMultiObjectiveEvaluator<T> : ISymbolicDataAnalysisEvaluator<T>, IMultiObjectiveEvaluator 28 where T : class,IDataAnalysisProblemData {28 where T : class,IDataAnalysisProblemData { 29 29 IEnumerable<bool> Maximization { get; } 30 30 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisProblem.cs
r5514 r5577 20 20 #endregion 21 21 22 using HeuristicLab.Optimization; 22 23 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 23 public interface ISymbolicDataAnalysisProblem<T> : IDataAnalysisProblem<T> 24 where T : class, IDataAnalysisProblemData { 25 ISymbolicDataAnalysisGrammar Grammar { get; } 26 new ISymbolicDataAnalysisEvaluator<T> Evaluator { get; } 27 new ISymbolicDataAnalysisSolutionCreator<T> SolutionCreator { get; } 24 public interface ISymbolicDataAnalysisProblem : IDataAnalysisProblem, IProblem { 25 ISymbolicDataAnalysisGrammar SymbolicExpressionTreeGrammar { get; } 28 26 } 29 27 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSingleObjectiveEvaluator.cs
r5509 r5577 24 24 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 25 25 public interface ISymbolicDataAnalysisSingleObjectiveEvaluator<T> : ISymbolicDataAnalysisEvaluator<T>, ISingleObjectiveEvaluator 26 where T : class,IDataAnalysisProblemData {26 where T : class,IDataAnalysisProblemData { 27 27 bool Maximization { get; } 28 28 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisSolutionCreator.cs
r5509 r5577 20 20 #endregion 21 21 22 using HeuristicLab.Core; 22 23 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 24 using HeuristicLab.Optimization; 23 25 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 24 public interface ISymbolicDataAnalysisSolutionCreator<T> : ISymbolicExpressionTreeCreator, IDataAnalysisSolutionCreator<T> 25 where T : class, IDataAnalysisProblemData { 26 public interface ISymbolicDataAnalysisSolutionCreator : ISymbolicExpressionTreeCreator, ISolutionCreator { 27 IParameter ProblemDataParameter { get; } 28 IDataAnalysisProblemData ProblemData { get; } 26 29 } 27 30 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisValidatingAnalyzer.cs
r5553 r5577 21 21 using HeuristicLab.Core; 22 22 using HeuristicLab.Data; 23 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;24 using HeuristicLab.Optimization;25 23 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 26 public interface ISymbolicDataAnalysisValidatingAnalyzer<T> : ISymbolicDataAnalysisAnalyzer where T : class, IDataAnalysisProblemData { 27 ILookupParameter<ISymbolicDataAnalysisEvaluator<T>> EvaluatorParameter { get; } 24 public interface ISymbolicDataAnalysisValidatingAnalyzer<T, U> : ISymbolicDataAnalysisAnalyzer 25 where T : class,ISymbolicDataAnalysisEvaluator<U> 26 where U : class, IDataAnalysisProblemData { 27 ILookupParameter<T> EvaluatorParameter { get; } 28 28 IValueLookupParameter<IntValue> ValidationSamplesStartParameter { get; } 29 29 IValueLookupParameter<IntValue> ValidationSamplesEndParameter { get; } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClassificationProblem.cs
r5561 r5577 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Linq;25 23 using HeuristicLab.Common; 26 24 using HeuristicLab.Core; 27 using HeuristicLab. Data;25 using HeuristicLab.Parameters; 28 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Optimization;30 using HeuristicLab.Parameters;31 27 32 28 namespace HeuristicLab.Problems.DataAnalysis { 33 29 [StorableClass] 34 [Item(" RegressionProblem", "")]30 [Item("ClassificationProblem", "")] 35 31 [Creatable] 36 public class RegressionProblem : DataAnalysisProblem<IRegressionProblemData>,37 I RegressionProblem {32 public class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>, 33 IClassificationProblem { 38 34 private const string ProblemDataParameterName = "ProblemData"; 39 #region properties 40 public new IDataAnalysisEvaluator<IRegressionProblemData> Evaluator { 41 get { throw new NotImplementedException(); } 42 } 43 44 public new IRegressionSolutionCreator SolutionCreator { 45 get { throw new NotImplementedException(); } 46 } 47 IDataAnalysisSolutionCreator<IRegressionProblemData> IDataAnalysisProblem<IRegressionProblemData>.SolutionCreator { 48 get { throw new NotImplementedException(); } 49 } 50 #endregion 51 52 public RegressionProblem(RegressionProblem original, Cloner cloner) 35 public ClassificationProblem(ClassificationProblem original, Cloner cloner) 53 36 : base(original, cloner) { 54 37 RegisterEventHandlers(); 55 38 } 56 39 [StorableConstructor] 57 public RegressionProblem(bool deserializing) : base(deserializing) { }58 public RegressionProblem()40 public ClassificationProblem(bool deserializing) : base(deserializing) { } 41 public ClassificationProblem() 59 42 : base() { 60 Parameters.Add(new ValueParameter<I RegressionProblemData>(ProblemDataParameterName, "", new RegressionProblemData()));43 Parameters.Add(new ValueParameter<IClassificationProblemData>(ProblemDataParameterName, "", new ClassificationProblemData())); 61 44 RegisterEventHandlers(); 62 45 } … … 68 51 69 52 public override IDeepCloneable Clone(Cloner cloner) { 70 return new RegressionProblem(this, cloner);53 return new ClassificationProblem(this, cloner); 71 54 } 72 55 … … 77 60 #region event propagation 78 61 private void Value_Changed(object sender, EventArgs e) { 79 OnReset();62 //OnReset(); 80 63 } 81 64 #endregion -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisProblem.cs
r5554 r5577 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 using HeuristicLab. Optimization;25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 27 27 28 namespace HeuristicLab.Problems.DataAnalysis { 28 29 [StorableClass] 29 public abstract class DataAnalysisProblem<T> : P roblem<IDataAnalysisEvaluator<T>, IDataAnalysisSolutionCreator<T>>,30 public abstract class DataAnalysisProblem<T> : ParameterizedNamedItem, 30 31 IDataAnalysisProblem<T> 31 32 where T : class, IDataAnalysisProblemData { 32 33 private const string ProblemDataParameterName = "ProblemData"; 34 private const string ProblemDataParameterDescription = ""; 33 35 #region parameter properties 34 36 IParameter IDataAnalysisProblem.ProblemDataParameter { … … 54 56 public DataAnalysisProblem() 55 57 : base() { 58 Parameters.Add(new ValueParameter<T>(ProblemDataParameterName, ProblemDataParameterDescription)); 59 } 60 61 private void RegisterEventHandlers() { 62 ProblemDataParameter.Value.Changed += new EventHandler(ProblemDataParameter_ValueChanged); 63 } 64 private void ProblemDataParameter_ValueChanged(object sender, EventArgs e) { 65 OnProblemDataChanged(); 66 OnReset(); 67 } 68 69 public event EventHandler ProblemDataChanged; 70 protected virtual void OnProblemDataChanged() { 71 var handler = ProblemDataChanged; 72 if (handler != null) handler(this, EventArgs.Empty); 73 } 74 75 public event EventHandler Reset; 76 protected virtual void OnReset() { 77 var handler = Reset; 78 if (handler != null) handler(this, EventArgs.Empty); 56 79 } 57 80 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r5559 r5577 109 109 <ItemGroup> 110 110 <Compile Include="ClassificationProblemData.cs" /> 111 <Compile Include="ClassificationProblem.cs" /> 111 112 <Compile Include="RegressionProblemData.cs" /> 112 113 <Compile Include="DataAnalysisProblemData.cs" /> … … 114 115 <Compile Include="DataAnalysisProblem.cs" /> 115 116 <Compile Include="Dataset.cs" /> 116 <Compile Include="Interfaces\Classification\IClassificationEvaluator.cs" />117 117 <Compile Include="Interfaces\Classification\IClassificationModel.cs" /> 118 118 <Compile Include="Interfaces\Classification\IClassificationProblem.cs" /> 119 119 <Compile Include="Interfaces\Classification\IClassificationProblemData.cs" /> 120 120 <Compile Include="Interfaces\Classification\IClassificationSolution.cs" /> 121 <Compile Include="Interfaces\Classification\IClassificationSolutionCreator.cs" />122 <Compile Include="Interfaces\IDataAnalysisEvaluator.cs" />123 121 <Compile Include="Interfaces\IDataAnalysisProblemData.cs" /> 124 122 <Compile Include="Interfaces\IDataAnalysisSolution.cs" /> 125 <Compile Include="Interfaces\IDataAnalysisSolutionCreator.cs" />126 123 <Compile Include="Interfaces\IOnlineEvaluator.cs" /> 127 <Compile Include="Interfaces\Regression\IRegressionEvaluator.cs" />128 124 <Compile Include="Interfaces\Regression\IRegressionModel.cs" /> 129 125 <Compile Include="Interfaces\Regression\IRegressionProblem.cs" /> 130 126 <Compile Include="Interfaces\Regression\IRegressionProblemData.cs" /> 131 127 <Compile Include="Interfaces\Regression\IRegressionSolution.cs" /> 132 <Compile Include="Interfaces\Regression\IRegressionSolutionCreator.cs" />133 128 <Compile Include="OnlineEvaluators\OnlineCovarianceEvaluator.cs" /> 134 129 <Compile Include="OnlineEvaluators\OnlineMeanAbsolutePercentageErrorEvaluator.cs" /> -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationProblem.cs
r5509 r5577 22 22 namespace HeuristicLab.Problems.DataAnalysis { 23 23 public interface IClassificationProblem : IDataAnalysisProblem<IClassificationProblemData> { 24 new IClassificationSolutionCreator SolutionCreator { get; }25 24 } 26 25 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblem.cs
r5554 r5577 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Core; 23 using HeuristicLab.Optimization;24 24 25 25 namespace HeuristicLab.Problems.DataAnalysis { 26 public interface IDataAnalysisProblem : I Problem {26 public interface IDataAnalysisProblem : IItem { 27 27 IParameter ProblemDataParameter { get; } 28 28 IDataAnalysisProblemData ProblemData { get; } 29 event EventHandler ProblemDataChanged; 29 30 } 30 31 … … 33 34 new IValueParameter<T> ProblemDataParameter { get; } 34 35 new T ProblemData { get; } 35 new IDataAnalysisEvaluator<T> Evaluator { get; }36 new IDataAnalysisSolutionCreator<T> SolutionCreator { get; }37 36 } 38 37 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblem.cs
r5509 r5577 22 22 namespace HeuristicLab.Problems.DataAnalysis { 23 23 public interface IRegressionProblem : IDataAnalysisProblem<IRegressionProblemData> { 24 new IRegressionSolutionCreator SolutionCreator { get; }25 24 } 26 25 } -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/RegressionProblem.cs
r5540 r5577 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 22 using HeuristicLab.Common; 26 23 using HeuristicLab.Core; 27 using HeuristicLab.Data;28 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Optimization;30 using HeuristicLab.Parameters;31 25 32 26 namespace HeuristicLab.Problems.DataAnalysis { … … 36 30 public class RegressionProblem : DataAnalysisProblem<IRegressionProblemData>, 37 31 IRegressionProblem { 38 private const string ProblemDataParameterName = "ProblemData";39 #region properties40 public new IDataAnalysisEvaluator<IRegressionProblemData> Evaluator {41 get { throw new NotImplementedException(); }42 }43 44 public new IRegressionSolutionCreator SolutionCreator {45 get { throw new NotImplementedException(); }46 }47 IDataAnalysisSolutionCreator<IRegressionProblemData> IDataAnalysisProblem<IRegressionProblemData>.SolutionCreator {48 get { throw new NotImplementedException(); }49 }50 #endregion51 52 32 public RegressionProblem(RegressionProblem original, Cloner cloner) 53 33 : base(original, cloner) { 54 RegisterEventHandlers();55 34 } 56 35 [StorableConstructor] … … 58 37 public RegressionProblem() 59 38 : base() { 60 Parameters.Add(new ValueParameter<IRegressionProblemData>(ProblemDataParameterName, "", new RegressionProblemData()));61 RegisterEventHandlers();62 39 } 63 40 64 41 [StorableHook(HookType.AfterDeserialization)] 65 42 private void AfterDeserialization() { 66 RegisterEventHandlers();67 43 } 68 44 … … 70 46 return new RegressionProblem(this, cloner); 71 47 } 72 73 private void RegisterEventHandlers() {74 ProblemDataParameter.Value.Changed += new EventHandler(Value_Changed);75 }76 77 #region event propagation78 private void Value_Changed(object sender, EventArgs e) {79 OnReset();80 }81 #endregion82 48 } 83 49 }
Note: See TracChangeset
for help on using the changeset viewer.