What is an equivalent of find() in python?

235 次查看(过去 30 天)
Hi could you please explain what the find() doing in hte below code. How can I represent the similar code in python?
PercentCorrectTest = 100*(1-length(find(ClassificationID_test'~=double(labels_test)))/K_test)
  3 个评论
Rik
Rik 2019-6-12
Also, find is not the most intricate thing, there is an implicit expansion in that comparison. The combination of length and find can be replaced with sum.
Walter Roberson
Walter Roberson 2019-6-12
I suspect that in context you might be able to use (1-mean())*100 in the matlab.
The point of the code is to calculate a percentage match.

请先登录,再进行评论。

采纳的回答

Raj
Raj 2019-6-12
编辑:Walter Roberson 2022-6-16

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Call Python from MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by