model
Class BasicTwoFidelityModel

java.lang.Object
  extended by function.BasicScalarFunction
      extended by function.VariableDomainScalarFunction
          extended by model.BasicTwoFidelityModel
All Implemented Interfaces:
DataListener, Computable, ScalarFunction, VariableBounds, VariableInputDimension, ApproxModel, DataFit, TwoFidelityApproxModel

public class BasicTwoFidelityModel
extends VariableDomainScalarFunction
implements TwoFidelityApproxModel

Basic two-fidelity approximation model, using an additive surrogate correction. The difference is modeled using a GPRegression.

Author:
dgorur

Field Summary
 
Fields inherited from class function.BasicScalarFunction
DEFAULT_BOUNDS, DEFAULT_DIM, VALUE_OUTSIDE_BOUNDS
 
Constructor Summary
BasicTwoFidelityModel()
           
 
Method Summary
 void calibrate()
          Calibrates this DataFit.
 void calibrateOptional()
          Optional calibration, based on some measure of calibration being required.
 void clear()
          Notification that all data has been removed.
 int dataAdded(DataBlock block)
          Notification that a DataBlock has been added.
 boolean dataAdded(DataPoint dataPoint)
          Notification that a single DataPoint has been added.
 int dataRemoved(DataBlock dataBlock)
          Notification that a DataBlock has been removed.
 boolean dataRemoved(DataPoint dataPoint)
          Notification that a single DataPoint has been removed.
 GPRegression getDifferenceGP()
          Returns the GPRegression modeling the difference between the high- and low-fidelity analyses..
 ScalarFunction getLoFiFunction()
          Returns the low-fidelity approximation used by this ApproxModel.
 double getMaxUncertainty()
           
 int getOutputNumber()
          In the case when this DataFit operates on a multi-output DataBlocks, denotes the index of the output vector that it should use.
 ScalarFunction getUncertaintyEstimator()
           
 void init()
          Initialization method.
 double quickCompute(double[] x)
          Compute method without dimension checking.
 void quickCompute(cern.colt.matrix.DoubleMatrix2D mat, cern.colt.matrix.DoubleMatrix1D outputs)
          Compute method without dimension checking, operating on DoubleMatrix2D and exploiting optimized operations therein.
 void setDifferenceGP(GPRegression differenceGP)
          Sets the difference-modeling GP.
 void setLoFiFunction(ScalarFunction function)
          Sets the low-fidelity approximation to be used.
 void setOutputNumber(int outputNumber)
          Sets the output index for this DataFit.
 
Methods inherited from class function.VariableDomainScalarFunction
getBounds, getInputDimension, setBounds, setInputDimension
 
Methods inherited from class function.BasicScalarFunction
checkDimensions, compute, compute, compute, compute, compute, compute, getOutputDimension, isWithinBounds, makeBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface function.ScalarFunction
compute, compute, compute, compute
 
Methods inherited from interface function.Computable
compute, compute, getBounds, getInputDimension, getOutputDimension, isWithinBounds
 
Methods inherited from interface function.VariableInputDimension
setInputDimension
 
Methods inherited from interface function.VariableBounds
setBounds
 

Constructor Detail

BasicTwoFidelityModel

public BasicTwoFidelityModel()
Method Detail

calibrate

public void calibrate()
Description copied from interface: DataFit
Calibrates this DataFit.

Specified by:
calibrate in interface DataFit

calibrateOptional

public void calibrateOptional()
Description copied from interface: DataFit
Optional calibration, based on some measure of calibration being required.

Specified by:
calibrateOptional in interface DataFit

clear

public void clear()
Description copied from interface: DataListener
Notification that all data has been removed.

Specified by:
clear in interface DataListener

dataAdded

public int dataAdded(DataBlock block)
Description copied from interface: DataListener
Notification that a DataBlock has been added.

Specified by:
dataAdded in interface DataListener
Parameters:
block - the DataBlock added.
Returns:
number of points successfully added.

dataAdded

public boolean dataAdded(DataPoint dataPoint)
Description copied from interface: DataListener
Notification that a single DataPoint has been added.

Specified by:
dataAdded in interface DataListener
Parameters:
dataPoint - the DataPoint added.
Returns:
true if the DataPoint was successfully added.

dataRemoved

public int dataRemoved(DataBlock dataBlock)
Description copied from interface: DataListener
Notification that a DataBlock has been removed.

Specified by:
dataRemoved in interface DataListener
Parameters:
dataBlock - the DataBlock removed.
Returns:
the number of DataPoints successfully removed.

dataRemoved

public boolean dataRemoved(DataPoint dataPoint)
Description copied from interface: DataListener
Notification that a single DataPoint has been removed.

Specified by:
dataRemoved in interface DataListener
Parameters:
dataPoint - the DataPointremoved.
Returns:
true if the DataPoint was successfully removed.

getDifferenceGP

public GPRegression getDifferenceGP()
Returns the GPRegression modeling the difference between the high- and low-fidelity analyses..

Returns:
the difference GP.

getLoFiFunction

public ScalarFunction getLoFiFunction()
Description copied from interface: TwoFidelityApproxModel
Returns the low-fidelity approximation used by this ApproxModel.

Specified by:
getLoFiFunction in interface TwoFidelityApproxModel
Returns:
the low-fidelity approximation used.

getMaxUncertainty

public double getMaxUncertainty()
Specified by:
getMaxUncertainty in interface ApproxModel

getOutputNumber

public int getOutputNumber()
Description copied from interface: DataFit
In the case when this DataFit operates on a multi-output DataBlocks, denotes the index of the output vector that it should use.

Specified by:
getOutputNumber in interface DataFit
Returns:
the output number of this DataFit.

getUncertaintyEstimator

public ScalarFunction getUncertaintyEstimator()
Specified by:
getUncertaintyEstimator in interface ApproxModel

init

public void init()
Description copied from class: BasicScalarFunction
Initialization method.

Specified by:
init in interface ScalarFunction
Specified by:
init in interface DataFit
Overrides:
init in class VariableDomainScalarFunction

quickCompute

public double quickCompute(double[] x)
Description copied from class: BasicScalarFunction
Compute method without dimension checking. All subclasses must implement this method: it is the core method that defines the function.

Specified by:
quickCompute in interface ScalarFunction
Specified by:
quickCompute in class BasicScalarFunction
Parameters:
x - the given input.
Returns:
the output corresponding to the given input.

quickCompute

public void quickCompute(cern.colt.matrix.DoubleMatrix2D mat,
                         cern.colt.matrix.DoubleMatrix1D outputs)
Description copied from class: BasicScalarFunction
Compute method without dimension checking, operating on DoubleMatrix2D and exploiting optimized operations therein.

Specified by:
quickCompute in interface ScalarFunction
Overrides:
quickCompute in class BasicScalarFunction
Parameters:
mat - given matrix of inputs.
outputs - vector to store the result.

setDifferenceGP

public void setDifferenceGP(GPRegression differenceGP)
Sets the difference-modeling GP.

Parameters:
differenceGP - the given GPRegression.

setLoFiFunction

public void setLoFiFunction(ScalarFunction function)
Description copied from interface: TwoFidelityApproxModel
Sets the low-fidelity approximation to be used.

Specified by:
setLoFiFunction in interface TwoFidelityApproxModel
Parameters:
function - the given low-order function.

setOutputNumber

public void setOutputNumber(int outputNumber)
Description copied from interface: DataFit
Sets the output index for this DataFit.

Specified by:
setOutputNumber in interface DataFit
Parameters:
outputNumber - the given output index.