From 632a9b3d69700b9db75397654974ceab0602bdf9 Mon Sep 17 00:00:00 2001 From: tilakrayal <81610181+tilakrayal@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:24:32 +0530 Subject: [PATCH] Update classification_with_tfdf.md --- examples/structured_data/md/classification_with_tfdf.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/structured_data/md/classification_with_tfdf.md b/examples/structured_data/md/classification_with_tfdf.md index d870c0d72b..090adc4065 100644 --- a/examples/structured_data/md/classification_with_tfdf.md +++ b/examples/structured_data/md/classification_with_tfdf.md @@ -1185,15 +1185,15 @@ class BinaryTargetEncoding(layers.Layer): # Filter the data where the target label is positive. positive_indices = tf.where(condition=target_values) - postive_feature_values = tf.gather_nd( + positive_feature_values = tf.gather_nd( params=feature_values, indices=positive_indices ) # Compute how many times each feature value occurred with a positive target label. positive_frequency = tf.math.unsorted_segment_sum( data=tf.ones( - shape=(postive_feature_values.shape[0], 1), dtype=tf.dtypes.float64 + shape=(positive_feature_values.shape[0], 1), dtype=tf.dtypes.float64 ), - segment_ids=postive_feature_values, + segment_ids=positive_feature_values, num_segments=self.vocabulary_size, )