Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/331.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python scikit学习中预测概率的输出_Python_Machine Learning_Scikit Learn - Fatal编程技术网

Python scikit学习中预测概率的输出

Python scikit学习中预测概率的输出,python,machine-learning,scikit-learn,Python,Machine Learning,Scikit Learn,假设我有一个数据样本,它有两个标记为0和1的类。当我运行output=clf.predict_proba(X_input)时,output中的每一行由两列组成,对应于每个类的概率 第一列代表0类或1类的概率吗?说: “输入样本的类概率。类的顺序与属性类中的顺序相对应。” 这是否意味着0或1是数据样本的第一个元素 与predict\u proba?输出中的第一列相对应。通常,分类器将具有名为classes\u的属性,该属性将在拟合和存储类时填充。predict\u proba方法输出的顺序将与此属

假设我有一个数据样本,它有两个标记为0和1的类。当我运行
output=clf.predict_proba(X_input)
时,
output
中的每一行由两列组成,对应于每个类的概率

第一列代表0类或1类的概率吗?说:

“输入样本的类概率。类的顺序与属性类中的顺序相对应。”

这是否意味着0或1是数据样本的第一个元素
predict\u proba

输出中的第一列相对应。通常,分类器将具有名为
classes\u
的属性,该属性将在拟合和存储类时填充。
predict\u proba
方法输出的顺序将与此属性中的顺序相同

例如:

nb = MultinomialNM()
nb.fit(some_gender_data)
nb.classes_
array(['F', 'M'], dtype='<U1')
nb=多项式nm()
注意:适合(一些性别数据)
nb类_
数组(['F','M',dtype='1〕)