Does Matlab have a function that provide label encoder for multi class classification ?

6 vues (au cours des 30 derniers jours)
Tuong Nguyen Minh
Tuong Nguyen Minh le 20 Août 2020
Commenté : ahmet le 15 Mai 2025
The Python's scikit learn library has a label encoder that encode target labels with value between 0 and n_classes-1 at the link below
It also support the ability to transform labels back to the original version.
Does Matlab has an equivalent function ?
In the case matlab does not have it, is there anyway I can call this python encoder from matlab ?
I am using Matlab 2020a

Réponses (1)

Mohammad Sami
Mohammad Sami le 21 Août 2020
Modifié(e) : Mohammad Sami le 21 Août 2020
For Classification problems, if you use Categorical variables, MATLAB will do this automatically for you. This is transparent to the user.
You can find more details about categorical variables here
  1 commentaire
ahmet
ahmet le 15 Mai 2025
i am sorry to zombified this topic but i need to make a PCA through data table with categorical array and continuous and binary data shoul i use label encoding by the way categorical labels are ordinal

Connectez-vous pour commenter.

Catégories

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

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by