Changeset 11031 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs
- Timestamp:
- 06/20/14 17:08:41 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs
r10540 r11031 1621 1621 } 1622 1622 1623 protected override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) { 1624 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null."); 1625 ITimeSeriesPrognosisProblemData timeseriesProblemData = problemData as ITimeSeriesPrognosisProblemData; 1626 if (timeseriesProblemData == null) 1627 throw new ArgumentException("The problem data is not a time-series problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData"); 1628 1629 var returnValue = base.IsProblemDataCompatible(problemData, out errorMessage); 1630 //check targetVariable 1631 if (problemData.InputVariables.All(var => var.Value != TargetVariable)) { 1632 errorMessage = string.Format("The target variable {0} is not present in the new problem data.", TargetVariable) 1633 + Environment.NewLine + errorMessage; 1634 return false; 1635 } 1636 return returnValue; 1637 } 1638 1623 1639 public override void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) { 1624 1640 TimeSeriesPrognosisProblemData timeSeriesProblemData = problemData as TimeSeriesPrognosisProblemData; … … 1626 1642 throw new ArgumentException("The problem data is not a timeseries problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData"); 1627 1643 1644 var trainingDataStart = TrainingIndices.First(); 1645 1628 1646 base.AdjustProblemDataProperties(problemData); 1647 1648 TestPartition.Start = trainingDataStart; 1629 1649 1630 1650 TrainingHorizon = timeSeriesProblemData.TrainingHorizon;
Note: See TracChangeset
for help on using the changeset viewer.