how to evaluate my result knn code using confusion matrix
Al momento, stai seguendo questa domanda
- Vedrai gli aggiornamenti nel tuofeed del contenuto seguito.
- Potresti ricevere delle e-mail a seconda delle tuepreferenze per le comunicazioni.
Si è verificato un errore
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
0 voti
Condividi un link a questa domanda
Risposta accettata
0 voti
Condividi un link a questa risposta
- The type of the input must be vectors or character matrices. Your inputs are of the type double. You can use the "num2str" function to convert the double type to char array. For example
- The size of both the character array inputs should be the same. In your script, the length of train_Coords is 120 and the length of test_Coords is 30.
38 Commenti
Condividi un link a questo commento
Condividi un link a questo commento
- Train your model using the data 'X_train' and 'y_train'. In your case, the (X_train, y_train) is 80% of the total data.
- Predict the results of 'X_test' using the model trained in step 1. Store the results in 'y_test_pred'.
- Pass 'y_test_pred' and 'y_test' in the confusionmat function. In this case, both 'y_test_pred' and 'y_test 'are of the same dimension.

Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento

Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento

Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento

Condividi un link a questo commento


Condividi un link a questo commento


Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento
Condividi un link a questo commento


Condividi un link a questo commento
Più risposte (0)
Categorie
Scopri di più su Model Building and Assessment in Centro assistenza e File Exchange
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
