Skip to content

Clarify documentation for GetFeatureWeights in TreeEnsembleModelParameters #3339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Microsoft.ML.FastTree/FastTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3229,10 +3229,10 @@ private void ToCSharp(InternalRegressionTree tree, TextWriter writer, int node,
}

/// <summary>
/// Copy the weights of all training features to <paramref name="weights"/>.
/// Get the cumulative split gains for each feature across all trees.
/// </summary>
/// <param name="weights">a <see cref="VBuffer{T}"/> where feature weights would be assigned to.
/// The i-th element in <paramref name="weights"/> stores the weight of the i-th feature.</param>
/// <param name="weights">A <see cref="VBuffer{T}"/> to hold the cumulative split gain value for each feature.
/// The i-th element in <paramref name="weights"/> stores the cumulative split gain of the i-th feature.</param>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @rogancarr! As discussed "weights" is a bit of an unfortunate word for "cumulative split gains," but it's probably too late to change the API at this point.

public void GetFeatureWeights(ref VBuffer<float> weights)
{
var numFeatures = Math.Max(NumFeatures, MaxSplitFeatIdx + 1);
Expand Down