Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.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
MATLAB-使用fitcnb的朴素贝叶斯分类错误_Matlab_Classification_Naivebayes - Fatal编程技术网

MATLAB-使用fitcnb的朴素贝叶斯分类错误

MATLAB-使用fitcnb的朴素贝叶斯分类错误,matlab,classification,naivebayes,Matlab,Classification,Naivebayes,在我的matlab项目中,我想将一些特征分为两类(Stego、Cover)。我使用了fitsvm,它工作正常 classifier= fitcsvm(pattern,class); 现在我想把分类器改成线性贝叶斯 Dist='normal'; 分类器=fitcnb(模式、类别、分布、距离); 但当我使用该函数时,matlab返回一个错误: A normal distribution cannot be fit for the combination of class 1 and predic

在我的matlab项目中,我想将一些特征分为两类(Stego、Cover)。我使用了fitsvm,它工作正常

classifier= fitcsvm(pattern,class);
现在我想把分类器改成线性贝叶斯

Dist='normal';
分类器=fitcnb(模式、类别、分布、距离);
但当我使用该函数时,matlab返回一个错误:

A normal distribution cannot be fit for the combination of class 1 and predictor x1. The data has zero variance.
我应该如何使用fitcnb功能