Modelstatssummary

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search

Purpose

Generate a succinct list of descriptive model statistics.

Synopsis

items = modelstatssummary(model)
items = modelstatssummary(model,test,yindx,options)
modelstatssummary(model,test,yindx,options)
list = modelstatssummary('list')
modelstatssummary('showonfig',mytext,fig,position)

Description

Generally used for regression and classification models, this function generates a cell array of statistics and general results in a short format that can be superimposed on a figure. Results can either be returned as a cell array of strings or, using the options described below, plotted directly onto a figure.

Other special calls - The following strings can be used in place of "model" for additional behaviors:

  • list = returns a two-column list of strings where rows represent statistics available for display. The first column contains a keyword appropriate for inclusion in the "hidden" option (see above). The second column contains a human-readable description of the statistic.
list = modelstatssummary('list')
  • showonfig = displays the second input (a cell array of strings) on the current figure. This can be used to display any information on a figure with the same mouse-moveable behavior as the standard statistics display. Optional inputs include the figure handle (fig) and the position for the text (position). See options above for details on fig and position options.
 modelstatssummary('showonfig',mytext,fig,position)

Inputs

  • models = Standard regression or classification model object.

Optional Inputs

  • test = Standard prediction structure from applying the corresponding model to new data. Output will include prediction statistics.
  • yindx = Index of which column of a multi-column y-block you wish statistics for. If omitted and more than one y-block column is included in the model, an error will be thrown.

Outputs

  • items = Cell array of strings containing the model summary information. Note that if not requested, the default options (see options) will usually display the statistics directly on the current figure.

Options

options = a structure array with the following fields:

  • hidden: [ {} ] Cell array of strings indicating which statistics should be hidden from the output. See 'list' option below.
  • showonfix: [ 'on' | 'off' | {'auto'}] Governs display of statistics directly on a figure in a mouse-movable axes. If 'auto', the figure display will be done only if no outputs were requested from the function call. If 'on', figure display will always be done. If 'off' no figure display will ever be done.
  • fig: [ ] Optional target figure to which the showonfig option should address the display. If empty, the current figure will be used. This option is only used if showonfig is not 'off'.
  • position : [ .5 .5 ] Relative position for text if shown on figure. Units are relative to the axes where [0,0] is the bottom left corner and [1,1] is the top right corner. Note that text is left and middle (top to bottom) justified so the position is actually the center left point for the text box.

See Also

comparemodels, modeloptimizer, modelstruct, modlrder, reportwriter