The SUMO toolbox  2018a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | List of all members
SliceSampleFactory Class Reference

Base class for all model factories. More...

Inheritance diagram for SliceSampleFactory:
Inheritance graph
[legend]

Public Member Functions

function SliceSampleFactory (var ip, var varargin)
 Class constructor. More...
 
function isSliceSamplingEnabled ()
 Performs elliptical slice sampling. More...
 
function getConstraintFcn ()
 TODO. More...
 
function getCreationFcn ()
 TODO. More...
 
function getCrossoverFcn ()
 TODO. More...
 
function getMutationFcn ()
 TODO. More...
 
function isCustomMode ()
 TODO. More...
 
function getBatchObservables ()
 TODO. More...
 
function getIndividualSize ()
 TODO. More...
 
function setSamples (var samples, var values)
 TODO. More...
 
function getIntegerParameters ()
 MATLAB GA supports handling parameters as integers, override this function in derived factories when parameters must be handled as integers. More...
 
function getBasicBatchObservables ()
 TODO. More...
 
function createInitialPopulation (var GenomeLength, var FitnessFcn, var options)
 TODO. More...
 
function wrapFunctions ()
 TODO. More...
 
function getModelType ()
 What is the type of models that this factory generates (returns a string, e.g., 'SVMModel') More...
 
function mutation (var parents, var options, var nvars, var FitnessFcn, var state, var thisScore, var thisPopulation)
 A mutation function. More...
 
function crossover (var parents, var options, var nvars, var FitnessFcn, var unused, var thisPopulation)
 A crossover function. More...
 
function getSamples ()
 TODO. More...
 
function getDimensions ()
 TODO. More...
 
function createRandomModel ()
 TODO. More...
 
function getObservables ()
 TODO. More...
 
function getParallelMode ()
 TODO. More...
 
function getMode ()
 TODO. More...
 
function createInitialModels (var number, var wantModels)
 Generate 'number' models. More...
 
function getBounds ()
 Return the lower bounds and upper bounds (each a row vector) for each model parameter. More...
 
function createModel (var parameters)
 Create a model object represented by the given parameters. More...
 
function supportsComplexData ()
 Return true if this factory can generate models that can work on complex data directly. More...
 
function supportsMultipleOutputs ()
 Return true if this factory can generate models with multiple outputs. More...
 

Protected Member Functions

function performSliceSampling (var hp0, var likelihood)
 Performs standard slice sampling. More...
 
function sliceSample (var initModel)
 Creates a set of models, by slicesampling the likelihood of a model provided initially. More...
 

Detailed Description

Base class for all model factories.

Constructor & Destructor Documentation

function SliceSampleFactory ( var  ip,
var  varargin 
)
inline

Class constructor.

Returns
instance of the class

Member Function Documentation

function createInitialModels ( var  number,
var  wantModels 
)
inlineinherited

Generate 'number' models.

if wantModels=true they should be model objects, else a matrix should be returned with each row containing the parameters of one model This method should internally use createModel(..) where possible.

function createInitialPopulation ( var  GenomeLength,
var  FitnessFcn,
var  options 
)
inherited

TODO.

A function that creates an initial population.

The input arguments to the function are Genomelength : Number of independent variables for the fitness function FitnessFcn : Fitness function options : Options structure The function returns Population, the initial population for the genetic algorithm.

function createModel ( var  parameters)
inherited

Create a model object represented by the given parameters.

The following calling signatures should be supported:

  • no parameters are passed: return a default model as defined by the config
  • parameters is a double vector: return a model with the hyperparameters set to the passed values
  • parameters is a model object: do nothing, simply return the passed object
function createRandomModel ( )
inlineinherited

TODO.

function crossover ( var  parents,
var  options,
var  nvars,
var  FitnessFcn,
var  unused,
var  thisPopulation 
)
inherited

A crossover function.

function getBasicBatchObservables ( )
inherited

TODO.

Generate the observable objects that handle grouped data.

function getBatchObservables ( )
inlineinherited

TODO.

function getBounds ( )
inlineinherited

Return the lower bounds and upper bounds (each a row vector) for each model parameter.

function getConstraintFcn ( )
inlineinherited

TODO.

function getCreationFcn ( )
inlineinherited

TODO.

function getCrossoverFcn ( )
inlineinherited

TODO.

function getDimensions ( )
inlineinherited

TODO.

function getIndividualSize ( )
inlineinherited

TODO.

function getIntegerParameters ( )
inlineinherited

MATLAB GA supports handling parameters as integers, override this function in derived factories when parameters must be handled as integers.

function getMode ( )
inlineinherited

TODO.

function getModelType ( )
inherited

What is the type of models that this factory generates (returns a string, e.g., 'SVMModel')

function getMutationFcn ( )
inlineinherited

TODO.

function getObservables ( )
inlineinherited

TODO.

function getParallelMode ( )
inlineinherited

TODO.

function getSamples ( )
inlineinherited

TODO.

function isCustomMode ( )
inlineinherited

TODO.

function isSliceSamplingEnabled ( )
inline

Performs elliptical slice sampling.

Parameters
hp0starting point for the sampling
likelihoodfunction handle providing the log-likelihood
function mutation ( var  parents,
var  options,
var  nvars,
var  FitnessFcn,
var  state,
var  thisScore,
var  thisPopulation 
)
inherited

A mutation function.

function performSliceSampling ( var  hp0,
var  likelihood 
)
protected

Performs standard slice sampling.

Method implementing standard slice sampling.

Parameters
hp0starting point for the sampling
likelihoodfunction handle providing the log-likelihood
function setSamples ( var  samples,
var  values 
)
inlineinherited

TODO.

function sliceSample ( var  initModel)
protected

Creates a set of models, by slicesampling the likelihood of a model provided initially.

Should be implemented in the subclass. Preferably using the protected methods of this class.

Parameters
initModelmodel to start from.
function supportsComplexData ( )
inherited

Return true if this factory can generate models that can work on complex data directly.

function supportsMultipleOutputs ( )
inherited

Return true if this factory can generate models with multiple outputs.

function wrapFunctions ( )
inherited

TODO.

Create anonymous function handles to wrap all operator functions to members of the given obj The genetic operator functions are memberfunctions and thus need to be called with the 'this' object (s).

To make this possible we need to wrap them in an anonymous function. And set them again as function handles.


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