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/SupportVectorMachine/SupportVectorMachineModel.cs

    r16160 r17054  
    126126      return new SupportVectorRegressionSolution(this, new RegressionProblemData(problemData));
    127127    }
    128     #endregion
     128
     129    public bool IsProblemDataCompatible(IRegressionProblemData problemData, out string errorMessage) {
     130      return RegressionModel.IsProblemDataCompatible(this, problemData, out errorMessage);
     131    }
     132    #endregion
     133
     134    public override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) {
     135      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
     136
     137      var regressionProblemData = problemData as IRegressionProblemData;
     138      if (regressionProblemData != null)
     139        return IsProblemDataCompatible(regressionProblemData, out errorMessage);
     140
     141      var classificationProblemData = problemData as IClassificationProblemData;
     142      if (classificationProblemData != null)
     143        return IsProblemDataCompatible(classificationProblemData, out errorMessage);
     144
     145      throw new ArgumentException("The problem data is not compatible with this SVM. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
     146    }
    129147
    130148    #region IClassificationModel Members
     
    153171    }
    154172    #endregion
     173
    155174    private IEnumerable<double> GetEstimatedValuesHelper(IDataset dataset, IEnumerable<int> rows) {
    156175      // calculate predictions for the currently requested rows
Note: See TracChangeset for help on using the changeset viewer.