ChaosHunter Runtime Excel Add-In FireModel Function

Top  Previous  Next

Prior to using the ChaosHunter Runtime FireModel function in Microsoft Excel, you need to load the Add-In into Excel.

 

Next, open the spreadsheet which contains the input values in Excel.  Click on a blank cell beside the input values and call the FireModel macro function as described below.

 

Microsoft Excel Spreadsheet Syntax:

 

= ChoasHunter_Runtime.XLA!FireModel(range, [modelpath], [SkipMissingInputValuesFlag])

 

The FireModel macro function syntax includes the following parts:

 

Part

Description

Range

Required.  The contiguous range of cells on the worksheet that contains input data, e.g., A2:D2.

Modelpath

Optional. The name and location of the file that contains the trained model.  If the path is omitted, the macro will try to open the net specified in the main ChaosHunter Runtime Add-In Dialog Box.  (Select the ChaosHunter Runtime option from the Excel Tools Menu to display the Dialog Box.)

SkipMissingInputValuesFlag

Optional. An integer number that instructs the program how to interpret missing (blank or non-numeric) input values.

0=the program internally replaces missing values with averages in corresponding input column.

1=the program skips rows with missing values. The output is marked with "*" (asterisk).

 

If this argument is omitted, the macro will use SkipMissingInputValuesFlag=1.

 

The FireModel function use just one row of data at a time to generate the formula output. It does not use column labels to identify cells to be picked up as formula inputs. Therefore, the selected range must represent a contiguous set of cells that represent all the inputs in the formula in the order they appeared during optimization.

 

For example, when optimizing a formula in ChaosHunter, you have selected 5 potential inputs in the data file:

 

Input1

Input2

Input3

Input4

Input5

 

After ChaosHunter optimization has finished, the resulting formula looks like:

Predicted = (Input2 + Input5) * 0.25

 

Thus, the formula uses only two inputs, Input2 and Input5. The FireModel formula in this case expects a 2-cell contiguous range, for example:

 

=FireModel(B2:C2, "C:\Test\TestModel.md",1)

 

where cell B2 contains Input2 value, and cell C2 contains Input5 value.