|
docRootNode | appendChild (hypElement) |
|
sf2Node | appendChild (docNode.createTextNode(sprintf('%f', sf2))) |
|
hypElement | appendChild (sf2Node) |
|
ellNode | appendChild (docNode.createTextNode(sprintf('%f', ell(i)))) |
|
hypElement | appendChild (ellNode) |
|
docRootNode | appendChild (Colement) |
|
nXNode | appendChild (docNode.createTextNode(sprintf('%f', nX))) |
|
Colement | appendChild (nXNode) |
|
DXNode | appendChild (docNode.createTextNode(sprintf('%f', DX))) |
|
Colement | appendChild (DXNode) |
|
nYNode | appendChild (docNode.createTextNode(sprintf('%f', nY))) |
|
Colement | appendChild (nYNode) |
|
DYNode | appendChild (docNode.createTextNode(sprintf('%f', DY))) |
|
Colement | appendChild (DYNode) |
|
Colement | appendChild (lbColement) |
|
lbNode | appendChild (docNode.createTextNode(sprintf('%f', lb(i)))) |
|
lbColement | appendChild (lbNode) |
|
Colement | appendChild (ubColement) |
|
ubNode | appendChild (docNode.createTextNode(sprintf('%f', ub(i)))) |
|
ubColement | appendChild (ubNode) |
|
meanfunctionNode | appendChild (docNode.createTextNode(sprintf('%f', 0))) |
|
Colement | appendChild (meanfunctionNode) |
|
MeanNode | appendChild (docNode.createTextNode(sprintf('%f', MeanOfOutputs(i)))) |
|
Colement | appendChild (MeanNode) |
|
stdNode | appendChild (docNode.createTextNode(sprintf('%f', stdOfOutputs(i)))) |
|
Colement | appendChild (stdNode) |
|
maternNode | appendChild (docNode.createTextNode(sprintf('%f', Opt.GP.matern))) |
|
Colement | appendChild (maternNode) |
|
docRootNode | appendChild (lBolement) |
|
lbNode | appendChild (docNode.createTextNode(sprintf('%f', sample_lb(i)))) |
|
docRootNode | appendChild (uBolement) |
|
ubNode | appendChild (docNode.createTextNode(sprintf('%f', sample_ub(i)))) |
|
docRootNode | appendChild (XSElement) |
|
docRootNode | appendChild (YSElement) |
|
XSElement | appendChild (rowOfXNode) |
|
XSNode | appendChild (docNode.createTextNode(sprintf('%f', xScaled(i, j)))) |
|
rowOfXNode | appendChild (XSNode) |
|
YSElement | appendChild (rowOfYNode) |
|
YSNode | appendChild (docNode.createTextNode(sprintf('%f', yScaled(i, j)))) |
|
rowOfYNode | appendChild (YSNode) |
|
docRootNode | appendChild (KElement) |
|
KElement | appendChild (rowOfKNode) |
|
KNode | appendChild (docNode.createTextNode(sprintf('%f', Opt.GP.K(i, j)))) |
|
rowOfKNode | appendChild (KNode) |
|
docRootNode | appendChild (inKElement) |
|
inKElement | appendChild (rowOfinKNode) |
|
inKNode | appendChild (docNode.createTextNode(sprintf('%f', Opt.GP.invK(i, j)))) |
|
rowOfinKNode | appendChild (inKNode) |
|
| xmlwrite (xmlFileName, docNode) |
|
|
| sample_lb = min(X) |
|
| sample_ub = max(X) |
|
scale hyperparameters from log | ell = exp(Opt.GP.hyp.cov(1:DX)) |
|
| sf2 = exp(2*Opt.GP.hyp.cov(DX+1)) |
|
scale | data [xScaled, yScaled, MeanOfOutputs, stdOfOutputs] = ScaleVariables(X, Y, sample_lb, sample_ub) |
|
create document | docNode = com.mathworks.xml.XMLUtils.createDocument(filename) |
|
document element | docRootNode = docNode.getDocumentElement() |
|
hyperparameter | hypElement = docNode.createElement('hyperparameter') |
|
| sf2Node = docNode.createElement('sf2') |
|
for | i |
|
| ellNode = docNode.createElement(sprintf('%s',str)) |
|
end config of data | Colement = docNode.createElement('config') |
|
| nXNode = docNode.createElement('nX') |
|
| DXNode = docNode.createElement('DX') |
|
| nYNode = docNode.createElement('nY') |
|
| DYNode = docNode.createElement('DY') |
|
| lbColement = docNode.createElement('lb') |
|
| lbNode = docNode.createElement(sprintf('%s', str)) |
|
end | ubColement = docNode.createElement('ub') |
|
| ubNode = docNode.createElement(sprintf('%s', str)) |
|
end | meanfunctionNode = docNode.createElement('meanfunction') |
|
| MeanNode = docNode.createElement(sprintf('%s',str)) |
|
| stdNode = docNode.createElement(sprintf('%s',str)) |
|
end matern | maternNode = docNode.createElement('matern') |
|
Bounds | lBolement = docNode.createElement('l_bounds') |
|
end | uBolement = docNode.createElement('u_bounds') |
|
end data input | XSElement = docNode.createElement('XS_data') |
|
| YSElement = docNode.createElement('YS_data') |
|
| rowOfXNode = docNode.createElement(sprintf('%s',rowOfX)) |
|
for | j |
|
| XSNode = docNode.createElement(sprintf('%s',str)) |
|
| rowOfYNode = docNode.createElement(sprintf('%s',rowOfY)) |
|
| YSNode = docNode.createElement(sprintf('%s',str)) |
|
end end covariance matrix | KElement = docNode.createElement('covariance_matrix_K') |
|
| rowOfKNode = docNode.createElement(sprintf('%s',rowOfK)) |
|
| KNode = docNode.createElement(sprintf('%s',str)) |
|
end end inverse of the covariance matrix | inKElement = docNode.createElement('inK') |
|
| rowOfinKNode = docNode.createElement(sprintf('%s',rowOfinK)) |
|
| inKNode = docNode.createElement(sprintf('%s',str)) |
|
end end xmlwrite | xmlFileName = [filename,'.xml'] |
|
| path = fullfile(pwd, filename) |
|