How can I make a RBF NN with multiple inputs and a single input

3 visualizaciones (últimos 30 días)
Bruno Souza
Bruno Souza el 26 de Nov. de 2018
Editada: nick el 8 de Oct. de 2024
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

Respuestas (1)

nick
nick el 8 de Oct. de 2024
Editada: nick el 8 de Oct. de 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.

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by