Nvalidate: Difference between revisions
Jump to navigation
Jump to search
imported>Mathias (→Inputs) |
imported>Mathias (→Inputs) |
||
Line 16: | Line 16: | ||
* '''x''' multi-way array to be modeled | * '''x''' multi-way array to be modeled | ||
* '''ncomp' number of components to be modeled. Set ncomp to [1:4] to test one -to four compenent models if using parafac. If using tucker, instead set ncomp to [2 2 2; 4 5 4] to check from 2 to 4/5 components depending on mode. | * '''ncomp''' number of components to be modeled. Set ncomp to [1:4] to test one -to four compenent models if using parafac. If using tucker, instead set ncomp to [2 2 2; 4 5 4] to check from 2 to 4/5 components depending on mode. | ||
* '''method''' Either 'parafac' or 'tucker' | * '''method''' Either 'parafac' or 'tucker' |
Revision as of 12:19, 2 August 2016
Purpose
Validate the number PARAFAC or Tucker components.
Synopsis
- result = nvalidate(x,ncomp,method,options);
- nvalidate(result,x) %Plot earlier results
- nvalidate(x,1:3,'parafac') % Validate 1-3 component PARAFAC models
- nvalidate(x,[1 1 1;3 3 3],'tucker') % validate [1 1 1] to [3 3 3] comp Tucker3 models
Inputs
- x multi-way array to be modeled
- ncomp number of components to be modeled. Set ncomp to [1:4] to test one -to four compenent models if using parafac. If using tucker, instead set ncomp to [2 2 2; 4 5 4] to check from 2 to 4/5 components depending on mode.
- method Either 'parafac' or 'tucker'
Outputs
The outputs of the nvalidate function are returned as a struct with the following fields
- ssq The sum-squared error. What to look for: look for sudden changes as in a Scree-Plot(often difficult) and look for sudden increase in number of local minima (replicate points for a number of components are not identical). This is often a good indication that noise is being modeled.
- models Cell of models where element {f,r} is the r'th model replicate fit with f components