KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sampling.RandomSampler Class Reference

RandomSampler Selects Samples many random parameters. More...

Detailed Description

RandomSampler Selects Samples many random parameters.

Author
Daniel Wirtz
Date
2011-10-11
New in 0.7:
(Daniel Wirtz, 2013-02-22) Added a new property Spacing to also allow for logarithmical sampling over the parameter ranges.
New in 0.5:
(Daniel Wirtz, 2011-10-11) Added this class (former version renamed to WeightedRandomSampler)

Definition at line 18 of file RandomSampler.m.

Public Member Functions

 RandomSampler ()
 
function matrix
< double > samples = 
performSampling (params)
 Randomly generates input samples by choosing params and time parameter by chance. More...
 
- Public Member Functions inherited from sampling.BaseSampler
function
samples = 
generateSamples (models.BaseFullModel model)
 
virtual function
samples = 
performSampling ()
 Template method for actual sampling. More...
 
- Public Member Functions inherited from KerMorObject
 KerMorObject ()
 Constructs a new KerMor object. More...
 
function  display ()
 disp(object2str(this)); More...
 
function bool = eq (B)
 Checks equality of two KerMor objects. More...
 
function bool = ne (B)
 Checks if two KerMorObjects are different. More...
 
function cn = getClassName ()
 Returns the simple class name of this object without packages. More...
 
- Public Member Functions inherited from DPCMObject
 DPCMObject ()
 Creates a new DPCM object. More...
 
 DPCMObject ()
 

Static Public Member Functions

static function res = test_DomainSampling ()
 setup parameter domain etc domain are all points in unit square with norm > 0.7 More...
 
- Static Public Member Functions inherited from sampling.BaseSampler
static function res = test_SubsetSampling ()
 setup parameter domain etc domain are all points in unit square with norm > 0.7 More...
 

Public Attributes

 Samples = 30
 The number of samples to take. More...
 
integer Seed = "[]"
 The seed for the random number generator. More...
 
- Public Attributes inherited from sampling.BaseSampler
sampling.Domain Domain = "[]"
 A domain from which the produced/generated samples may come from. Use in subclasses at the sampling.BaseSampler.performSampling method. More...
 
- Public Attributes inherited from DPCMObject
 WorkspaceVariableName = ""
 The workspace variable name of this class. Optional. More...
 
 ID = "[]"
 An ID that allows to uniquely identify this DPCMObject (at least within the current MatLab session/context). More...
 
 PropertiesChanged = "[]"
 The Dictionary containing all the property settings as key/value pairs. 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...
 

Static Protected Member Functions

static function obj = loadobj (obj)
 
- Static Protected Member Functions inherited from sampling.BaseSampler
static function obj = loadobj (obj, from)
 
- Static Protected Member Functions inherited from DPCMObject
static function obj = loadobj (obj, from)
 Re-register any registered change listeners! More...
 
static function obj = loadobj (obj, from)
 

Additional Inherited Members

- Protected Member Functions inherited from KerMorObject
function  checkType (obj, type)
 Object typechecker. More...
 
- Protected Member Functions inherited from DPCMObject
function  registerProps (varargin)
 Call this method at any class that defines DPCM observed properties. More...
 
function  registerProps (varargin)
 

Constructor & Destructor Documentation

sampling.RandomSampler.RandomSampler ( )

Definition at line 72 of file RandomSampler.m.

References DPCMObject.registerProps().

Here is the call graph for this function:

Member Function Documentation

static function obj = sampling.RandomSampler.loadobj (   obj)
staticprotected

Definition at line 196 of file RandomSampler.m.

function matrix< double > samples = sampling.RandomSampler.performSampling (   params)

Randomly generates input samples by choosing params and time parameter by chance.

Parameters
modelthe full or reduced model
Return values
samplesthe randomly chosen parameters, number of rows equal to number of model's parameters, number of columns as specified in property Samples

Definition at line 89 of file RandomSampler.m.

References sampling.Domain.filter(), sampling.Domain.Points, Samples, Seed, handle.sort, and t.

Here is the call graph for this function:

function res = sampling.RandomSampler.test_DomainSampling ( )
static

setup parameter domain etc domain are all points in unit square with norm > 0.7

Definition at line 166 of file RandomSampler.m.

References all(), and Norm.L2().

Here is the call graph for this function:

Member Data Documentation

sampling.RandomSampler.Samples = 30

The number of samples to take.

Property class critical:
Determines how many parameter samples are taken and thus directly the offline computation time and model approximation quality.

Default: 30

Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.
This property has custom functionality when its value is changed.

Definition at line 36 of file RandomSampler.m.

Referenced by sampling.WeightedRandomSampler.performSampling(), and performSampling().

sampling.RandomSampler.Seed = "[]"

The seed for the random number generator.

If empty, a seed computed from the cputime is used.

Property class optional:
Set to empty for new choices on every run.

Default: []

Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.

Definition at line 52 of file RandomSampler.m.

Referenced by performSampling().


The documentation for this class was generated from the following file: