Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/05/19 11:14:32 (5 years ago)
Author:
gkronber
Message:

#2847: more changes for renaming the M5 plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Algorithms.DataAnalysis.DecisionTrees/3.4/DecisionTreeRegression.cs

    r17080 r17081  
    145145      Parameters.Add(new FixedValueParameter<BoolValue>(GenerateRulesParameterName, "Whether a set of rules or a decision tree shall be created (default=false)", new BoolValue(false)));
    146146      Parameters.Add(new FixedValueParameter<PercentValue>(HoldoutSizeParameterName, "How much of the training set shall be reserved for pruning (default=20%).", new PercentValue(0.2)));
    147       Parameters.Add(new ConstrainedValueParameter<ISplitter>(SplitterParameterName, "The type of split function used to create node splits (default='Splitter').", splitterSet, splitterSet.OfType<M5Splitter>().First()));
     147      Parameters.Add(new ConstrainedValueParameter<ISplitter>(SplitterParameterName, "The type of split function used to create node splits (default='Splitter').", splitterSet, splitterSet.OfType<Splitter>().First()));
    148148      Parameters.Add(new FixedValueParameter<IntValue>(MinimalNodeSizeParameterName, "The minimal number of samples in a leaf node (default=1).", new IntValue(1)));
    149149      Parameters.Add(new ConstrainedValueParameter<ILeafModel>(LeafModelParameterName, "The type of model used for the nodes (default='LinearLeaf').", modelSet, modelSet.OfType<LinearLeaf>().First()));
     
    178178      bool useHoldout = false, double holdoutSize = 0.2, int minimumLeafSize = 1, bool generateRules = false, ResultCollection results = null, CancellationToken? cancellationToken = null) {
    179179      if (leafModel == null) leafModel = new LinearLeaf();
    180       if (splitter == null) splitter = new M5Splitter();
     180      if (splitter == null) splitter = new Splitter();
    181181      if (cancellationToken == null) cancellationToken = CancellationToken.None;
    182182      if (pruning == null) pruning = new ComplexityPruning();
     
    187187    }
    188188
    189     public static void UpdateModel(IM5Model model, IRegressionProblemData problemData, IRandom random, ILeafModel leafModel, CancellationToken? cancellationToken = null) {
     189    public static void UpdateModel(IDecisionTreeModel model, IRegressionProblemData problemData, IRandom random, ILeafModel leafModel, CancellationToken? cancellationToken = null) {
    190190      if (cancellationToken == null) cancellationToken = CancellationToken.None;
    191191      var regressionTreeParameters = new RegressionTreeParameters(leafModel, problemData, random);
     
    244244    private static IRegressionModel Build(IScope stateScope, ResultCollection results, CancellationToken cancellationToken) {
    245245      var regressionTreeParams = (RegressionTreeParameters)stateScope.Variables[RegressionTreeParameterVariableName].Value;
    246       var model = (IM5Model)stateScope.Variables[ModelVariableName].Value;
     246      var model = (IDecisionTreeModel)stateScope.Variables[ModelVariableName].Value;
    247247      var trainingRows = (IntArray)stateScope.Variables[TrainingSetVariableName].Value;
    248248      var pruningRows = (IntArray)stateScope.Variables[PruningSetVariableName].Value;
Note: See TracChangeset for help on using the changeset viewer.