matlab stepwise 用法,Interactive stepwise regression

Description

stepwise uses the sample

data in hald.mat to display a graphical user interface

for performing stepwise regression of the response values in heat on

the predictive terms in ingredients.

bcd313a899b947434b279d7938098dbc.gif

The upper left of the interface displays estimates of the coefficients

for all potential terms, with horizontal bars indicating 90% (colored)

and 95% (grey) confidence intervals. The red color indicates that,

initially, the terms are not in the model. Values displayed in the

table are those that would result if the terms were added to the model.

The middle portion of the interface displays summary statistics

for the entire model. These statistics are updated with each step.

The lower portion of the interface, Model History,

displays the RMSE for the model. The plot tracks the RMSE from step

to step, so you can compare the optimality of different models. Hover

over the blue dots in the history to see which terms were in the model

at a particular step. Click on a blue dot in the history to open a

copy of the interface initialized with the terms in the model at that

step.

Initial models, as well as entrance/exit tolerances for the p-values

of F-statistics, are specified using additional

input arguments to stepwise. Defaults are an

initial model with no terms, an entrance tolerance of 0.05, and an

exit tolerance of 0.10.

To center and scale the input data (compute z-scores)

to improve conditioning of the underlying least-squares problem, select Scale

Inputs from the Stepwise menu.

You proceed through a stepwise regression in one of two ways:

Click Next Step to select the

recommended next step. The recommended next step either adds the most

significant term or removes the least significant term. When the regression

reaches a local minimum of RMSE, the recommended next step is “Move

no terms.” You can perform all of the recommended steps at

once by clicking All Steps.

Click a line in the plot or in the table to toggle

the state of the corresponding term. Clicking a red line, corresponding

to a term not currently in the model, adds the term to the model and

changes the line to blue. Clicking a blue line, corresponding to a

term currently in the model, removes the term from the model and changes

the line to red.

To call addedvarplot and

produce an added variable plot from the stepwise interface,

select Added Variable Plot from the Stepwise menu.

A list of terms is displayed. Select the term you want to add, and

then click OK.

Click Export to display a dialog

box that allows you to select information from the interface to save

to the MATLAB® workspace. Check the information you want to export

and, optionally, change the names of the workspace variables to be

created. Click OK to export the information.

stepwise(X,y) displays the

interface using the p predictive terms in the n-by-p matrix X and

the response values in the n-by-1 vector y.

Distinct predictive terms should appear in different columns of X.

Note

stepwise automatically includes a constant

term in all models. Do not enter a column of 1s directly into X.

stepwise treats NaN values

in either X or y as missing

values, and ignores them.

stepwise(X,y,inmodel,penter,premove) additionally

specifies the initial model (inmodel) and the

entrance (penter) and exit (premove)

tolerances for the p-values of F-statistics. inmodel is

either a logical vector with length equal to the number of columns

of X, or a vector of indices, with values ranging

from 1 to the number of columns in X. The value

of penter must be less than or equal to the value

of premove.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值