imported>Donal |
imported>Mathias |
Line 1: |
Line 1: |
| ===Purpose=== | | ===Purpose=== |
| | Outputs a sigmoid function. |
|
| |
|
| Add new variables to a dataset object or matrix formed as power transforms and cross terms of the original variables.
| |
|
| |
|
| ===Synopsis=== | | ===Synopsis=== |
|
| |
|
| :[xout, model] = polytransform(x, options); | | :[i0,iw] = peakfind(x,width,tolfac,w,options) |
| :[xout] = polytransform(x, model); | | :[i0,iw] = peakfind(x,width,options) |
|
| |
|
| ===Description===
| |
|
| |
|
| Add polynomial and cross terms to data matrix or dataset. Input dataset x has new transformed variables added. These can include existing variables raised to second, third, fourth power, or second order product of variables.
| | ====Inputs==== |
| The data can be preprocessed before transformed variables are calculated.
| |
| preprocessingtype option specifies the type of preprocessing to apply, 'none', 'mncn', 'auto', or 'custom'. If 'custom' is specified then the 'preprocessing' option must be a valid preprocessing structure. If pca = 'on' the data are converted to PCA scores after preprocessing, but before the transformed variables are calculated.
| |
|
| |
|
| ===Inputs=== | | * '''x''' = 3 element vector where x(1) = coefficient, x(2) = offset and x(3) is equal to the decay constant |
|
| |
|
| * '''x''' = Dataset or matrix to be augmented by the addition of transformed variables.
| |
|
| |
|
| ===Outputs=== | | ====Outputs==== |
|
| |
|
| * '''xout''' = The augmented dataset or matrix.
| |
| * '''model''' = A standard model structure with ''modeltype = polytransform''. This model can be used to augment new data in the same way as the original data was augmented, using the same options, including preprocessing.
| |
|
| |
|
| ===Options===
| |
|
| |
|
| '''''options''''' is a structure array with the following fields:
| |
| * '''squares''': [ 'on' | {'off'} ], governs level of display,
| |
| * '''cubes''': [ 'on' | {'off'} ], governs level of display,
| |
| * '''quadratics''': [ 'on' | {'off'} ], governs level of display,
| |
| * '''crossterms''': [ 'on' | {'off'} ], governs level of display,
| |
| * '''preprocessingtype''': ['none' | 'mncn' | {'auto'} | 'pcrtile' | 'custom'], governs data preprocessing behavior,
| |
| * '''preprocessing''': A preprocessing structure which is used if ''preprocessingtype = custom'',
| |
| * '''pca''': [ 'on' | {'off'} ], governs whether PCA is applied to the preprocessed data before transformed terms are calculated,
| |
| * '''maxpcs''': Integer indicating how many PCs to use if ''pca = on'',
| |
| * '''preprocessoriginalvars''': [ 0| {1} ], governs whether the original variables are returned preprocessed or raw.
| |
|
| |
|
| ===Examples===
| | <math>\sqrt{1-e^2}</math> |
|
| |
|
| If x is a 100 by 5 matrix, options are default, except for the squares option:
| | <math>f\left( {{a}_{i}},\mathbf{x} \right)={{x}_{1}}\left[ {{x}_{4}}{{\operatorname{e}}^{\frac{-4\ln \left( 2 \right){{\left( {{a}_{i}}-{{x}_{2}} \right)}^{2}}}{x_{3}^{2}}}}+\left( 1-{{x}_{4}} \right)\left[ \frac{x_{3}^{2}}{{{\left( {{a}_{i}}-{{x}_{2}} \right)}^{2}}+x_{3}^{2}} \right] \right]</math> |
| <pre>
| |
| popts = polytransform('options');
| |
| popts.squares = 'on';
| |
| [xout, model] = polytrnasform(x,popts) | |
| </pre> | |
| gives the 100 by 10 matrix where the columns 6 to 10 are the squares of the first five.
| |
|
| |
|
| ===See Also===
| | *'''<math>{\operatorname{d2}\!y\over\operatorname{d2}\!x}</math>''' |
| | |
| | |
| | * '''<math>{\operatorname{d}\!y\over\operatorname{d}\!{x}_{i}}</math>''' |