Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/27/11 16:30:49 (13 years ago)
Author:
mkommend
Message:

#1600: Added possibility to create classification solutions from classification models.

Location:
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitModel.cs

    r6576 r6604  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.IO;
    2524using System.Linq;
    26 using System.Text;
    2725using HeuristicLab.Common;
    2826using HeuristicLab.Core;
    2927using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3028using HeuristicLab.Problems.DataAnalysis;
    31 using SVM;
    3229
    3330namespace HeuristicLab.Algorithms.DataAnalysis {
     
    111108    }
    112109
     110    public MultinomialLogitClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
     111      return new MultinomialLogitClassificationSolution(problemData, this);
     112    }
     113    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
     114      return CreateClassificationSolution(problemData);
     115    }
     116
    113117    #region events
    114118    public event EventHandler Changed;
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs

    r6603 r6604  
    183183      return CreateRegressionSolution(problemData);
    184184    }
     185    public INearestNeighbourClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
     186      return new NearestNeighbourClassificationSolution(problemData, this);
     187    }
     188    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
     189      return CreateClassificationSolution(problemData);
     190    }
    185191
    186192    #region events
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleModel.cs

    r6603 r6604  
    150150      return CreateRegressionSolution(problemData);
    151151    }
     152    public INeuralNetworkEnsembleClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
     153      return new NeuralNetworkEnsembleClassificationSolution(problemData, this);
     154    }
     155    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
     156      return CreateClassificationSolution(problemData);
     157    }
    152158
    153159    #region events
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkModel.cs

    r6603 r6604  
    143143      return CreateRegressionSolution(problemData);
    144144    }
     145    public INeuralNetworkClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
     146      return new NeuralNetworkClassificationSolution(problemData, this);
     147    }
     148    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
     149      return CreateClassificationSolution(problemData);
     150    }
    145151
    146152    #region events
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs

    r6603 r6604  
    137137      return CreateRegressionSolution(problemData);
    138138    }
     139    public IRandomForestClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
     140      return new RandomForestClassificationSolution(problemData, this);
     141    }
     142    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
     143      return CreateClassificationSolution(problemData);
     144    }
    139145
    140146    #region events
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineModel.cs

    r6603 r6604  
    154154      }
    155155    }
     156
     157    public SupportVectorClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {
     158      return new SupportVectorClassificationSolution(this, problemData);
     159    }
     160    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
     161      return CreateClassificationSolution(problemData);
     162    }
    156163    #endregion
    157164    // cache for predictions, which is cloned but not persisted, must be cleared when the model is changed
Note: See TracChangeset for help on using the changeset viewer.