フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

error : "Argument to dynamic structure reference must evaluate to a valid field name" using Genetic Algorithms

1 回表示 (過去 30 日間)
Guillem Heinrich
Guillem Heinrich 2017 年 7 月 12 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi,
I am using a genetic algorithm to minimize the single output of a decision tree, which I succesfully trained previously, for just one of the inputs. And i get the error : "Argument to dynamic structure reference must evaluate to a valid field name". And I don't know what I am doing wrong.
Thanks for your help.
Find attached the code:
%Define Constants
ds=5;
v=100;
optDT = zeros(length(ds),length(v));
fvalDT = zeros(length(ds),length(v));
for q = 1:length(ds)
for t = 1:length(v)
FitnessfunDT = @(y) modelfunT(y,ds(q),v(t),net);
[optDT(q,t),fvalDT(q,t)] = ga(FitnessfunDT,1,[],[],[],[],1,60,[],1);
end
end
%%%%%%
function berDT = modelfunT(y,ds,v,tree)
berDT = tree.predict([y,ds,v]);
end

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by