Topic 2 Question 26
2 つ選択Which of these are examples of a value in a sparse vector?
[0, 5, 0, 0, 0, 0]
[0, 0, 0, 1, 0, 0, 1]
[0, 1]
[1, 0, 0, 0, 0, 0, 0]
解説
Categorical features in linear models are typically translated into a sparse vector in which each possible value has a corresponding index or id. For example, if there are only three possible eye colors you can represent 'eye_color' as a length 3 vector: 'brown' would become [1, 0, 0], 'blue' would become [0, 1, 0] and 'green' would become [0, 0, 1]. These vectors are called "sparse" because they may be very long, with many zeros, when the set of possible values is very large (such as all English words). [0, 0, 0, 1, 0, 0, 1] is not a sparse vector because it has two 1s in it. A sparse vector contains only a single 1. [0, 5, 0, 0, 0, 0] is not a sparse vector because it has a 5 in it. Sparse vectors only contain 0s and 1s. Reference: https://www.tensorflow.org/tutorials/linear#feature_columns_and_transformations
ユーザの投票
コメント(7)
Answer: C, D Description: Sparse vector contains only 0 and 1, whereas only one 1, so C, D
👍 11[Removed]2020/03/28Answer : CD
👍 5[Removed]2020/03/21I think speaking generally all these are sparse. I guess we have to consider these types of questions within the context of tensorflow
👍 4stevie2019/03/12
シャッフ ルモード