Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/04/19 13:00:24 (5 years ago)
Author:
mkommend
Message:

#2955: Merged r16241, r16243, r16244, r16763 into stable.

Location:
stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Algorithms.DataAnalysis

  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4

  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkModel.cs

    r16387 r17054  
    134134    }
    135135
     136    public bool IsProblemDataCompatible(IRegressionProblemData problemData, out string errorMessage) {
     137      return RegressionModel.IsProblemDataCompatible(this, problemData, out errorMessage);
     138    }
     139
     140    public override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) {
     141      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
     142
     143      var regressionProblemData = problemData as IRegressionProblemData;
     144      if (regressionProblemData != null)
     145        return IsProblemDataCompatible(regressionProblemData, out errorMessage);
     146
     147      var classificationProblemData = problemData as IClassificationProblemData;
     148      if (classificationProblemData != null)
     149        return IsProblemDataCompatible(classificationProblemData, out errorMessage);
     150
     151      throw new ArgumentException("The problem data is not compatible with this neural network. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
     152    }
     153
    136154    public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    137155      return new NeuralNetworkRegressionSolution(this, new RegressionProblemData(problemData));
Note: See TracChangeset for help on using the changeset viewer.