org.encog.ml.data.versatile.normalizers.strategies

## Class BasicNormalizationStrategy

- java.lang.Object
- - org.encog.ml.data.versatile.normalizers.strategies.BasicNormalizationStrategy

- All Implemented Interfaces:
    NormalizationStrategy

      public class BasicNormalizationStrategy
      extends Object
      implements NormalizationStrategy

  Provides a basic normalization strategy that will work with most models built into Encog. This is often used as a starting point for building more customized models, as this normalizer works mainly by using maps to define which normalizer to use for what data type.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicNormalizationStrategy()` Default constructor.
    `BasicNormalizationStrategy(double inputLow, double inputHigh, double outputLow, double outputHigh)` Construct the basic normalization strategy.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assignInputNormalizer(ColumnType colType, Normalizer norm)` Assign a normalizer to the specified column type for output.
    `void` | `assignOutputNormalizer(ColumnType colType, Normalizer norm)` Assign a normalizer to the specified column type for output.
    `String` | `denormalizeColumn(ColumnDefinition colDef, boolean isInput, MLData data, int dataColumn)` Normalize a column, with a double input.
    `Map<ColumnType,Normalizer>` | `getInputNormalizers()`
    `Map<ColumnType,Normalizer>` | `getOutputNormalizers()`
    `int` | `normalizeColumn(ColumnDefinition colDef, boolean isInput, double value, double[] outputData, int outputColumn)` Normalize a column, with a double value.
    `int` | `normalizeColumn(ColumnDefinition colDef, boolean isInput, String value, double[] outputData, int outputColumn)` Normalize a column, with a string input.
    `int` | `normalizedSize(ColumnDefinition colDef, boolean isInput)` Calculate how many elements a column will normalize into.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BasicNormalizationStrategy

          public BasicNormalizationStrategy(double inputLow,
                                    double inputHigh,
                                    double outputLow,
                                    double outputHigh)

      Construct the basic normalization strategy.
      Parameters:
        `inputLow` - The desired low to normalize input into.
        `inputHigh` - The desired high to normalize input into.
        `outputLow` - The desired low to normalize output into.
        `outputHigh` - The desired high to normalize output into.

    - #### BasicNormalizationStrategy

          public BasicNormalizationStrategy()

      Default constructor.

  - ### Method Detail

    - #### assignInputNormalizer

          public void assignInputNormalizer(ColumnType colType,
                                   Normalizer norm)

      Assign a normalizer to the specified column type for output.
      Parameters:
        `colType` - The column type.
        `norm` - The normalizer.

    - #### assignOutputNormalizer

          public void assignOutputNormalizer(ColumnType colType,
                                    Normalizer norm)

      Assign a normalizer to the specified column type for output.
      Parameters:
        `colType` - The column type.
        `norm` - The normalizer.

    - #### normalizedSize

          public int normalizedSize(ColumnDefinition colDef,
                           boolean isInput)

      Calculate how many elements a column will normalize into.
      Specified by:
        `normalizedSize` in interface `NormalizationStrategy`
      Parameters:
        `colDef` - The column definition.
        `isInput` - True, if this is an input column.
      Returns:
        The number of elements needed to normalize this column.

    - #### normalizeColumn

          public int normalizeColumn(ColumnDefinition colDef,
                            boolean isInput,
                            String value,
                            double[] outputData,
                            int outputColumn)

      Normalize a column, with a string input.
      Specified by:
        `normalizeColumn` in interface `NormalizationStrategy`
      Parameters:
        `colDef` - The column definition.
        `isInput` - True, if this is an input column.
        `value` - The value to normalize.
        `outputData` - The output data.
        `outputColumn` - The element to begin outputing to.
      Returns:
        The new output element, advanced by the correct amount.

    - #### normalizeColumn

          public int normalizeColumn(ColumnDefinition colDef,
                            boolean isInput,
                            double value,
                            double[] outputData,
                            int outputColumn)

      Normalize a column, with a double value.
      Specified by:
        `normalizeColumn` in interface `NormalizationStrategy`
      Parameters:
        `colDef` - The column definition.
        `isInput` - True, if this is an input column.
        `value` - The value to normalize.
        `outputData` - The output data.
        `outputColumn` - The element to begin outputing to.
      Returns:
        The new output element, advanced by the correct amount.

    - #### getInputNormalizers

          public Map<ColumnType,Normalizer> getInputNormalizers()

      Returns:
        the inputNormalizers

    - #### getOutputNormalizers

          public Map<ColumnType,Normalizer> getOutputNormalizers()

      Returns:
        the outputNormalizers

    - #### denormalizeColumn

          public String denormalizeColumn(ColumnDefinition colDef,
                                 boolean isInput,
                                 MLData data,
                                 int dataColumn)

      Normalize a column, with a double input.
      Specified by:
        `denormalizeColumn` in interface `NormalizationStrategy`
      Parameters:
        `colDef` - The column definition.
        `isInput` - True, if this is an input column.
      Returns:
        The new output element, advanced by the correct amount.

Copyright © 2014. All Rights Reserved.