Create statistics options structure
statset
statset(statfun)
options = statset(...)
options = statset(fieldname1
,val1
,fieldname2
,val2
,...)
options = statset(oldopts,fieldname1
,val1
,fieldname2
,val2
,...)
options = statset(oldopts,newopts)
statset
with no input arguments and no output arguments displays all fields of a statistics options structure and their possible values.
statset(statfun)
displays fields and default values used by the Statistics and Machine Learning Toolbox™ functionstatfun
。Specifystatfun
using a character vector, a string scalar, or a function handle.
options = statset(...)
creates a statistics options structureoptions
。With no input arguments, all fields of the options structure are an empty array ([]
). With a specifiedstatfun
, function-specific fields are default values and the remaining fields are[]
。函数专用字段集合to[]
indicate that the function is to use its default value for that parameter. For availableoptions
, see Inputs.
options = statset(
creates an options structure in which the named fields have the specified values. Any unspecified values arefieldname1
,val1
,fieldname2
,val2
,...)[]
。Use character vectors or string scalars for field names. For named values, you must input the complete character vector or string scalar for the value. If you provide an invalid character vector or string scalar for a value,statset
uses the default.
options = statset(oldopts,
creates a copy offieldname1
,val1
,fieldname2
,val2
,...)oldopts
with the named parameters changed to the specified values.
options = statset(oldopts,newopts)
结合现有的选择结构re,oldopts
, with a new options structure,newopts
。Any parameters innewopts
with nonempty values overwrite corresponding parameters inoldopts
。
|
Relative difference used in finite difference derivative calculations. A positive scalar, or a vector of positive scalars the same size as the vector of parameters estimated by the Statistics and Machine Learning Toolbox function using the options structure. |
|
Amount of information displayed by the algorithm.
|
|
Check for invalid values, such as
|
|
Flags whether the objective function returns a gradient vector as a second output.
|
|
Flags whether the objective function returns a Jacobian as a second output.
|
|
Maximum number of objective function evaluations allowed. Positive integer. |
|
Maximum number of iterations allowed. Positive integer. |
|
The solver calls all output functions after each iteration.
|
|
(Not recommended) Invoke robust fitting option.
|
|
Weight function for robust fitting. Can also be a function handle that accepts a normalized residual as input and returns the robust weights as output. If you use a function handle, give a |
|
A single instance of the |
|
Parameter bound tolerance. Positive scalar. |
|
Termination tolerance for the objective function value. Positive scalar. |
|
Use
|
|
Use
|
|
Termination tolerance for the parameters. Positive scalar. |
|
Tuning constant used in robust fitting to normalize the residuals before applying the weight function. The default value depends upon the weight function. This parameter is necessary if you specify the weight function as a function handle. Positive scalar. SeeRobust Options。 |
|
Flag indicating whether eligible functions should use capabilities of the Parallel Computing Toolbox™ (PCT), if the capabilities are available. That is, if the PCT is installed, and a PCT |
|
Flag indicating whether the random number generator in eligible functions should use |
|
(Not recommended) Weight function for robust fitting. Valid only when
|
Suppose you want to change the default parameter values for the functionevfit
, which fits an extreme value distribution to data. The defaults parameter values are:
statset('evfit') ans = Display: 'off' MaxFunEvals: [] MaxIter: [] TolBnd: [] TolFun: [] TolTypeFun: [] TolX: 1.0000e-06 TolTypeX: [] GradObj: [] Jacobian: [] DerivStep: [] FunValCheck: [] Robust: [] RobustWgtFun: [] WgtFun: [] Tune: [] UseParallel: [] UseSubstreams: [] Streams: [] OutputFcn: []
The only parameters thatevfit
uses areDisplay
andTolX
。To create an options structure with the value ofTolX
set to1e-8
, enter:
options = statset('TolX',1e-8) % Pass options toevfit
: mu = 1; sigma = 1; data = evrnd(mu,sigma,1,100); paramhat = evfit(data,[],[],[],options)