フィルターのクリア

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 Center および File ExchangeSupport 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