我知道二元交叉熵与两类中的分类交叉熵相同。 此外,我很清楚softmax是什么。 因此,我看到明确的交叉熵惩罚只是将一个部件(概率)应为1。 但为什么,不能或不应我使用二进制交叉熵上一热载体? Normal Case for 1-Label-Multiclass-Mutual-exclusivity-classification:
################
pred = [0.1
我有一个数据集,每个文档都有一个标签,如下例所示。 label text
pay "i will pay now"
finance "are you the finance guy?"
law "lawyers and law"
court "was at the court today"
finance report "ban
import numpy as np
import pandas as pd
from sklearn.pipeline import Pipeline
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.svm import LinearSVC
from sklearn.linear_mode