Solo Predictor Script Commands Summary

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search

Import of data into object

obj = 'filename.ext'
obj = 'C:/fully/qualified/path/filename.ext'
obj = '//fully/qualified/path/filename.ext'
obj = 'filename.mat?variable'
obj = '<xml>(PLS_Toolbox XML Format)</xml>'
obj = '3,4,5'
obj = '"string"'

See Script Construction Importing Commands for more details.

Apply one object to another

  • Apply a model object to a data object:
 result = data|model           
  • Apply a preprocessing object to a data object:
 result = data|preprocessing
  • Augment two data objects together:
 result = data_1|data_2

Fields in "result" will depend on the model and object types.

See Application of Models and Preprocessing Commands for more details.

Retrieving Results

Return request command

Return value of object or property of object in returned string:


See Requesting Return Values for more details.

Output Format commands:

Configure the format of output strings

   :xml         -set output format to XML
   :plain       -set output format to plain text
   :html        -set output format to HTML
   :json        -set output format to JSON

See Response Message Format for more details.

Write To File command

Create output file using a template file for formatting

   :writefile 'output.ext' 'template.tem' –append

Optional flag "-append" will append to end of output.ext instead of replacing the file. If 'template.tem' filename is omitted, a template file named 'output.tem' is expected in the same folder as the output file.

The Template file can contain static text and replacement fields using square brackets around return-request-style codes, for example:

    "the T-squared value is [pred.t2]"

replacement fields can also contain a formatting code using standard fprintf formatting:

    "the Q value is [%0.2e,pred.q]"

Note that the template file must have the .tem extension.

Note: Requires the writefilefolder configuration property to be assigned.

See Write To File Command for more details.

Export command

Export any object to a file using:

   :export 'output.ext' object

extension on output filename 'output.ext' must be one of the following:

.xml = Creates an XML encoding of the object
.mat = Creates a MAT file containing the object
.m = Creates an m-file encoding of the object (Matlab m-code which, when executed, will recreate the object)
.csv = Creates a CSV encoding of the object (only valid for dataset objects or numeric arrays)
.smat = Creates an SMAT file containing the object (only available if secureMAT file feature is installed)

Note: Requires the writefilefolder configuration property to be assigned.

See Export Command for more details.

Working with Advanced Objects

Create new object

obj = @dataset([3,4,5])
obj = @evriscript('modulename')
obj = @evrigui('analysis')

Modify object

import commands can also be applied to object properties: = '3,4,5' = 'fully/qualified/path/filename.ext' = '<xml>(PLS_Toolbox XML Format)</xml>' = '"string value"'

Other Commands

   :include 'myscript.txt'    

Executes the script in myscript.txt.

Included scripts are executed at the point in the calling script where the include statement occurs. If any errors happen during myscript.txt, all script execution will stop at the include statement. Commands after the include can use objects created within the script (included scripts share the same workspace).

   :list           Returns list of current objects
   :clear          Clears all objects
   :version        Returns product version and system information



Any text following one of the comment characters shown above (and before any end-of-line character) is ignored. This allows users to include comments into their scripts to make them more human-readable.