主要内容

CreateAlternativeModels

Create alternative models from model template

    Description

    CreateAlternativeModels(RESPONSE, MODELS, CRITERIA) creates alternative response feature models for each response feature.

    example

    CreateAlternativeModels(RESPONSE, LocalModels, LocalCriteria, GlobalModels, GlobalCriteria) creates alternative local models as well as alternative response feature models. This syntax can be used for hierarchical and local responses.

    The CreateAlternativeModels function is the same as the Create Alternatives function in the MBC Model Fitting App. A selection of child node models are built. The results depend on where you call this method from. See, Create Alternative Models to Compare.

    Note

    The hierarchical model is automatically constructed when CreateAlternativeModels is called for a local model.

    example

    Examples

    collapse all

    Create alternative model.

    criteria = 'PRESS RMSE';
    CreateAlternativeModels(R, [], 'Two-Stage RMSE', 'mymodels.mbm', 
    criteria);
    CreateAlternativeModels( RESPONSE, 'alternative_models.mbm', 'Weighted PRESS' )

    creates alternative response feature models based upon the model template file alternative_models.mbt, and chooses the best model based upon each model's Weighted PRESS statistic.

    Input Arguments

    collapse all

    Response, specified as a mbcmodel.response, mbcmodel.localresponse, or mbcmodel.hierarchicalresponse object.

    List of models, specified by a model template file (.mbm) or a cell array of mbcmodel.model objects.

    Note

    You construct a model template file (such as 'mymodels.mbm') in the Model Browser. From any response (global or one-stage model) with alternative responses (child nodes), select Model > Make Template. You can save the child node model types of your currently selected modeling node as a model template. Alternatively from any response click Create Alternatives in the toolbar and create a series of alternative response models in the dialog.

    Selection criteria for best alternative model (from the statistics available from AlternativeModelStatistics), specified as a character vector. The statistic must be available for all models. By default PRESS RMSE is used, if available for all models. Otherwise RMSE is the default.

    List of local models, specified as a model template file (.mbm), cell array of mbcmodel.localmodel objects, or an empty matrix. Models must have the same number of inputs as the test plan global inputs. If LocalModels is empty, the alternative global models are created for each response feature.

    Note

    For use with hierarchical or local responses.

    Local criteria, specified as the character string, 'Two-Stage RMSE'.

    Note

    For use with hierarchical or local responses.

    List of global models from the model template, specified as a cell array of mbcmodel.model objects with the same number of inputs as the test plan global inputs.

    Note

    For use with hierarchical or local responses.

    Summary statistics to select the best global model, specified as a character vector. The criteria must be available for all alternative models. By default PRESS RMSE is used, if available for all models. Otherwise RMSE is the default.

    Note

    For use with hierarchical or local responses.

    Version History

    Introduced in R2006a