Documentation of 'org.joone.engine.SpatialMap' Java class
SpatialMap
org.joone.engine

Class SpatialMap

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    CircularSpatialMap, GaussianSpatialMap


    public abstract class SpatialMap
    extends java.lang.Object
    implements java.io.Serializable

    SpatialMap is intended to be an abstract spatial map for use with a GaussianLayer. Custom SpatialMap's need to extend the ApplyNeighborhood method and implement it based on their own spatial shape implementation. The Gaussian spatial size is updated if the current epoch is less than the ordering phase, it is also reduced over the ordering phase based on the time constant.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      SpatialMap() 
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      abstract void ApplyNeighborhoodFunction(double[] distances, double[] n_outs, boolean isLearning)
      Applies the neighborhood strategy based on this spatial maps implementation.
      double getCurrentGaussianSize()
      Gets the current gaussian size of the spatial neighborhood.
      double getInitialGaussianSize()
      Gets the size of the spatial neighborhood.
      int getMapDepth()
      Gets the depth of this spatial map.
      int getMapHeight()
      Gets the height of this spatial map.
      int getMapWidth()
      Gets the width of this spatial map.
      int getOrderingPhase()
      Getter for property orderingPhase.
      double getTimeConstant()
      Getter for property TimeConstant.
      int getTotalEpochs()
      Gets the total number of epochs for the current session.
      void init(int total_epochs)
      Initialises this spatial map according to the total number of epochs/cycles.
      void setCurrentGaussianSize(double size)
      Sets the current guassian size of the spatial neighborhood.
      void setInitialGaussianSize(double size)
      Sets the initial guassian size of the spatial neighborhood.
      void setMapDepth(int d)
      Sets the depth of this spatial map.
      void setMapDimensions(int x, int y, int z)
      Sets the dimensions of the spatial map.
      void setMapHeight(int h)
      Sets the height of this spatial map.
      void setMapWidth(int w)
      Sets the width of this spatial map.
      void setOrderingPhase(int orderingPhase)
      Setter for property orderingPhase.
      void setTimeConstant(double TimeConstant)
      Setter for property TimeConstant.
      void updateCurrentGaussianSize(int current_epoch)
      Updates the current Gaussian Size depending on the current epoch and the time constant.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpatialMap

        public SpatialMap()
    • Method Detail

      • init

        public final void init(int total_epochs)

        Initialises this spatial map according to the total number of epochs/cycles.

        Parameters:
        total_epochs - The total number of epochs that will be used.
      • getTotalEpochs

        public final int getTotalEpochs()

        Gets the total number of epochs for the current session.

        Returns:
        The total number of epochs for the current session.
      • setInitialGaussianSize

        public final void setInitialGaussianSize(double size)

        Sets the initial guassian size of the spatial neighborhood.

        Parameters:
        size - The size of the neighborhood.
      • getInitialGaussianSize

        public final double getInitialGaussianSize()

        Gets the size of the spatial neighborhood.

        Returns:
        The size of the spatial neighborhood.
      • setCurrentGaussianSize

        public final void setCurrentGaussianSize(double size)

        Sets the current guassian size of the spatial neighborhood.

        Parameters:
        size - The current guassian size of the spatial neighborhood.
      • getCurrentGaussianSize

        public final double getCurrentGaussianSize()

        Gets the current gaussian size of the spatial neighborhood.

        Returns:
        The current gaussian size of the spatial neighborhood.
      • updateCurrentGaussianSize

        public final void updateCurrentGaussianSize(int current_epoch)

        Updates the current Gaussian Size depending on the current epoch and the time constant.

        Parameters:
        current_epoch - The current epoch or cycle.
      • ApplyNeighborhoodFunction

        public abstract void ApplyNeighborhoodFunction(double[] distances,
                                                       double[] n_outs,
                                                       boolean isLearning)

        Applies the neighborhood strategy based on this spatial maps implementation.

        Parameters:
        distances - The euclidean distances between input and weights calculated by previous synapse.
        n_outs - The outputs of this spatial maps neighborhood strategy.
        isLearning - Is the network in the learning phase.
      • setMapDimensions

        public final void setMapDimensions(int x,
                                           int y,
                                           int z)

        Sets the dimensions of the spatial map. Allows dimension setting in one call.

        Parameters:
        x - The x size or width of the map.
        y - The y size or height of the map.
        z - The z size of depth of the map.
      • setMapWidth

        public final void setMapWidth(int w)
        Sets the width of this spatial map.
        Parameters:
        w - The width or x size of the map.
      • setMapHeight

        public final void setMapHeight(int h)
        Sets the height of this spatial map.
        Parameters:
        h - The height or y size of the map.
      • setMapDepth

        public final void setMapDepth(int d)
        Sets the depth of this spatial map.
        Parameters:
        d - The depth or z size of the map.
      • getMapWidth

        public final int getMapWidth()

        Gets the width of this spatial map.

        Returns:
        The width of this spatial map.
      • getMapHeight

        public final int getMapHeight()

        Gets the height of this spatial map.

        Returns:
        The height of this spatial map.
      • getMapDepth

        public final int getMapDepth()

        Gets the depth of this spatial map.

        Returns:
        The depth of this spatial map.
      • getOrderingPhase

        public int getOrderingPhase()
        Getter for property orderingPhase.
        Returns:
        Value of property orderingPhase.
      • setOrderingPhase

        public void setOrderingPhase(int orderingPhase)
        Setter for property orderingPhase.
        Parameters:
        orderingPhase - New value of property orderingPhase.
      • getTimeConstant

        public double getTimeConstant()
        Getter for property TimeConstant.
        Returns:
        Value of property TimeConstant.
      • setTimeConstant

        public void setTimeConstant(double TimeConstant)
        Setter for property TimeConstant.
        Parameters:
        TimeConstant - New value of property TimeConstant.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.