How can I make a RBF NN with multiple inputs and a single input
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (1개)
nick
2024년 10월 8일
편집: nick
2024년 10월 8일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!