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!