MeLOn
Write_GP_to_xml.m File Reference

Functions

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)
 

Variables

 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)
 

Function Documentation

◆ appendChild() [1/48]

docRootNode appendChild ( Colement  )

◆ appendChild() [2/48]

meanfunctionNode appendChild ( docNode.  createTextNodesprintf('%f', 0))

◆ appendChild() [3/48]

DXNode appendChild ( docNode.  createTextNodesprintf('%f', DX))

◆ appendChild() [4/48]

DYNode appendChild ( docNode.  createTextNodesprintf('%f', DY))

◆ appendChild() [5/48]

ellNode appendChild ( docNode.  createTextNodesprintf('%f', ell(i)))

◆ appendChild() [6/48]

lbNode appendChild ( docNode.  createTextNodesprintf('%f', lb(i)))

◆ appendChild() [7/48]

MeanNode appendChild ( docNode.  createTextNodesprintf('%f', MeanOfOutputs(i)))

◆ appendChild() [8/48]

nXNode appendChild ( docNode.  createTextNodesprintf('%f', nX))

◆ appendChild() [9/48]

nYNode appendChild ( docNode.  createTextNodesprintf('%f', nY))

◆ appendChild() [10/48]

inKNode appendChild ( docNode.  createTextNodesprintf('%f', Opt.GP.invK(i, j)))

◆ appendChild() [11/48]

KNode appendChild ( docNode.  createTextNodesprintf('%f', Opt.GP.K(i, j)))

◆ appendChild() [12/48]

maternNode appendChild ( docNode.  createTextNodesprintf('%f', Opt.GP.matern))

◆ appendChild() [13/48]

lbNode appendChild ( docNode.  createTextNodesprintf('%f', sample_lb(i)))

◆ appendChild() [14/48]

ubNode appendChild ( docNode.  createTextNodesprintf('%f', sample_ub(i)))

◆ appendChild() [15/48]

sf2Node appendChild ( docNode.  createTextNodesprintf('%f', sf2))

◆ appendChild() [16/48]

stdNode appendChild ( docNode.  createTextNodesprintf('%f', stdOfOutputs(i)))

◆ appendChild() [17/48]

ubNode appendChild ( docNode.  createTextNodesprintf('%f', ub(i)))

◆ appendChild() [18/48]

XSNode appendChild ( docNode.  createTextNodesprintf('%f', xScaled(i, j)))

◆ appendChild() [19/48]

YSNode appendChild ( docNode.  createTextNodesprintf('%f', yScaled(i, j)))

◆ appendChild() [20/48]

Colement appendChild ( DXNode  )

◆ appendChild() [21/48]

Colement appendChild ( DYNode  )

◆ appendChild() [22/48]

hypElement appendChild ( ellNode  )

◆ appendChild() [23/48]

docRootNode appendChild ( hypElement  )

◆ appendChild() [24/48]

docRootNode appendChild ( inKElement  )

◆ appendChild() [25/48]

rowOfinKNode appendChild ( inKNode  )

◆ appendChild() [26/48]

docRootNode appendChild ( KElement  )

◆ appendChild() [27/48]

rowOfKNode appendChild ( KNode  )

◆ appendChild() [28/48]

Colement appendChild ( lbColement  )

◆ appendChild() [29/48]

lbColement appendChild ( lbNode  )

◆ appendChild() [30/48]

docRootNode appendChild ( lBolement  )

◆ appendChild() [31/48]

Colement appendChild ( maternNode  )

◆ appendChild() [32/48]

Colement appendChild ( meanfunctionNode  )

◆ appendChild() [33/48]

Colement appendChild ( MeanNode  )

◆ appendChild() [34/48]

Colement appendChild ( nXNode  )

◆ appendChild() [35/48]

Colement appendChild ( nYNode  )

◆ appendChild() [36/48]

inKElement appendChild ( rowOfinKNode  )

◆ appendChild() [37/48]

KElement appendChild ( rowOfKNode  )

◆ appendChild() [38/48]

XSElement appendChild ( rowOfXNode  )

◆ appendChild() [39/48]

YSElement appendChild ( rowOfYNode  )

◆ appendChild() [40/48]

hypElement appendChild ( sf2Node  )

◆ appendChild() [41/48]

Colement appendChild ( stdNode  )

