There are a lot of forum posts about how to get results from reports. This could be made easier by adding some attributes to the display tree and defining two new functions that would do most of the work for the user. I propose this syntax:
platform = Fit Model( ... );
platform << Get Result( "BIC", fit("NormalLassoAICValidation") );
//returns [0.683248]
Display Tree Attributes
Define a set of result types that is standard across all platforms. This will be a big list, but if two platform both report an adjusted R2, they should both use the same result type.
Add the result type to an attribute in the display tree for the column, cell, and/or anywhere else it is displayed, similar to the helpKey attribute for some platform outlineboxes.
Display the result type somewhere in the platform GUI, maybe in a hover label for everywhere it is displayed
Do something similar to flag outline boxes containing a fit created by the model (think '...fit with 6 components' in PLS or 'Normal Lasso with AICc Validation'). Here the attribute would be specific to the platform.
Functions
Create functions to get
The result values
The report element containing the result
The report element of the fit
The scriptable object of a fit
Call them like this
platform << Get Result("AdjustedRSquared") //Matrix or list of all Adjusted R Squared values
platform << Get Result("AdjustedRSquared", fit("NIPALS_1")) //Matrix or list of all Adjusted R Squared values in fits with NIPALS_1
platform << Get Result("AdjustedRSquared", fit("NIPALS_1"), fitnumber(1)) // Matrix or list of all Adjusted R Squared values in the first fit with NIPALS_1, should be exactly one value
platform << Get Fit("NIPALS_1") //returns the scriptable object
platform << Get Fit("NIPALS_1","object") //same
platform << Get Fit("NormalLassoAICValidation","report",fitnumber(1)) //returns the report from the first fit with NormalLassoAICValidation
These functions these could be variations of wrappers around XPath:
platform << XPath("//NumberColBoxItem[@ResultType='AdjustedRSquared']")
platform << XPath("//OutlineBox[@Fit='NIPALS_1']")
platform << XPath("//OutlineBox[@Fit='NIPALS_1']") << Get Scriptable Object
fm << XPath("//OutlineBox[@fit='NIPALS_1']//NumberColBoxItem[@ResultType='AdjustedRSquared']")
... View more