深度学习中的二元类矩阵是什么?

时间:2020-04-19 16:39:12

标签: python-3.x keras deep-learning

我在Keras中使用'to_categorical()'方法时遇到了这个问题

man = np.random.randint(10,20,10)
print(man)
man = ku.to_categorical(man)
print(man)

我想知道to_categorical()方法内部到底发生了什么。

1 个答案:

答案 0 :(得分:1)

to_categorical的行为类似于onehotencoding技术

如果您的特定类别存在,则在剩余行中将其标记为1否则为0

enter image description here

enter image description here