Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/19/18 13:27:06 (6 years ago)
Author:
mkommend
Message:

#2955: Added IsProblemDataCompatible and IsDatasetCompatible to all DataAnalysisModels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringModel.cs

    r15583 r16243  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    2324using System.Drawing;
     
    3435  [StorableClass]
    3536  [Item("KMeansClusteringModel", "Represents a k-Means clustering model.")]
    36   public sealed class KMeansClusteringModel : NamedItem, IClusteringModel {
     37  public sealed class KMeansClusteringModel : DataAnalysisModel, IClusteringModel {
    3738    public static new Image StaticItemImage {
    3839      get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; }
    3940    }
    4041
    41     public IEnumerable<string> VariablesUsedForPrediction {
     42    public override IEnumerable<string> VariablesUsedForPrediction {
    4243      get { return allowedInputVariables; }
    4344    }
     
    8485    }
    8586
     87    public override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) {
     88      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
     89      return IsDatasetCompatible(problemData.Dataset, out errorMessage);
     90    }
     91
    8692
    8793    public IEnumerable<int> GetClusterValues(IDataset dataset, IEnumerable<int> rows) {
Note: See TracChangeset for help on using the changeset viewer.