◆ appendChild() [42/48]

Colement appendChild ( ubColement  )

◆ appendChild() [43/48]

ubColement appendChild ( ubNode  )

◆ appendChild() [44/48]

docRootNode appendChild ( uBolement  )

◆ appendChild() [45/48]

docRootNode appendChild ( XSElement  )

◆ appendChild() [46/48]

rowOfXNode appendChild ( XSNode  )

◆ appendChild() [47/48]

docRootNode appendChild ( YSElement  )

◆ appendChild() [48/48]

rowOfYNode appendChild ( YSNode  )

◆ xmlwrite()

xmlwrite ( xmlFileName  ,
docNode   
)

Variable Documentation

◆ Colement

end config of data Colement = docNode.createElement('config')

◆ data

scale data[xScaled, yScaled, MeanOfOutputs, stdOfOutputs] = ScaleVariables(X, Y, sample_lb, sample_ub)

◆ docNode

create document docNode = com.mathworks.xml.XMLUtils.createDocument(filename)

◆ docRootNode

document element docRootNode = docNode.getDocumentElement()

◆ DXNode

DXNode = docNode.createElement('DX')

◆ DYNode

DYNode = docNode.createElement('DY')

◆ ell

scale hyperparameters from log ell = exp(Opt.GP.hyp.cov(1:DX))

◆ ellNode

ellNode = docNode.createElement(sprintf('%s',str))

◆ hypElement

hyperparameter hypElement = docNode.createElement('hyperparameter')

◆ i

for i
Initial value:
= 1:DX
str = "ell_"+string(i)

◆ inKElement

end end inverse of the covariance matrix inKElement = docNode.createElement('inK')

◆ inKNode

inKNode = docNode.createElement(sprintf('%s',str))

◆ j

for j
Initial value:
= 1 : DX
str = "Demension_"+ string(j)

◆ KElement

end end covariance matrix KElement = docNode.createElement('covariance_matrix_K')

◆ KNode

KNode = docNode.createElement(sprintf('%s',str))

◆ lbColement

lbColement = docNode.createElement('lb')

◆ lbNode

lbNode = docNode.createElement(sprintf('%s', str))

◆ lBolement

Bounds lBolement = docNode.createElement('l_bounds')

◆ maternNode

end matern maternNode = docNode.createElement('matern')

◆ meanfunctionNode

end meanfunctionNode = docNode.createElement('meanfunction')

◆ MeanNode

MeanNode = docNode.createElement(sprintf('%s',str))

◆ nXNode

nXNode = docNode.createElement('nX')

◆ nYNode

nYNode = docNode.createElement('nY')

◆ path

path = fullfile(pwd, filename)

◆ rowOfinKNode

rowOfinKNode = docNode.createElement(sprintf('%s',rowOfinK))

◆ rowOfKNode

rowOfKNode = docNode.createElement(sprintf('%s',rowOfK))

◆ rowOfXNode

rowOfXNode = docNode.createElement(sprintf('%s',rowOfX))

◆ rowOfYNode

rowOfYNode = docNode.createElement(sprintf('%s',rowOfY))

◆ sample_lb

sample_lb = min(X)

◆ sample_ub

sample_ub = max(X)

◆ sf2

sf2 = exp(2*Opt.GP.hyp.cov(DX+1))

◆ sf2Node

sf2Node = docNode.createElement('sf2')

◆ stdNode

stdNode = docNode.createElement(sprintf('%s',str))

◆ ubColement

end ubColement = docNode.createElement('ub')

◆ ubNode

ubNode = docNode.createElement(sprintf('%s', str))

◆ uBolement

end uBolement = docNode.createElement('u_bounds')

◆ xmlFileName

end end xmlwrite xmlFileName = [filename,'.xml']

◆ XSElement

end data input XSElement = docNode.createElement('XS_data')

◆ XSNode

XSNode = docNode.createElement(sprintf('%s',str))

◆ YSElement

YSElement = docNode.createElement('YS_data')

◆ YSNode

YSNode = docNode.createElement(sprintf('%s',str))
j
for j
Definition: Write_GP_to_xml.m:122
DX
Number of training data points DX
Definition: example_training_of_ANN.m:23
i
for i
Definition: Write_GP_to_xml.m:39