![]() |
比较两个向量MATLAB
我想得到2个向量的错误率吗?
喜欢 # incorrect numbers 6 error rate = ______________________ = ____ # total numbers(size) 15 这是15数字, 9是正确的x是正确的答案(参考), y是带有答案的向量,我想将它们进行比较并得出错误率: x= [1 ,1,1, 1,1, 1,1,1,1,1, 1,-1,-1,-1,-1] y= [-1,1,1,-1,1,-1,1,1,1,1,-1, 1,-1, 1,-1] [LIST][*]我正在做什么也是Corret吗?好的,我对我更新的公式有误。[/LIST] [B]回答:[/B] 如果要得到[I]错误[/I]率,则需要[I]不正确[/I]值的数量除以值的总数。您可以使用[URL="http://www.mathworks.com/help/techdoc/ref/relationaloperators.html"]关系运算符[/URL] ~=和函数[URL="http://www.mathworks.com/help/techdoc/ref/mean.html"]MEAN[/URL]来执行此[URL="http://www.mathworks.com/help/techdoc/ref/relationaloperators.html"]操作[/URL] : errorRate = mean(x ~= y); [url=https://stackoverflow.com/questions/5380465]更多&回答...[/url] |
所有时间均为北京时间。现在的时间是 06:53。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.