Copycvfields

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search

Purpose

Copy cross-validation results into model from structure.

Synopsis

model = copycvfields(from,to)

Description

Given the output of the crossval function ('from', as either a structure or a model with the expected fields in the detail sub-field) and a target model, the fields associated with cross-validation results will be copied over to the target model. If the target model ('to') is omitted or is not a standard model structure, the cross-validation fields in ('from') are copied directly to corresponding fields in a flat structure. Note: no assurance is made that the copied cross-validation results actually correspond to the target model - user must assure the results apply to the ('to') model.

Inputs

from = A structure or model with cross-validation fields in the detail sub-field.

Optional Inputs

None.

Outputs

to = A model structure.

Examples

model = copycvfields(res, model);

copies crossval results ('res') to a model.

res = copycvfields(model);

copies crossval results from a model to a structure.

model_to = copycvfields(model_from,model_to);

copies crossval results from one model to another.


See Also

dataset/dataset, modelstruct, copydsfields, crossval