- Timestamp:
- 10/19/08 00:07:51 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/AveragePercentageChangeEvaluator.cs
r656 r686 28 28 using HeuristicLab.GP.StructureIdentification; 29 29 30 namespace HeuristicLab.GP. TimeSeries {30 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { 31 31 public class AvergePercentageChangeEvaluator : GPEvaluatorBase { 32 32 protected DoubleData apc; -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/FunctionLibraryInjector.cs
r656 r686 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Core;23 using Core = HeuristicLab.Core; 24 24 using HeuristicLab.Data; 25 25 using HeuristicLab.Constraints; 26 using StructId = HeuristicLab.GP.StructureIdentification; 27 28 namespace HeuristicLab.GP.TimeSeries { 29 public class FunctionLibraryInjector : OperatorBase { 26 27 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { 28 public class FunctionLibraryInjector : Core.OperatorBase { 30 29 private const string TARGETVARIABLE = "TargetVariable"; 31 30 private const string AUTOREGRESSIVE = "Autoregressive"; … … 35 34 private const string FUNCTIONLIBRARY = "FunctionLibrary"; 36 35 37 private StructId.Variable variable;38 private StructId.Differential differential;36 private Variable variable; 37 private Differential differential; 39 38 private GPOperatorLibrary operatorLibrary; 40 39 … … 45 44 public FunctionLibraryInjector() 46 45 : base() { 47 AddVariableInfo(new VariableInfo(TARGETVARIABLE, "The target variable", typeof(IntData),VariableKind.In));48 AddVariableInfo(new VariableInfo(AUTOREGRESSIVE, "Switch to turn on/off autoregressive modeling (wether to allow the target variable as input)", typeof(BoolData),VariableKind.In));49 AddVariableInfo(new VariableInfo(ALLOWEDFEATURES, "List of indexes of allowed features", typeof(ItemList<IntData>),VariableKind.In));50 AddVariableInfo(new VariableInfo(MINTIMEOFFSET, "Minimal time offset for all features", typeof(IntData),VariableKind.In));51 AddVariableInfo(new VariableInfo(MAXTIMEOFFSET, "Maximal time offset for all feature", typeof(IntData),VariableKind.In));52 AddVariableInfo(new VariableInfo(FUNCTIONLIBRARY, "Preconfigured default operator library", typeof(GPOperatorLibrary),VariableKind.New));53 } 54 55 public override IOperation Apply(IScope scope) {46 AddVariableInfo(new Core.VariableInfo(TARGETVARIABLE, "The target variable", typeof(IntData), Core.VariableKind.In)); 47 AddVariableInfo(new Core.VariableInfo(AUTOREGRESSIVE, "Switch to turn on/off autoregressive modeling (wether to allow the target variable as input)", typeof(BoolData), Core.VariableKind.In)); 48 AddVariableInfo(new Core.VariableInfo(ALLOWEDFEATURES, "List of indexes of allowed features", typeof(ItemList<IntData>), Core.VariableKind.In)); 49 AddVariableInfo(new Core.VariableInfo(MINTIMEOFFSET, "Minimal time offset for all features", typeof(IntData), Core.VariableKind.In)); 50 AddVariableInfo(new Core.VariableInfo(MAXTIMEOFFSET, "Maximal time offset for all feature", typeof(IntData), Core.VariableKind.In)); 51 AddVariableInfo(new Core.VariableInfo(FUNCTIONLIBRARY, "Preconfigured default operator library", typeof(GPOperatorLibrary), Core.VariableKind.New)); 52 } 53 54 public override Core.IOperation Apply(Core.IScope scope) { 56 55 IntData minTimeOffset = GetVariableValue<IntData>(MINTIMEOFFSET, scope, true); 57 56 IntData maxTimeOffset = GetVariableValue<IntData>(MAXTIMEOFFSET, scope, true); … … 79 78 differential.SetConstraints(allowedIndexes, minTimeOffset.Data, maxTimeOffset.Data); 80 79 81 scope.AddVariable(new Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary));80 scope.AddVariable(new Core.Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary)); 82 81 return null; 83 82 } 84 83 85 84 private void InitDefaultOperatorLibrary() { 86 variable = new StructId.Variable();87 differential = new StructId.Differential();88 StructId.Constant constant = new StructId.Constant();89 90 StructId.Addition addition = new StructId.Addition();91 StructId.And and = new StructId.And();92 StructId.Average average = new StructId.Average();93 StructId.Cosinus cosinus = new StructId.Cosinus();94 StructId.Division division = new StructId.Division();95 StructId.Equal equal = new StructId.Equal();96 StructId.Exponential exponential = new StructId.Exponential();97 StructId.GreaterThan greaterThan = new StructId.GreaterThan();98 StructId.IfThenElse ifThenElse = new StructId.IfThenElse();99 StructId.LessThan lessThan = new StructId.LessThan();100 StructId.Logarithm logarithm = new StructId.Logarithm();101 StructId.Multiplication multiplication = new StructId.Multiplication();102 StructId.Not not = new StructId.Not();103 StructId.Or or = new StructId.Or();104 StructId.Power power = new StructId.Power();105 S tructId.Signum signum = new StructId.Signum();106 S tructId.Sinus sinus = new StructId.Sinus();107 S tructId.Sqrt sqrt = new StructId.Sqrt();108 S tructId.Subtraction subtraction = new StructId.Subtraction();109 StructId.Tangens tangens = new StructId.Tangens();110 StructId.Xor xor = new StructId.Xor();85 variable = new Variable(); 86 differential = new Differential(); 87 Constant constant = new Constant(); 88 89 Addition addition = new Addition(); 90 And and = new And(); 91 Average average = new Average(); 92 Cosinus cosinus = new Cosinus(); 93 Division division = new Division(); 94 Equal equal = new Equal(); 95 Exponential exponential = new Exponential(); 96 GreaterThan greaterThan = new GreaterThan(); 97 IfThenElse ifThenElse = new IfThenElse(); 98 LessThan lessThan = new LessThan(); 99 Logarithm logarithm = new Logarithm(); 100 Multiplication multiplication = new Multiplication(); 101 Not not = new Not(); 102 Or or = new Or(); 103 Power power = new Power(); 104 Signum signum = new Signum(); 105 Sinus sinus = new Sinus(); 106 Sqrt sqrt = new Sqrt(); 107 Subtraction subtraction = new Subtraction(); 108 Tangens tangens = new Tangens(); 109 Xor xor = new Xor(); 111 110 112 111 IFunction[] booleanFunctions = new IFunction[] { … … 189 188 190 189 private void SetAllowedSubOperators(IFunction f, IFunction[] gs) { 191 foreach( IConstraint c in f.Constraints) {190 foreach(Core.IConstraint c in f.Constraints) { 192 191 if(c is SubOperatorTypeConstraint) { 193 192 SubOperatorTypeConstraint typeConstraint = c as SubOperatorTypeConstraint; … … 207 206 208 207 private void SetAllowedSubOperators(IFunction f, int p, IFunction[] gs) { 209 foreach( IConstraint c in f.Constraints) {208 foreach(Core.IConstraint c in f.Constraints) { 210 209 if(c is SubOperatorTypeConstraint) { 211 210 SubOperatorTypeConstraint typeConstraint = c as SubOperatorTypeConstraint; -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/HeuristicLabGPTimeSeriesPlugin.cs
r656 r686 25 25 using HeuristicLab.PluginInfrastructure; 26 26 27 namespace HeuristicLab.GP. TimeSeries {27 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { 28 28 [ClassInfo(Name = "HeuristicLab.GP.StructureIdentification.TimeSeries-3.2")] 29 29 [PluginFile(Filename = "HeuristicLab.GP.StructureIdentification.TimeSeries-3.2.dll", Filetype = PluginFileType.Assembly)] -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/ProfitEvaluator.cs
r656 r686 28 28 using HeuristicLab.GP.StructureIdentification; 29 29 30 namespace HeuristicLab.GP. TimeSeries {30 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { 31 31 public class ProfitEvaluator : GPEvaluatorBase { 32 32 protected DoubleData profit; -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/TheilInequalityCoefficientEvaluator.cs
r656 r686 28 28 using HeuristicLab.GP.StructureIdentification; 29 29 30 namespace HeuristicLab.GP. TimeSeries {30 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { 31 31 public class TheilInequalityCoefficientEvaluator : GPEvaluatorBase { 32 32 private bool differential;
Note: See TracChangeset
for help on using the changeset viewer.