org.encog.app.analyst.script

## Class AnalystScript

- java.lang.Object
- - org.encog.app.analyst.script.AnalystScript

-     public class AnalystScript
      extends Object

  Holds a script for the Encog Analyst.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_MAX_CLASS` The default MAX size for a class.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnalystScript()` Construct an analyst script.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTask(AnalystTask task)` Add a task.
    `void` | `clearTasks()` Clear all tasks.
    `AnalystField` | `defineClass(String fieldName, FieldDirection d, NormalizationAction action, List<ClassItem> classes)`
    `AnalystField` | `defineField(String fieldName, FieldDirection d, NormalizationAction action, double theActualHigh, double theActualLow)`
    `CSVFormat` | `determineFormat()` Determine the output format.
    `boolean` | `expectInputHeaders(String filename)` Determine if input headers are expected.
    `AnalystField` | `findAnalystField(String fieldName)`
    `DataField` | `findDataField(String name)` Find the specified data field.
    `int` | `findDataFieldIndex(DataField df)` Find the specified data field and return its index.
    `AnalystField` | `findNormalizedField(String name, int slice)` Find the specified normalized field.
    `String` | `getBasePath()`
    `DataField[]` | `getFields()`
    `AnalystNormalize` | `getNormalize()`
    `List<ScriptOpcode>` | `getOpcodes()`
    `int` | `getPrecision()`
    `AnalystProcess` | `getProcess()`
    `ScriptProperties` | `getProperties()`
    `AnalystSegregate` | `getSegregate()`
    `AnalystTask` | `getTask(String name)` Get the specified task.
    `Map<String,AnalystTask>` | `getTasks()`
    `boolean` | `hasClasses()`
    `void` | `init()` Init this script.
    `boolean` | `isGenerated(String filename)` Determine if the specified file was generated.
    `void` | `load(InputStream stream)` Load the script.
    `void` | `markGenerated(String filename)` Mark the sepcified filename as generated.
    `File` | `resolveFilename(String sourceID)` Resolve the specified filename.
    `void` | `save(OutputStream stream)` Save to the specified output stream.
    `void` | `setBasePath(String theBasePath)` Set the base path.
    `void` | `setDefaultNormalizedRange(double low, double high)`
    `void` | `setFields(DataField[] theFields)`

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

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

- - ### Field Detail

    - #### DEFAULT_MAX_CLASS

          public static final int DEFAULT_MAX_CLASS

      The default MAX size for a class.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AnalystScript

          public AnalystScript()

      Construct an analyst script.

  - ### Method Detail

    - #### addTask

          public void addTask(AnalystTask task)

      Add a task.
      Parameters:
        `task` - The task to add.

    - #### clearTasks

          public void clearTasks()

      Clear all tasks.

    - #### determineFormat

          public CSVFormat determineFormat()

      Determine the output format.
      Returns:
        The output format.

    - #### expectInputHeaders

          public boolean expectInputHeaders(String filename)

      Determine if input headers are expected.
      Parameters:
        `filename` - The filename.
      Returns:
        True if headers are expected.

    - #### findDataField

          public DataField findDataField(String name)

      Find the specified data field. Use name to find, and ignore case.
      Parameters:
        `name` - The name to search for.
      Returns:
        The specified data field.

    - #### findDataFieldIndex

          public int findDataFieldIndex(DataField df)

      Find the specified data field and return its index.
      Parameters:
        `df` - The data field to search for.
      Returns:
        The index of the specified data field, or -1 if not found.

    - #### findNormalizedField

          public AnalystField findNormalizedField(String name,
                                         int slice)

      Find the specified normalized field. Search without case.
      Parameters:
        `name` - The name of the field we are searching for.
        `slice` - The timeslice.
      Returns:
        The analyst field that was found.

    - #### getBasePath

          public String getBasePath()

      Returns:
        The base path.

    - #### getFields

          public DataField[] getFields()

      Returns:
        the data fields.

    - #### getNormalize

          public AnalystNormalize getNormalize()

      Returns:
        the normalize

    - #### getPrecision

          public int getPrecision()

      Returns:
        The precision.

    - #### getProperties

          public ScriptProperties getProperties()

      Returns:
        the properties

    - #### getSegregate

          public AnalystSegregate getSegregate()

      Returns:
        the segregate

    - #### getTask

          public AnalystTask getTask(String name)

      Get the specified task.
      Parameters:
        `name` - The name of the testk.
      Returns:
        The analyst task.

    - #### getTasks

          public Map<String,AnalystTask> getTasks()

      Returns:
        The tasks.

    - #### init

          public void init()

      Init this script.

    - #### isGenerated

          public boolean isGenerated(String filename)

      Determine if the specified file was generated.
      Parameters:
        `filename` - The filename to check.
      Returns:
        True, if the specified file was generated.

    - #### load

          public void load(InputStream stream)

      Load the script.
      Parameters:
        `stream` - The stream to load from.

    - #### markGenerated

          public void markGenerated(String filename)

      Mark the sepcified filename as generated.
      Parameters:
        `filename` - The filename.

    - #### resolveFilename

          public File resolveFilename(String sourceID)

      Resolve the specified filename.
      Parameters:
        `sourceID` - The filename to resolve.
      Returns:
        The file path.

    - #### save

          public void save(OutputStream stream)

      Save to the specified output stream.
      Parameters:
        `stream` - The output stream.

    - #### setBasePath

          public void setBasePath(String theBasePath)

      Set the base path.
      Parameters:
        `theBasePath` - The base path.

    - #### setFields

          public void setFields(DataField[] theFields)

      Parameters:
        `theFields` - the fields to set

    - #### findAnalystField

          public AnalystField findAnalystField(String fieldName)

    - #### getProcess

          public AnalystProcess getProcess()

    - #### getOpcodes

          public List<ScriptOpcode> getOpcodes()

      Returns:
        the opcodes

    - #### hasClasses

          public boolean hasClasses()

    - #### defineField

          public AnalystField defineField(String fieldName,
                                 FieldDirection d,
                                 NormalizationAction action,
                                 double theActualHigh,
                                 double theActualLow)

    - #### setDefaultNormalizedRange

          public void setDefaultNormalizedRange(double low,
                                       double high)

    - #### defineClass

          public AnalystField defineClass(String fieldName,
                                 FieldDirection d,
                                 NormalizationAction action,
                                 List<ClassItem> classes)

Copyright © 2014. All Rights Reserved.