KerMor
0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
|
ApproxTrainData: Data class for approximation training data, containing several useful bounding box properties etc. More...
ApproxTrainData: Data class for approximation training data, containing several useful bounding box properties etc.
This class is part of the framework
Homepage
http://www.morepas.org/software/index.htmlDocumentation
http://www.morepas.org/software/kermor/index.htmlLicense
KerMor license conditions Definition at line 18 of file ApproxTrainData.m.
Public Member Functions | |
ApproxTrainData (matrix< double > xi,rowvec< double > ti,matrix< double > mui) | |
Creates a new approx train data instance. More... | |
function [
colvec< double > c , integer idx ] = | getClosestToCenter () |
The sample triple closest to the Center. More... | |
function satd = | subset (sel) |
function [
train , validation , randidx ] = | splitToTrainValidationSets (perc, seed) |
Creates a training and validation data set from this approx train data instance. More... | |
function [
e , lbl , pt ] = | getErrorsFor (fun) |
function | relocate (char new_dir) |
Convenience method. Relocates the xi and fxi FileMatrix instances if present. More... | |
function | delete () |
function | makeUniqueXi () |
function [
minDist , meanDist , maxDist ] = | getXiDists () |
Static Public Member Functions | |
static function data.ApproxTrainData atd = | computeFrom (models.BaseFullModel model,dscomponents.ACoreFun f,data.selection.ASelector selector,logical parallel) |
Computes approximation training data for a model, function and selector. More... | |
static function [ data.ApproxTrainData atd , minScale , maxScale ] = | scaleXiZeroOne (data.ApproxTrainData atd) |
Public Attributes | |
data.FileMatrix | xi = "[]" |
The state space samples \(x_i = x(t_i;\mu_i)\), stored row-wise in a data.FileMatrix instance. More... | |
rowvec | ti = "[]" |
The time samples \(t_i\). More... | |
matrix | mui = "[]" |
The parameter samples \(\mu_i\) used computing the parent trajectories of \(x_i\). More... | |
data.FileMatrix | fxi |
The evaluations of \(f(x_i,t_i,\mu_i)\), stored row-wise in a data.FileMatrix. More... | |
colvec | Center |
The geometrical center of the datas bounding box. More... | |
double | xiDia |
The diameter of the state space samples. More... | |
double | tiDia |
The time span of the time samples. More... | |
double | muiDia |
The diameter of the parameter space samples. More... | |
logical | hasTime = false |
Flag that indicates if time samples are present. More... | |
logical | hasParams = false |
Flag that indicates if param samples are present. More... | |
integer | tOff = "[]" |
The index of the time entry in the combined \([x;t;\mu]\) vector. More... | |
integer | muOff = "[]" |
The index of the first parameter entry in the combined \([x;t;\mu]\) vector. More... | |
struct | Box = "[]" |
A box struct allowing access to the specific min and max values of the samples. Recommended for Debug use only. More... | |
Public Attributes inherited from handle | |
addlistener | |
Creates a listener for the specified event and assigns a callback function to execute when the event occurs. More... | |
notify | |
Broadcast a notice that a specific event is occurring on a specified handle object or array of handle objects. More... | |
delete | |
Handle object destructor method that is called when the object's lifecycle ends. More... | |
disp | |
Handle object disp method which is called by the display method. See the MATLAB disp function. More... | |
display | |
Handle object display method called when MATLAB software interprets an expression returning a handle object that is not terminated by a semicolon. See the MATLAB display function. More... | |
findobj | |
Finds objects matching the specified conditions from the input array of handle objects. More... | |
findprop | |
Returns a meta.property objects associated with the specified property name. More... | |
fields | |
Returns a cell array of string containing the names of public properties. More... | |
fieldnames | |
Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames function. More... | |
isvalid | |
Returns a logical array in which elements are true if the corresponding elements in the input array are valid handles. This method is Sealed so you cannot override it in a handle subclass. More... | |
eq | |
Relational functions example. See details for more information. More... | |
transpose | |
Transposes the elements of the handle object array. More... | |
permute | |
Rearranges the dimensions of the handle object array. See the MATLAB permute function. More... | |
reshape | |
hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape function. More... | |
sort | |
ort the handle objects in any array in ascending or descending order. More... | |
data.ApproxTrainData.ApproxTrainData | ( | matrix< double > | xi, |
rowvec< double > | ti, | ||
matrix< double > | mui | ||
) |
Creates a new approx train data instance.
Leave \(t_i\) and/or \(\mu_i\) empty if no time or parameter training data is present.
Assign local variables
xi | The state space samples \(x_i\) |
ti | The time instances \(t_i\) |
mui | The parameter samples \(\mu_i\) |
Definition at line 218 of file ApproxTrainData.m.
References Box, Center, Utils.getBoundingBox(), hasParams, hasTime, mui, muiDia, muOff, ti, tiDia, tOff, xi, and xiDia.
Referenced by models.BaseFullModel.off4_genApproximationTrainData().
|
static |
Computes approximation training data for a model, function and selector.
This method is implemented here as both the original offline phase 4 uses this method but also the DEIM error estimator needs the same routine for the MatrixDEIM approximation.
model | The full model instance |
f | The model's core function |
selector | The training data selector |
parallel | Flag to set if computation should be done in parallel (MatlabPool) Default: false |
Definition at line 456 of file ApproxTrainData.m.
References KerMor.App(), data.FileMatrix.bCols, models.BaseFullModel.Data, data.FileData.DataDirectory, dscomponents.ACoreFun.evaluateMulti(), dscomponents.ACoreFun.fDim, data.FileMatrix.FileMatrix(), fxi, mui, data.FileMatrix.n, data.FileMatrix.nBlocks, models.BaseFullModel.ProjectApproxTrainingData, data.selection.ASelector.selectTrainingData(), t, and xi.
function data.ApproxTrainData.delete | ( | ) |
Definition at line 382 of file ApproxTrainData.m.
function [e , lbl , pt ] = data.ApproxTrainData.getErrorsFor | ( | fun | ) |
Definition at line 325 of file ApproxTrainData.m.
References PrintTable.Caption, fxi, k, Norm.L1(), Norm.L2(), t, data.ABlockedData.toMemoryMatrix(), and xi.
function [minDist , meanDist , maxDist ] = data.ApproxTrainData.getXiDists | ( | ) |
Definition at line 411 of file ApproxTrainData.m.
References data.ABlockedData.toMemoryMatrix(), and xi.
function data.ApproxTrainData.makeUniqueXi | ( | ) |
Definition at line 388 of file ApproxTrainData.m.
References KerMor.App(), fxi, mui, data.FileMatrix.spawnWithContent(), t, ti, data.ABlockedData.toMemoryMatrix(), and xi.
function data.ApproxTrainData.relocate | ( | char | new_dir | ) |
Convenience method. Relocates the xi and fxi FileMatrix instances if present.
new_dir | The new directory |
Definition at line 364 of file ApproxTrainData.m.
References fxi, data.FileMatrix.relocate(), and xi.
Referenced by data.ModelData.relocate().
|
static |
Definition at line 562 of file ApproxTrainData.m.
References xi.
function [ train , validation , randidx ] = data.ApproxTrainData.splitToTrainValidationSets | ( | perc, | |
seed | |||
) |
Creates a training and validation data set from this approx train data instance.
Definition at line 309 of file ApproxTrainData.m.
function satd = data.ApproxTrainData.subset | ( | sel | ) |
Definition at line 291 of file ApproxTrainData.m.
References fxi, mui, ti, and xi.
Referenced by splitToTrainValidationSets().
data.ApproxTrainData.Box = "[]" |
A box struct allowing access to the specific min and max values of the samples. Recommended for Debug use only.
SetAccess = Private, GetAccess = Public
Definition at line 201 of file ApproxTrainData.m.
Referenced by ApproxTrainData().
data.ApproxTrainData.Center |
The geometrical center of the datas bounding box.
A column vector composed as \([x; t; mu]\)
SetAccess = Private, GetAccess = Public
Definition at line 94 of file ApproxTrainData.m.
Referenced by ApproxTrainData(), and getClosestToCenter().
data.ApproxTrainData.fxi |
The evaluations of \(f(x_i,t_i,\mu_i)\), stored row-wise in a data.FileMatrix.
Definition at line 82 of file ApproxTrainData.m.
Referenced by approx.DEIM.approximateSystemFunction(), approx.algorithms.ABase.computeApproximation(), testing.DEIM.computeDEIMErrors(), computeFrom(), delete(), approx.algorithms.ABase.getError(), getErrorsFor(), makeUniqueXi(), models.BaseFullModel.off5_computeApproximation(), relocate(), approx.algorithms.VKOGA.startAdaptiveExtension(), subset(), and approx.algorithms.Componentwise.templateComputeApproximation().
data.ApproxTrainData.hasParams = false |
Flag that indicates if param samples are present.
SetAccess = Private, GetAccess = Public
Definition at line 157 of file ApproxTrainData.m.
Referenced by ApproxTrainData(), approx.algorithms.AAdaptiveBase.extendExpansion(), kernels.config.RBFConfig.getDists(), kernels.config.ExpansionConfig.guessGammaConfigs(), and kernels.ParamTimeKernelExpansion.setCentersFromATD().
data.ApproxTrainData.hasTime = false |
Flag that indicates if time samples are present.
SetAccess = Private, GetAccess = Public
Definition at line 144 of file ApproxTrainData.m.
Referenced by ApproxTrainData(), approx.algorithms.AAdaptiveBase.extendExpansion(), kernels.config.RBFConfig.getDists(), kernels.config.ExpansionConfig.guessGammaConfigs(), and kernels.ParamTimeKernelExpansion.setCentersFromATD().
data.ApproxTrainData.mui = "[]" |
The parameter samples \(\mu_i\) used computing the parent trajectories of \(x_i\).
Default: []
Definition at line 71 of file ApproxTrainData.m.
Referenced by ApproxTrainData(), testing.DEIM.computeDEIMErrors(), computeFrom(), approx.algorithms.AAdaptiveBase.extendExpansion(), getClosestToCenter(), approx.algorithms.ABase.getError(), makeUniqueXi(), FunVis2D>rangesFromATD(), kernels.ParamTimeKernelExpansion.setCentersFromATD(), approx.algorithms.VKOGA.startAdaptiveExtension(), subset(), and approx.algorithms.Componentwise.templateComputeApproximation().
data.ApproxTrainData.muiDia |
The diameter of the parameter space samples.
SetAccess = Private, GetAccess = Public
Definition at line 132 of file ApproxTrainData.m.
Referenced by ApproxTrainData(), kernels.config.RBFConfig.getDists(), and kernels.config.ExpansionConfig.guessGammaConfigs().
data.ApproxTrainData.muOff = "[]" |
The index of the first parameter entry in the combined \([x;t;\mu]\) vector.
Zero means no parameter samples are present.
Default: 0
SetAccess = Private, GetAccess = Public
Definition at line 185 of file ApproxTrainData.m.
Referenced by ApproxTrainData().
data.ApproxTrainData.ti = "[]" |
The time samples \(t_i\).
Default: "[]"
Definition at line 60 of file ApproxTrainData.m.
Referenced by ApproxTrainData(), testing.DEIM.computeDEIMErrors(), approx.algorithms.AAdaptiveBase.extendExpansion(), getClosestToCenter(), approx.algorithms.ABase.getError(), makeUniqueXi(), FunVis2D>rangesFromATD(), kernels.ParamTimeKernelExpansion.setCentersFromATD(), approx.algorithms.VKOGA.startAdaptiveExtension(), subset(), and approx.algorithms.Componentwise.templateComputeApproximation().
data.ApproxTrainData.tiDia |
The time span of the time samples.
SetAccess = Private, GetAccess = Public
Definition at line 120 of file ApproxTrainData.m.
Referenced by ApproxTrainData(), kernels.config.RBFConfig.getDists(), and kernels.config.ExpansionConfig.guessGammaConfigs().
data.ApproxTrainData.tOff = "[]" |
The index of the time entry in the combined \([x;t;\mu]\) vector.
Zero means no time samples are present.
Default: 0
SetAccess = Private, GetAccess = Public
Definition at line 170 of file ApproxTrainData.m.
Referenced by ApproxTrainData().
data.ApproxTrainData.xi = "[]" |
The state space samples \(x_i = x(t_i;\mu_i)\), stored row-wise in a data.FileMatrix instance.
Default: "[]"
Definition at line 48 of file ApproxTrainData.m.
Referenced by ApproxTrainData(), testing.DEIM.computeDEIMErrors(), computeFrom(), delete(), approx.algorithms.AAdaptiveBase.extendExpansion(), getClosestToCenter(), approx.algorithms.ABase.getError(), getErrorsFor(), getXiDists(), makeUniqueXi(), FunVis2D>rangesFromATD(), models.BaseFullModel.off5_computeApproximation(), relocate(), scaleXiZeroOne(), kernels.KernelExpansion.setCentersFromATD(), splitToTrainValidationSets(), approx.algorithms.VKOGA.startAdaptiveExtension(), subset(), approx.algorithms.AAdaptiveBase.templateComputeApproximation(), and approx.algorithms.Componentwise.templateComputeApproximation().
data.ApproxTrainData.xiDia |
The diameter of the state space samples.
SetAccess = Private, GetAccess = Public
Definition at line 108 of file ApproxTrainData.m.
Referenced by ApproxTrainData(), kernels.config.RBFConfig.getDists(), and kernels.config.ExpansionConfig.guessGammaConfigs().