Azzera filtri
Azzera filtri

how can i get the regression values into a variable in neural network

1 visualizzazione (ultimi 30 giorni)
When we fit-data-with-a-neural-network, we can get the regression graph, when we click the Regression button in the nntool window.
is it possible to get the 4 values written on the title of the graph plot into a variable?
so i can view the variable regr as below
regr = [ 0.97327 0.96889 0.94805 0.96877]

Risposta accettata

Adam Danz
Adam Danz il 17 Dic 2020
Modificato: Adam Danz il 24 Dic 2020
After the figure is created from the nntool and is the current figure, these lines below will extract the subplot title information,
fig = gcf();
ax = findobj(fig,'Type','Axes');
titles = get(ax,'Title');
titleStr = get([titles{:}],'String');
[~, plotID] = regexp(titleStr,'^(.*):','match','tokens','once');
[~, numStrings] = regexp(titleStr,'R=(.*)$','match','tokens','once');
S = [plotID{:}] % the subplot ID
R = str2double([numStrings{:}]) % the R value
Outputs
S =
1×4 cell array
{'All'} {'Test'} {'Validation'} {'Training'}
R =
0.97891 0.96889 0.95093 0.98575

Più risposte (0)

Categorie

Scopri di più su Sequence and Numeric Feature Data Workflows in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by