Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/25/15 18:21:19 (10 years ago)
Author:
dglaser
Message:

#2388: Merged trunk into HiveStatistics branch

Location:
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis

  • branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs

    r12012 r12515  
    6767    }
    6868
    69     public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(Dataset dataset, IEnumerable<int> rows) {
     69    public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(IDataset dataset, IEnumerable<int> rows) {
    7070      var estimatedValuesEnumerators = (from model in models
    7171                                        select model.GetEstimatedClassValues(dataset, rows).GetEnumerator())
     
    8282    #region IClassificationModel Members
    8383
    84     public IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
     84    public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
    8585      foreach (var estimatedValuesVector in GetEstimatedClassValueVectors(dataset, rows)) {
    8686        // return the class which is most often occuring
  • branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs

    r12012 r12515  
    3535  [StorableClass]
    3636  [Item("Classification Ensemble Solution", "A classification solution that contains an ensemble of multiple classification models")]
    37   [Creatable("Data Analysis - Ensembles")]
     37  [Creatable(CreatableAttribute.Categories.DataAnalysisEnsembles, Priority = 110)]
    3838  public sealed class ClassificationEnsembleSolution : ClassificationSolutionBase, IClassificationEnsembleSolution {
    3939    private readonly Dictionary<int, double> trainingEvaluationCache = new Dictionary<int, double>();
     
    231231    }
    232232
    233     public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(Dataset dataset, IEnumerable<int> rows) {
     233    public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(IDataset dataset, IEnumerable<int> rows) {
    234234      if (!Model.Models.Any()) yield break;
    235235      var estimatedValuesEnumerators = (from model in Model.Models
  • branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblem.cs

    r12012 r12515  
    2727  [StorableClass]
    2828  [Item("Classification Problem", "A general classification problem.")]
    29   [Creatable("Problems")]
    3029  public class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>, IClassificationProblem, IStorableContent {
    3130    public string Filename { get; set; }
  • branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs

    r12067 r12515  
    324324    }
    325325
    326     public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
     326    public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
    327327      : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
    328328      var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList();
     
    338338    }
    339339
    340     public static IEnumerable<string> CheckVariablesForPossibleTargetVariables(Dataset dataset) {
     340    public static IEnumerable<string> CheckVariablesForPossibleTargetVariables(IDataset dataset) {
    341341      int maxSamples = Math.Min(InspectedRowsToDetermineTargets, dataset.Rows);
    342342      var validTargetVariables = (from v in dataset.DoubleVariables
  • branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolution.cs

    r12012 r12515  
    3030  /// </summary>
    3131  [StorableClass]
    32   public abstract class ClassificationSolution : ClassificationSolutionBase {
     32  public class ClassificationSolution : ClassificationSolutionBase {
    3333    protected readonly Dictionary<int, double> evaluationCache;
    3434
     
    4646      evaluationCache = new Dictionary<int, double>(problemData.Dataset.Rows);
    4747      CalculateClassificationResults();
     48    }
     49
     50    public override IDeepCloneable Clone(Cloner cloner) {
     51      return new ClassificationSolution(this, cloner);
    4852    }
    4953
  • branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs

    r12012 r12515  
    111111
    112112
    113     public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
     113    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
    114114      return model.GetEstimatedValues(dataset, rows);
    115115    }
    116116
    117     public IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
     117    public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
    118118      if (!Thresholds.Any() && !ClassValues.Any()) throw new ArgumentException("No thresholds and class values were set for the current classification model.");
    119119      foreach (var x in GetEstimatedValues(dataset, rows)) {
Note: See TracChangeset for help on using the changeset viewer.