Changeset 1856 for trunk/sources/HeuristicLab.Modeling
- Timestamp:
- 05/20/09 10:09:59 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Modeling/3.2
- Files:
-
- 2 added
- 1 edited
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Modeling/3.2
- Property svn:ignore
-
old new 1 1 bin 2 2 obj 3 *.user
-
- Property svn:ignore
-
trunk/sources/HeuristicLab.Modeling/3.2/ClassificationProblemInjector.cs
r1854 r1856 24 24 using System.Text; 25 25 using System.Xml; 26 using Core =HeuristicLab.Core;26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 28 29 namespace HeuristicLab. GP.StructureIdentification.Classification{30 public class ProblemInjector : HeuristicLab.GP.StructureIdentification.ProblemInjector {29 namespace HeuristicLab.Modeling { 30 public class ClassificationProblemInjector : ProblemInjector { 31 31 32 32 public override string Description { 33 33 get { 34 return "Problem injector for classification structure identification.";34 return "Problem injector for classification problems."; 35 35 } 36 36 } 37 37 38 public ProblemInjector()38 public ClassificationProblemInjector() 39 39 : base() { 40 40 AddVariableInfo(new Core.VariableInfo("TargetClassValues", "TargetClassValues", typeof(ItemList<DoubleData>), Core.VariableKind.New)); -
trunk/sources/HeuristicLab.Modeling/3.2/ProblemInjector.cs
r1854 r1856 24 24 using System.Text; 25 25 using System.Xml; 26 using Core =HeuristicLab.Core;26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Operators;29 28 using HeuristicLab.DataAnalysis; 30 29 31 namespace HeuristicLab. GP.StructureIdentification{32 public class ProblemInjector : Core.OperatorBase {30 namespace HeuristicLab.Modeling { 31 public class ProblemInjector : OperatorBase { 33 32 public override string Description { 34 get { return @"Injects the necessary variables for a structure identificationproblem."; }33 get { return @"Injects the necessary variables for a data-based modeling problem."; } 35 34 } 36 35 37 36 public ProblemInjector() 38 37 : base() { 39 AddVariableInfo(new Core.VariableInfo("Dataset", "Dataset", typeof(Dataset), Core.VariableKind.New));38 AddVariableInfo(new VariableInfo("Dataset", "Dataset", typeof(Dataset), VariableKind.New)); 40 39 GetVariableInfo("Dataset").Local = true; 41 AddVariable(new Core.Variable("Dataset", new Dataset()));40 AddVariable(new Variable("Dataset", new Dataset())); 42 41 43 AddVariableInfo(new Core.VariableInfo("TargetVariable", "TargetVariable", typeof(IntData), Core.VariableKind.New));42 AddVariableInfo(new VariableInfo("TargetVariable", "TargetVariable", typeof(IntData), VariableKind.New)); 44 43 GetVariableInfo("TargetVariable").Local = true; 45 AddVariable(new Core.Variable("TargetVariable", new IntData()));44 AddVariable(new Variable("TargetVariable", new IntData())); 46 45 47 AddVariableInfo(new Core.VariableInfo("AllowedFeatures", "Indexes of allowed input variables", typeof(ItemList<IntData>), Core.VariableKind.New));46 AddVariableInfo(new VariableInfo("AllowedFeatures", "Indexes of allowed input variables", typeof(ItemList<IntData>), VariableKind.New)); 48 47 GetVariableInfo("AllowedFeatures").Local = true; 49 AddVariable(new Core.Variable("AllowedFeatures", new ItemList<IntData>()));48 AddVariable(new Variable("AllowedFeatures", new ItemList<IntData>())); 50 49 51 AddVariableInfo(new Core.VariableInfo("TrainingSamplesStart", "TrainingSamplesStart", typeof(IntData), Core.VariableKind.New));50 AddVariableInfo(new VariableInfo("TrainingSamplesStart", "TrainingSamplesStart", typeof(IntData), VariableKind.New)); 52 51 GetVariableInfo("TrainingSamplesStart").Local = true; 53 AddVariable(new Core.Variable("TrainingSamplesStart", new IntData()));52 AddVariable(new Variable("TrainingSamplesStart", new IntData())); 54 53 55 AddVariableInfo(new Core.VariableInfo("TrainingSamplesEnd", "TrainingSamplesEnd", typeof(IntData), Core.VariableKind.New));54 AddVariableInfo(new VariableInfo("TrainingSamplesEnd", "TrainingSamplesEnd", typeof(IntData), VariableKind.New)); 56 55 GetVariableInfo("TrainingSamplesEnd").Local = true; 57 AddVariable(new Core.Variable("TrainingSamplesEnd", new IntData()));56 AddVariable(new Variable("TrainingSamplesEnd", new IntData())); 58 57 59 AddVariableInfo(new Core.VariableInfo("ValidationSamplesStart", "ValidationSamplesStart", typeof(IntData), Core.VariableKind.New));58 AddVariableInfo(new VariableInfo("ValidationSamplesStart", "ValidationSamplesStart", typeof(IntData), VariableKind.New)); 60 59 GetVariableInfo("ValidationSamplesStart").Local = true; 61 AddVariable(new Core.Variable("ValidationSamplesStart", new IntData()));60 AddVariable(new Variable("ValidationSamplesStart", new IntData())); 62 61 63 AddVariableInfo(new Core.VariableInfo("ValidationSamplesEnd", "ValidationSamplesEnd", typeof(IntData), Core.VariableKind.New));62 AddVariableInfo(new VariableInfo("ValidationSamplesEnd", "ValidationSamplesEnd", typeof(IntData), VariableKind.New)); 64 63 GetVariableInfo("ValidationSamplesEnd").Local = true; 65 AddVariable(new Core.Variable("ValidationSamplesEnd", new IntData()));64 AddVariable(new Variable("ValidationSamplesEnd", new IntData())); 66 65 67 AddVariableInfo(new Core.VariableInfo("TestSamplesStart", "TestSamplesStart", typeof(IntData), Core.VariableKind.New));66 AddVariableInfo(new VariableInfo("TestSamplesStart", "TestSamplesStart", typeof(IntData), VariableKind.New)); 68 67 GetVariableInfo("TestSamplesStart").Local = true; 69 AddVariable(new Core.Variable("TestSamplesStart", new IntData()));68 AddVariable(new Variable("TestSamplesStart", new IntData())); 70 69 71 AddVariableInfo(new Core.VariableInfo("TestSamplesEnd", "TestSamplesEnd", typeof(IntData), Core.VariableKind.New));70 AddVariableInfo(new VariableInfo("TestSamplesEnd", "TestSamplesEnd", typeof(IntData), VariableKind.New)); 72 71 GetVariableInfo("TestSamplesEnd").Local = true; 73 AddVariable(new Core.Variable("TestSamplesEnd", new IntData()));72 AddVariable(new Variable("TestSamplesEnd", new IntData())); 74 73 } 75 74 76 public override Core.IView CreateView() {75 public override IView CreateView() { 77 76 return new ProblemInjectorView(this); 78 77 } 79 78 80 public override Core.IOperation Apply(Core.IScope scope) {81 foreach( Core.VariableInfo info in VariableInfos) {79 public override IOperation Apply(IScope scope) { 80 foreach(VariableInfo info in VariableInfos) { 82 81 if(info.Local) { 83 Core.IVariable var = GetVariable(info.FormalName);84 if(var != null) scope.AddVariable(new Core.Variable(info.ActualName, (Core.IItem)var.Value.Clone()));82 IVariable var = GetVariable(info.FormalName); 83 if(var != null) scope.AddVariable(new Variable(info.ActualName, (IItem)var.Value.Clone())); 85 84 } 86 85 } -
trunk/sources/HeuristicLab.Modeling/3.2/ProblemInjectorView.Designer.cs
r1854 r1856 20 20 #endregion 21 21 22 namespace HeuristicLab. GP.StructureIdentification{22 namespace HeuristicLab.Modeling { 23 23 partial class ProblemInjectorView { 24 24 /// <summary> -
trunk/sources/HeuristicLab.Modeling/3.2/ProblemInjectorView.cs
r1854 r1856 29 29 using HeuristicLab.Core; 30 30 using HeuristicLab.Data; 31 using HeuristicLab.Operators;32 31 using HeuristicLab.DataAnalysis; 33 32 34 namespace HeuristicLab. GP.StructureIdentification{33 namespace HeuristicLab.Modeling { 35 34 public partial class ProblemInjectorView : ViewBase { 36 35 public ProblemInjector ProblemInjector { -
trunk/sources/HeuristicLab.Modeling/3.2/TimeSeriesProblemInjector.cs
r1854 r1856 24 24 using System.Text; 25 25 using System.Xml; 26 using Core =HeuristicLab.Core;26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Operators;29 28 using HeuristicLab.DataAnalysis; 30 29 31 namespace HeuristicLab. GP.StructureIdentification.TimeSeries{32 public class ProblemInjector : HeuristicLab.GP.StructureIdentification.ProblemInjector {30 namespace HeuristicLab.Modeling { 31 public class TimeSeriesProblemInjector : ProblemInjector { 33 32 34 33 public override string Description { 35 34 get { 36 return "Problem injector for time series structure identification.";35 return "Problem injector for time series problems."; 37 36 } 38 37 } 39 38 40 public ProblemInjector()39 public TimeSeriesProblemInjector() 41 40 : base() { 42 41 AddVariableInfo(new Core.VariableInfo("Autoregressive", "Autoregressive modelling includes previous values of the target variable to predict future values.", typeof(BoolData), Core.VariableKind.New));
Note: See TracChangeset
for help on using the changeset viewer.