umontreal.iro.lecuyer.stochprocess
Class InverseGaussianProcess
- java.lang.Object
-
- umontreal.iro.lecuyer.stochprocess.StochasticProcess
-
- umontreal.iro.lecuyer.stochprocess.InverseGaussianProcess
-
- Direct Known Subclasses:
- InverseGaussianProcessMSH, InverseGaussianProcessPCA
public class InverseGaussianProcess extends StochasticProcess
The inverse Gaussian process is a non-decreasing process where the increments are additive and are given by the inverse gaussian distribution,InverseGaussianDist. With parameters δ and γ, the time increments are given byInverseGaussianDist(δdt/γ, δ2dt2).[We here use the inverse gaussian distribution parametrized with IGDist (μ, λ), where μ = δ/γ and λ = δ2. If we instead used the parametrization IGDist
(δ, γ),
then the increment distribution of our process would have been written
more simply as
IGDist[tex2html_wrap_inline158](δdt, γ).]
The increments are generated by using the inversion of the cumulative distribution function. It therefore uses only one
RandomStream. Subclasses of this class use different generating methods and some need twoRandomStream's.The initial value of this process is the initial observation time.
-
-
Constructor Summary
Constructors Constructor and Description InverseGaussianProcess(double s0, double delta, double gamma, RandomStream stream)Constructs a new InverseGaussianProcess.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]generatePath()Generates, returns, and saves the sample path {X(t0), X(t1),…, X(td)}.double[]generatePath(double[] uniforms01)Instead of using the internal stream to generate the path, uses an array of uniforms U[0, 1).double[]generatePath(double[] uniforms01, double[] uniforms01b)This method does not work for this class, but will be useful for the subclasses that require two streams.doublegetAnalyticAverage(double time)Returns the analytic average which is δt/γ, with t = time.doublegetAnalyticVariance(double time)Returns the analytic variance which is (δt)2, with t = time.doublegetDelta()Returns δ.doublegetGamma()Returns γ.intgetNumberOfRandomStreams()Returns the number of random streams of this process.RandomStreamgetStream()Returns the random stream of the underlying generator.doublenextObservation()Generates and returns the next observation X(tj) of the stochastic process.voidsetParams(double delta, double gamma)Sets the parameters.voidsetStream(RandomStream stream)Resets the random stream of the underlying generator to stream.-
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess
generatePath, getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, resetStartProcess, setObservationTimes, setObservationTimes, setX0
-
-
-
-
Constructor Detail
-
InverseGaussianProcess
public InverseGaussianProcess(double s0, double delta, double gamma, RandomStream stream)Constructs a new InverseGaussianProcess. The initial value s0 will be overridden by t[0] when the observation times are set.
-
-
Method Detail
-
generatePath
public double[] generatePath()
Description copied from class:StochasticProcessGenerates, returns, and saves the sample path {X(t0), X(t1),…, X(td)}. It can then be accessed via getPath, getSubpath, or getObservation. The generation method depends on the process type.- Specified by:
generatePathin classStochasticProcess
-
generatePath
public double[] generatePath(double[] uniforms01)
Instead of using the internal stream to generate the path, uses an array of uniforms U[0, 1). The array should be of the length of the number of periods in the observation times. This method is useful forNormalInverseGaussianProcess.
-
generatePath
public double[] generatePath(double[] uniforms01, double[] uniforms01b)This method does not work for this class, but will be useful for the subclasses that require two streams.
-
nextObservation
public double nextObservation()
Description copied from class:StochasticProcessGenerates and returns the next observation X(tj) of the stochastic process. The processes are usually sampled sequentially, i.e. if the last observation generated was for time tj-1, the next observation returned will be for time tj. In some cases, subclasses extending this abstract class may use non-sequential sampling algorithms (such as bridge sampling). The order of generation of the tj's is then specified by the subclass. All the processes generated using principal components analysis (PCA) do not have this method.- Overrides:
nextObservationin classStochasticProcess
-
setParams
public void setParams(double delta, double gamma)Sets the parameters.
-
getDelta
public double getDelta()
Returns δ.
-
getGamma
public double getGamma()
Returns γ.
-
getAnalyticAverage
public double getAnalyticAverage(double time)
Returns the analytic average which is δt/γ, with t = time.
-
getAnalyticVariance
public double getAnalyticVariance(double time)
Returns the analytic variance which is (δt)2, with t = time.
-
getStream
public RandomStream getStream()
Description copied from class:StochasticProcessReturns the random stream of the underlying generator.- Specified by:
getStreamin classStochasticProcess
-
setStream
public void setStream(RandomStream stream)
Description copied from class:StochasticProcessResets the random stream of the underlying generator to stream.- Specified by:
setStreamin classStochasticProcess
-
getNumberOfRandomStreams
public int getNumberOfRandomStreams()
Returns the number of random streams of this process. It is useful because some subclasses use different number of streams. It returns 1 forInverseGaussianProcess.
-
-
DMelt 3.0 © DataMelt by jWork.ORG