52 references to NumTrees
Microsoft.ML.FastTree (52)
BoostingFastTree.cs (2)
149bestIteration = Ensemble.NumTrees; 156int bestIteration = Ensemble.NumTrees;
FastTree.cs (12)
242bestIteration = Ensemble.NumTrees; 245private protected virtual int GetBestIteration(IChannel ch) => Ensemble.NumTrees; 330if (Ensemble.NumTrees == 0) 614if (Ensemble.NumTrees < numTotalTrees && ShouldRandomStartOptimizer()) 648pch.SetHeader(new ProgressHeader("trees"), e => e.SetProgress(0, Ensemble.NumTrees, numTotalTrees)); 649while (Ensemble.NumTrees < numTotalTrees) 661if (FastTreeTrainerOptions.BaggingSize > 0 && Ensemble.NumTrees % FastTreeTrainerOptions.BaggingSize == 0) 751Ensemble.NumTrees, bestIteration); 791int iteration = Ensemble.NumTrees; 798if (FastTreeTrainerOptions.TestFrequency != int.MaxValue && (Ensemble.NumTrees % FastTreeTrainerOptions.TestFrequency == 0 || Ensemble.NumTrees == FastTreeTrainerOptions.NumberOfTrees)) 2791int ITreeEnsemble.NumTrees => TrainedEnsemble.NumTrees;
FastTreeRanking.cs (3)
354lineBuilder.AppendFormat("Eval:\tnet.{0:D8}.ini", Ensemble.NumTrees - 1); 399double[] trainOutputs = Ensemble.GetTreeAt(Ensemble.NumTrees - 1).GetOutputs(TrainSet); 400_ensembleCompressor.SetTreeScores(Ensemble.NumTrees - 1, trainOutputs);
FastTreeRegression.cs (1)
377lineBuilder.AppendFormat("Eval:\tnet.{0:D8}.ini", Ensemble.NumTrees - 1);
FastTreeTweedie.cs (1)
313lineBuilder.AppendFormat("Eval:\tnet.{0:D8}.ini", Ensemble.NumTrees - 1);
RandomForestRegression.cs (2)
225var numTrees = ctx.AddInitializer((float)TrainedEnsemble.NumTrees, "NumTrees"); 240dst = (float)TrainedEnsemble.GetOutput(in src) / TrainedEnsemble.NumTrees;
Training\BaggingProvider.cs (1)
81for (int t = 0; t < ensemble.NumTrees; t++)
Training\OptimizationAlgorithms\AcceleratedGradientDescent.cs (5)
48for (int t = 0; t < Ensemble.NumTrees - 1; t++) 50Ensemble.GetTreeAt(t).ScaleOutputsBy(AgdScoreTracker.TreeMultiplier(t, Ensemble.NumTrees) / AgdScoreTracker.TreeMultiplier(t, Ensemble.NumTrees - 1)); 63if (bestIteration != Ensemble.NumTrees) 68Ensemble.GetTreeAt(t).ScaleOutputsBy(AgdScoreTracker.TreeMultiplier(t, bestIteration) / AgdScoreTracker.TreeMultiplier(t, Ensemble.NumTrees));
Training\OptimizationAlgorithms\GradientDescent.cs (1)
48int numberOfTrees = Ensemble.NumTrees;
Training\OptimizationAlgorithms\OptimizationAlgorithm.cs (1)
120if (bestIteration != Ensemble.NumTrees)
TreeEnsemble\InternalTreeEnsemble.cs (16)
68writer.Write(NumTrees); 79public void RemoveAfter(int index) => _trees.RemoveRange(index, NumTrees - index); 89for (int i = 0; i < NumTrees; i++) 105for (int i = 0; i < NumTrees; i++) 131for (int w = 0; w < NumTrees; ++w) 149if (NumTrees > 0) 155for (int w = 1; w < NumTrees; ++w) 167if (NumTrees > 0) 174for (int w = 1; w < NumTrees; ++w) 191var gainSummary = ToGainSummary(fmap, featureToID, NumTrees, includeZeroGainFeatures, 253for (int h = 0; h < NumTrees; h++) 261for (int h = 0; h < NumTrees; h++) 268var distribution = new float[sampleCount * NumTrees]; 271weights = new float[sampleCount * NumTrees]; 275for (int h = 0; h < NumTrees; h++) 368for (int i = 0; i < NumTrees; i++)
TreeEnsembleFeaturizer.cs (7)
118var treeValueType = new VectorDataViewType(NumberDataViewType.Single, owner._ensemble.TrainedEnsemble.NumTrees); 129var pathIdType = new VectorDataViewType(NumberDataViewType.Single, owner._totalLeafCount - owner._ensemble.TrainedEnsemble.NumTrees); 249_ectx.Assert(ensemble.TrainedEnsemble.NumTrees > 0); 252_numTrees = _ensemble.TrainedEnsemble.NumTrees; 476var numTrees = _ensemble.TrainedEnsemble.NumTrees; 487var numTrees = _ensemble.TrainedEnsemble.NumTrees; 504var numTrees = _ensemble.TrainedEnsemble.NumTrees;