Sklearn - How to predict probability for all target labels
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a data set with a target variable that can have 7 different labels. Each sample in my training set has only one label for the target variable. For each sample, I want to calculate the probability for each of the target labels. So my prediction would consist of 7 probabilities for each row. On the sklearn website I read about multi-label classification, but this doesn't seem to be what I want. I tried the following code, but this only gives me one classification per sample. from sklearn.multiclass import OneVsRestClassifier clf =