Matlab Code - Data Analysis

4 visualizaciones (últimos 30 días)
Mustafa Furkan SAHIN
Mustafa Furkan SAHIN el 13 de Dic. de 2022
Editada: Mustafa Furkan SAHIN el 16 de Dic. de 2022
My program crashes without asking the user for sample data, how can I fix this? It worked when I tried the values of smaller datasets.
I have a Higher Education Students Performance Evaluation Dataset (https://archive.ics.uci.edu/ml/datasets/Higher+Education+Students+Performance+Evaluation+Dataset ).

Respuesta aceptada

Image Analyst
Image Analyst el 13 de Dic. de 2022
Not sure - we don't have your code or data. I'd start with carefully examining the arguments you pass to fitcknn.
  8 comentarios
Image Analyst
Image Analyst el 15 de Dic. de 2022
Editada: Image Analyst el 15 de Dic. de 2022
Do this:
t = readtable("DATA.csv");
tPredictors = t(:, 2:end);
DATA = table2array(tPredictors)
X = DATA(:, 1:31); % Input ("Predictors")
trueResponseY = DATA(:,32); % True Output (class numbers)
Then go to the Apps tab on the tool ribbon and start up the Classification Learner and start a session using data from the workspace. Tell it tPredictors is your prediction input and trueResponseY are your true response values. Then select all Bayes models, and others if you want, and tell it to train. You'll get this result:
Then go to the Export button and export the compact model into a variable. Save that variable with save() to a mat file. Then you can read in that model and give it your predictors and get the estimated class.
Mustafa Furkan SAHIN
Mustafa Furkan SAHIN el 15 de Dic. de 2022
Thanks a lot

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by