How can I make a RBF NN with multiple inputs and a single input
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, I'd like to creat a RBF with 'newrb' function,
My inputs are 3 columns with 1000 elements each, and my output is a single column with 1000 elements.
But when I try to creat I get the following error 'Inner matrix dimensions must agree'
Thank you
0 Commenti
Risposte (1)
nick
il 8 Ott 2024
Modificato: nick
il 8 Ott 2024
Hi Bruno,
The error “Inner matrix dimensions must agree” seems to indciate a mismatch in the dimensions of the matrices involved in an operation. Kindly ensure that the input data and the output data are in the correct format. The 'newrb' function expects the input matrix P to have dimensions [R x Q], where R is the number of input features (3 in your case) and Q is the number of samples (1000 in your case). The target matrix T should have dimensions [S x Q], where S is the number of output features (1 in your case) and Q is the number of samples (1000 in your case).
Here’s a sample code to create an RBF network with the inputs and outputs of the specified dimensions:
% Sample input data (3 columns, 1000 rows)
P = rand(3, 1000);
% Sample output data (1 column, 1000 rows)
T = rand(1, 1000);
% Ensure data is in the correct format
if size(P, 1) ~= 3
P = P';
end
if size(T, 1) ~= 1
T = T';
end
net = newrb(P, T);
view(net);
You can refer to the documentation of the function 'newrb' using the following command in MATLAB Command Window:
doc newrb
Hope this helps to resolve the issue.
0 Commenti
Vedere anche
Categorie
Scopri di più su Deep Learning Toolbox 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!