Skip to content
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

contrib/boosted_trees: minor spelling tweaks #17732

Merged
merged 1 commit into from
Mar 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion tensorflow/contrib/boosted_trees/kernels/quantile_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class CreateQuantileAccumulatorOp : public OpKernel {
private:
float epsilon_;
int32 num_quantiles_;
// An upperbound on the number of enteries that the summaries might have
// An upper bound on the number of entries that the summaries might have
// for a feature.
int64 max_elements_;
bool generate_quantiles_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Status BatchFeatures::Initialize(
TF_CHECK_AND_RETURN_IF_ERROR(
dense_float_feature.dim_size(1) == 1,
errors::InvalidArgument(
"Dense float features may not be multi-valent: dim_size(1) = ",
"Dense float features may not be multivalent: dim_size(1) = ",
dense_float_feature.dim_size(1)));
dense_float_feature_columns_.emplace_back(dense_float_feature);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TEST_F(BatchFeaturesTest, DenseFloatFeatures_Multivalent) {
BatchFeatures batch_features(1);
auto dense_vec = AsTensor<float>({3.0f, 7.0f}, {1, 2});
auto expected_error = InvalidArgument(
"Dense float features may not be multi-valent: dim_size(1) = 2");
"Dense float features may not be multivalent: dim_size(1) = 2");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

test fixed here

EXPECT_EQ(expected_error,
batch_features.Initialize({dense_vec}, {}, {}, {}, {}, {}, {}));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Status DropoutUtils::DropOutTrees(
if (probability_of_skipping_dropout < 0 ||
probability_of_skipping_dropout > 1) {
return errors::InvalidArgument(
"Probability of skiping dropout must be in [0,1] range");
"Probability of skipping dropout must be in [0,1] range");
}
const auto num_trees = weights.size();

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/contrib/boosted_trees/lib/utils/dropout_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class DropoutUtils {
// Current weights and num_updates will be updated as a result of this
// func
std::vector<float>* current_weights,
// How many weight assignements have been done for each tree already.
// How many weight assignments have been done for each tree already.
std::vector<int32>* num_updates);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TEST_F(SparseColumnIterableTest, Empty) {
}

TEST_F(SparseColumnIterableTest, Iterate) {
// 8 examples having 7 sparse features with the 3rd and 7th multi-valent.
// 8 examples having 7 sparse features with the 3rd and 7th multivalent.
// This can be visualized like the following:
// Instance | Sparse |
// 0 | x |
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/contrib/boosted_trees/proto/tree_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ message DenseFloatBinarySplit {
// Float feature column and split threshold describing
// the rule feature <= threshold.
int32 feature_column = 1;
// If feature column is multivalent, this holds the index of the dimensiong
// If feature column is multivalent, this holds the index of the dimension
// for the split. Defaults to 0.
int32 dimension_id = 5;
float threshold = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ def setUp(self):
"""Sets up the prediction tests.

Create a batch of two examples having one dense float, two sparse float
single valued, one sparse float multidimensionl and one sparse int features.
The data looks like the following:
single valued, one sparse float multidimensional and one sparse int
features. The data looks like the following:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@frankchn tweaked, thanks!

| Instance | Dense0 | SparseF0 | SparseF1 | SparseI0 | SparseM
| 0 | 7 | -3 | | 9,1 | __, 5.0
| 1 | -2 | | 4 | | 3, ___
Expand Down Expand Up @@ -810,7 +810,7 @@ def testDropoutCenterBiasWithGrowingMeta(self):
# building. This tree should never be dropped.
num_trees = 10
with self.test_session():
# Empty tree ensenble.
# Empty tree ensemble.
tree_ensemble_config = tree_config_pb2.DecisionTreeEnsembleConfig()
# Add 10 trees with some weights.
for i in range(0, num_trees):
Expand Down Expand Up @@ -951,7 +951,7 @@ def testDropoutSeed(self):

def testDropOutZeroProb(self):
with self.test_session():
# Empty tree ensenble.
# Empty tree ensemble.
tree_ensemble_config = tree_config_pb2.DecisionTreeEnsembleConfig()
# Add 1000 trees with some weights.
for i in range(0, 999):
Expand Down Expand Up @@ -994,7 +994,7 @@ def testDropOutZeroProb(self):

def testAveragingAllTrees(self):
with self.test_session():
# Empty tree ensenble.
# Empty tree ensemble.
tree_ensemble_config = tree_config_pb2.DecisionTreeEnsembleConfig()
adjusted_tree_ensemble_config = (
tree_config_pb2.DecisionTreeEnsembleConfig())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def setUp(self):
"""Sets up the quantile op tests.

Create a batch of 4 examples having 2 dense and 4 sparse features.
Forth sparse feature is multivalent (3 dimensional)
Fourth sparse feature is multivalent (3 dimensional)
The data looks like this
| Instance | Dense 0 | Dense 1 | Sparse 0 | Sparse 1 |Sparse 2| SparseM
| 0 | -0.1 | -1 | -2 | 0.1 | |_ ,1,_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def flush(self, stamp_token, next_stamp_token):
"""Finalizes quantile summary stream and resets it for next iteration.

Args:
stamp_token: Exepcted current token.
stamp_token: Expected current token.
next_stamp_token: Next value for the token.
Returns:
A list of quantiles or approximate boundaries.
Expand Down