Output regression tree as text
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Stuart Pritchard
el 6 de Dic. de 2021
Comentada: Stuart Pritchard
el 7 de Dic. de 2021
I'm currently creating a single regression tree using TreeDomain = fitrtree(Predictors,Predicted);
I need to save the output of view(TreeDomain) as text so I can use as a script in a non-Matlab environment. view(TreeDomain) puts the text on the screen, how can I store that output in a variable, or how can I interrogate the model to extract this information?
0 comentarios
Respuesta aceptada
Walter Roberson
el 6 de Dic. de 2021
You can use evalc() to get the results into a character vector.
3 comentarios
Más respuestas (1)
Chunru
el 6 de Dic. de 2021
view(TreeDomain) will not return result to a variable. You can use "diary" function to save the result to a file:
diaray tree_result.txt
view(TreeDomain)
diary off
% The the tree output is stored in the specified file
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!