What is an equivalent of find() in python?
144 ビュー (過去 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
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
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
2019 年 6 月 12 日
編集済み: Walter Roberson
2022 年 6 月 16 日
What 'find' is doing here:
Equivalent in Python:
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Call Python from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!