필터 지우기
필터 지우기

Weights of Regression Partioned Model in Neural Network

조회 수: 1 (최근 30일)
Lukas Schmitt
Lukas Schmitt 2021년 9월 8일
Hey there,
I have a regression neural network (1 hidden layer with 10 neurons) which is cross validated and now I wonder how I can get the weight matrix.
KFolds = observations; % LOOCV
rng("default") % For reproducibility of the partition
cvp = cvpartition(observations,"KFold",KFolds);
lambda = (0:0.005:0.015);
for i = 1:length(lambda)
cvMdl = fitrnet(data_table,"Output","Lambda",lambda(i), ...
"CVPartition",cvp,"LayerSizes",[10]);
cvloss(i) = kfoldLoss(cvMdl); % MSE for cross-validated models
end
plot(lambda,cvloss)
xlabel("Regularization Strength")
ylabel("Cross-Validation Loss")
[~,idx] = min(cvloss);
bestLambda = lambda(idx)
Mdl = fitrnet(data_table,"Output","Lambda",bestLambda, ...
"CVPartition",cvp,"LayerSizes",[10],"Verbose",0);
With Mdl.W I get the scaled weights, but all values are the same in this vector and the length of this vector equals the number of observations.
I don't understand the meaning of this vector and how I can get the 'normal' weight matrix.
Thanks for your answers.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Support Vector Machine Regression에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by