- Timestamp:
- 09/25/15 14:39:59 (9 years ago)
- Location:
- branches/gteufl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gteufl
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 25 obj
-
- Property svn:mergeinfo changed
-
Property
svn:global-ignores
set to
*.nuget
packages
- Property svn:ignore
-
branches/gteufl/HeuristicLab.Problems.DataAnalysis.Trading/3.4/ProblemData.cs
r9989 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 1627 1627 } 1628 1628 1629 public ProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable )1630 : base(dataset, allowedInputVariables ) {1629 public ProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null) 1630 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) { 1631 1631 var variables = InputVariables.Select(x => x.AsReadOnly()).ToList(); 1632 1632 Parameters.Add(new ConstrainedValueParameter<StringValue>(PriceChangeVariableParameterName, new ItemSet<StringValue>(variables), variables.First(x => x.Value == targetVariable))); … … 1650 1650 OnChanged(); 1651 1651 } 1652 1653 public override void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) { 1654 var data = problemData as ProblemData; 1655 if (data == null) throw new ArgumentException("The problem data is not a problem data set for trading. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData"); 1656 1657 string errorMessage; 1658 if (!data.IsProblemDataCompatible(this, out errorMessage)) { 1659 throw new InvalidOperationException(errorMessage); 1660 } 1661 1662 base.AdjustProblemDataProperties(data); 1663 1664 var toDelete = PriceChangeVariableParameter.ValidValues.ToList(); 1665 foreach (var entry in data.PriceChangeVariableParameter.ValidValues) { 1666 if (toDelete.Any(x => x.Value == entry.Value)) { 1667 toDelete.RemoveAll(x => x.Value == entry.Value); 1668 } else { 1669 PriceChangeVariableParameter.ValidValues.Add(new StringValue(entry.Value)); 1670 } 1671 } 1672 PriceChangeVariableParameter.Value = 1673 PriceChangeVariableParameter.ValidValues.Single(v => v.Value == data.PriceChangeVariable); 1674 1675 foreach (var varToDelete in toDelete) PriceChangeVariableParameter.ValidValues.Remove(varToDelete); 1676 1677 TransactionCostsParameter.Value.Value = data.TransactionCosts; 1678 1679 OnChanged(); 1680 } 1652 1681 } 1653 1682 }
Note: See TracChangeset
for help on using the changeset viewer.