2 writes to TrainedEnsemble
Microsoft.ML.FastTree (2)
FastTree.cs (2)
2846TrainedEnsemble = trainedEnsemble; 2874TrainedEnsemble = new InternalTreeEnsemble(ctx, usingDefaultValues, categoricalSplits);
32 references to TrainedEnsemble
Microsoft.ML.FastTree (32)
FastTree.cs (20)
2791int ITreeEnsemble.NumTrees => TrainedEnsemble.NumTrees; 2875MaxSplitFeatIdx = TrainedEnsemble.GetMaxFeatureIndex(); 2905TrainedEnsemble.Save(ctx); 2928dst = (float)TrainedEnsemble.GetOutput(in src); 2956TrainedEnsemble.GetFeatureContributions(in src, ref dst, ref builder); 2984var ensembleIni = FastTreeIniFileUtils.TreeEnsembleToIni(Host, TrainedEnsemble, schema, calibrator, 2993return TrainedEnsemble.AsPfa(ctx, input); 3065foreach (var tree in TrainedEnsemble.Trees) 3148var gainMap = new FeatureToGainMap(TrainedEnsemble.Trees.ToList(), normalize: true); 3186foreach (InternalRegressionTree tree in TrainedEnsemble.Trees) 3237FeatureToGainMap gainMap = new FeatureToGainMap(TrainedEnsemble.Trees.ToList(), normalize: true); 3257return TrainedEnsemble.Trees.Select(k => new Tree(k)).ToArray(); 3263return (float)TrainedEnsemble.GetTreeAt(treeId).LeafValue(leafId); 3274return TrainedEnsemble.GetTreeAt(treeId).GetLeaf(in features, ref path); 3386var trees = TrainedEnsemble.Trees.Select(tree => new RegressionTree(tree)); 3387var treeWeights = TrainedEnsemble.Trees.Select(tree => tree.Weight); 3388return new RegressionTreeEnsemble(trees, treeWeights, TrainedEnsemble.Bias); 3432var trees = TrainedEnsemble.Trees.Select(tree => new QuantileRegressionTree((InternalQuantileRegressionTree)tree)); 3433var treeWeights = TrainedEnsemble.Trees.Select(tree => tree.Weight); 3434return new QuantileRegressionTreeEnsemble(trees, treeWeights, TrainedEnsemble.Bias);
RandomForestRegression.cs (4)
225var numTrees = ctx.AddInitializer((float)TrainedEnsemble.NumTrees, "NumTrees"); 240dst = (float)TrainedEnsemble.GetOutput(in src) / TrainedEnsemble.NumTrees; 250var distribution = TrainedEnsemble.GetDistribution(in src, _quantileSampleCount, out weights);
TreeEnsemble\TreeEnsembleCombiner.cs (1)
65foreach (var t in tree.TrainedEnsemble.Trees)
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;