EVRIModel Objects

From Eigenvector Research Documentation Wiki
Revision as of 12:30, 26 July 2012 by imported>Jeremy (→‎General Model Properties)
Jump to navigation Jump to search

Introduction

EVRIModel Objects provide access to the Standard Model Structure content of all models as well as some easy-to-use methods and properties for building, manipulating, and reviewing models from Matlab's command-line, scripts, and functions. This page describes the various modes, methods, and properties of EVRIModel objects.

This documentation describes the use of EVRIModel objects, here shortened to just "model objects". Model objects have three distinct states:

  1. Empty Models - Empty models can be populated with data to analyze, "meta parameters" (model building settings), and other modeling options, then models can be calibrated or built from those settings.
  2. Calibrated Models - Calibrated models contain all the model results and parameters necessary to apply that model to new data. Plots and other information can be obtained from calibrated models.
  3. Applied Models - When a calibrated model is applied to new data, the result is a prediction or "applied model". This object contains all the results from applying the model to the new data. Plots and other information can be obtained from applied models.

General Model Properties

The following properties are always available in a model independent of the model state:

iscalibrated

Returns (1) if the model has been calibrated or applied and (0) if the model is in the "empty" state and has not been calibrated.

isprediction

Returns (1) if the model contains a prediction from applying a calibrated model to new data and (0) if the model is just "calibrated" or "empty".

cancalibrate

Returns (1) if the model contains a modeling building definition (see Empty Model description, below), or (0) if the model does not contain a definition and must be calibrated using the function defined in the modeltype property.

calibrate cancalibrate content downgradeinfo evrimodelversion help info modeltype validmodeltypes iscalibrated isclassification isprediction plots display settings uniqueid  

Building Model from Empty Model Object

When an EVRIModel object has been initially created, it contains no data and no results. Most model objects can then be populated with data, meta-parameters, and other settings (options) which can then be used to calibrate a model from.

NOTE: Some model types do NOT support calibration in this manner. In these cases, the model will clearly show the state in its display at the command line with a statement to "See _____ function to calibrate." In these cases, the only way to create a calibrated model is to access the named function directly. A model can be interrogated with the .cancalibrate property to determine if it allows calibration directly or if it requires a call to modeltype function.


Working With Calibrated Models

Methods

startApp()

Start up the Solo application. This method should be called after setting any of the desired startup properties listed below and before issuing any sendCommand() calls. Once started, none of the startup properties can be changed.

RETURNS: 0 if start was successful or -1 if the start failed. Error messages from a failed start can be retrieved from the read-only property lastResponse.

stopApp()

Stop the Solo application. Note that once stopApp has been called, it cannot be restarted without unloading EigenvectorTools. In general it is recommended that this method be called only when the client application is performing final cleanup before exiting. Note that this method is also automatically called when the application object is destroyed, thus, directly calling this method is usually not needed.

sendCommand(cmd)

Send a string command "cmd" to the Solo application. This is the standard way of communicating with the application. The command may be any of the simple object-creation commands described in the Solo_Predictor_User_Guide documentation or a command making use of EVRIGUI_Objects. Any textural response from the application is stored in the read-only property lastResponse.

RETURNS: 0 if command was successful, -1 if the command failed due to low-level application error, or -2 if the command was invalid, there was a license error, or other high-level error. In either case, the textural response including any error can be found using the lastResponse property.

 

Properties

General Properties

lastResponse

READ ONLY: Returns the string response returned by the server after the last startApp() or sendCommand() call.

allowedLength
allowedLengthLong

Maximum string length allowed to be returned in lastResponse. In ET.NET: allowedLength property is a Long integer type and allowedLengthLong is not available. In ETV6, allowedLength and allowedLengthLong are synonymous except for the variable type. Both set the maximum length of string returned, but allowedLength property is typed as a Short Integer while the allowedLengthLong property is typed a Long Integer. In general, allowedLenghtLong should be used in ETV6 but allowedLength is supported to allow backwards compatibility. Maximum length of string when setting using the Short Integer version of this property is 65535 characters.

Start-up Properties - All Products

debug
debugMode

Boolean flag indicating if additional startup output should be given. Usually, this output will be written to a file named solo_debug.log in the user's temp directory.

Note: In EigenvectorToolsV6, this property is named debugMode to avoid namespace conflicts.

licensecode

String indicating the activation / license code to use with the application. Any previous code will be erased before using this code. If this code is not valid for the given version and product, the application will fail to start.

settingsFile

String indicating an alternative settingsFile to load (instead of the default: default.xml). Also allows specifying location of default.xml when it can't be found automatically by the application. Note: In Solo and Solo+MIA, the contents of specified file will only be used when an existing setting is not currently specified. Thus, this setting should be used in conjunction with clearSettings property to assure these settings are used.

addCmd

String specifying any additional command-line options to pass into the application.

 

Alphabetical List of Object Properties and Methods

apply          
author         
calibrate      
cancalibrate   
content        
crossvalidate  
datasource     
date           
detail         
display        
downgradeinfo  
evrimodelversion
help           
info           
iscalibrated   
isclassification
isprediction   
loadings       
modeltype      
ncomp          
parent         
ploteigen      
plotloads      
plots          
plotscores     
prediction     
q              
scores         
settings       
t2             
time           
uniqueid       
validmodeltypes
x              
xhat           
y              
yhat