Package samer.models

Class AlignedGaussian

  • All Implemented Interfaces:
    Model, Task


    public class AlignedGaussian
    extends AnonymousTask
    implements Model
    Differential scaler: scales and offsets each element of a vector independently aiming to match a given prior model. This is like ICA using a diagonal weight matrix, with a 'zero-mean' normalisation built in, though it doesn't actually the mean to do this, but some statistic based on the prior model.
    See Also:
    Serialized Form
    • Nested Class Summary

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void compute()
      contract is that getEnergy and getGradient must return correct values for current x after infer and compute has been called, but not necessarily before.
      void dispose() 
      Functionx functionx()
      This presents a more functional interface to the model so that it can be driven by an optimiser.
      double getEnergy()
      return E = -log p(x)
      double[] getGradient()
      return dE/dx
      int getSize()
      return size of vector this model expects
      void infer()
      should infer values latent variables
      VVector output() 
      void reset() 
      void reset(double k) 
      void run() 
      void setInput(Vec in)
      model should begin observing this vector
      void starting() 
      void stopping() 
      java.lang.String toString() 
      VVector weights() 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AlignedGaussian

        public AlignedGaussian(int N)
      • AlignedGaussian

        public AlignedGaussian(Vec input)
    • Method Detail

      • getSize

        public int getSize()
        Description copied from interface: Model
        return size of vector this model expects
        Specified by:
        getSize in interface Model
      • weights

        public VVector weights()
      • setInput

        public void setInput(Vec in)
        Description copied from interface: Model
        model should begin observing this vector
        Specified by:
        setInput in interface Model
      • reset

        public void reset()
      • reset

        public void reset(double k)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • infer

        public void infer()
        Description copied from interface: Model
        should infer values latent variables
        Specified by:
        infer in interface Model
      • compute

        public void compute()
        Description copied from interface: Model
        contract is that getEnergy and getGradient must return correct values for current x after infer and compute has been called, but not necessarily before. This is to give model an opportunity to cache values of energy and gradient to avoid repeated computations.
        Specified by:
        compute in interface Model
      • getEnergy

        public double getEnergy()
        Description copied from interface: Model
        return E = -log p(x)
        Specified by:
        getEnergy in interface Model
      • getGradient

        public double[] getGradient()
        Description copied from interface: Model
        return dE/dx
        Specified by:
        getGradient in interface Model
      • functionx

        public Functionx functionx()
        Description copied from interface: Model
        This presents a more functional interface to the model so that it can be driven by an optimiser. See classes Functionx and MinimiserBase in package samer.maths.opt.
        Specified by:
        functionx in interface Model
      • run

        public void run()
        Specified by:
        run in interface Task