Is it possible to construct gaussian processes custom kernels with built in functions?
1 回表示 (過去 30 日間)
古いコメントを表示
I understand the way to construct custom kernels for gaussian processes, e.g.
kfcn = @(XN,XM,theta) exp(theta(1))^2*exp(-pdist2(XN,XM).^2/(2*exp(theta(2))^2))
I am wondering if it is possible to construct kernels from built in function names, e.g.
kfcn = 'exponential' + 'squaredexponential';
If not, does it mean we have to do it from scatch?
Any suggesion would be appreciated.
0 件のコメント
採用された回答
Walter Roberson
2023 年 5 月 3 日
kfcns = {'exponential','squaredexponential'};
KFCN = str2func("@(x) " + strjoin(string(kfcns(:)) + "(x)", " + "))
5 件のコメント
Walter Roberson
2023 年 5 月 4 日
The actual functions called are several layers down and obviouslyly not intended to be directly invoked by the user. For example toolbox/stats/classreg/+classreg/+learning/+coder/+gputils/squaredExponentialKfun.m
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!