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/NeuralNetworkEnsembleModel.cs

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