Effacer les filtres
Effacer les filtres

What is an equivalent of find() in python?

235 vues (au cours des 30 derniers jours)
Prb
Prb le 12 Juin 2019
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 commentaires
Rik
Rik le 12 Juin 2019
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 le 12 Juin 2019
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.

Connectez-vous pour commenter.

Réponse acceptée

Raj
Raj le 12 Juin 2019
Modifié(e) : Walter Roberson le 16 Juin 2022

Plus de réponses (0)

Catégories

En savoir plus sur Call Python from MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by