Description Usage Arguments Value Note Author(s) References Examples

Prediction model using the predictions of the NNS base models NNS.reg as features (i.e. meta-features) for the stacked model.

1 2 3 |

`IVs.train` |
a vector, matrix or data frame of variables of numeric or factor data types. |

`DV.train` |
a numeric or factor vector with compatible dimsensions to |

`IVs.test` |
a vector, matrix or data frame of variables of numeric or factor data types. |

`CV.size` |
numeric [0, 1]; |

`weight` |
options: ("SSE", "Features") method for selecting model output weight; Set |

`order` |
integer; |

`norm` |
options: ("std", "NNS", NULL); |

`method` |
numeric options: (1, 2); Select the NNS method to include in stack. |

`dim.red.method` |
options: ("cor", "NNS.cor", "NNS.caus", "all") method for determining synthetic X* coefficients. |

`seed` |
numeric; 123 (default) Sets seed for CV sampling. |

Returns a vector of fitted values for the dependent variable test set for all models.

`"NNS.reg.n.best"`

returns the optimum`"n.best"`

paramater for the NNS.reg multivariate regression.`"SSE.reg"`

returns the SSE for the NNS.reg multivariate regression.`"NNS.dim.red.threshold"`

returns the optimum`"threshold"`

from the NNS.reg dimension reduction regression.`"SSE.dim.red"`

returns the SSE for the NNS.reg dimension reduction regression.`"reg"`

returns NNS.reg output.`"dim.red"`

returns NNS.reg dimension reduction regression output.`"stack"`

returns the output of the stacked model.

If character variables are used, transform them first to factors using as.factor, or data.matrix to ensure overall dataset is numeric. A multifunction sapply can also be applied to the overall dataset: `data <- sapply(data,function(x){as.factor(x) ; as.numeric(x)})`

. Then run `NNS.stack`

with transormed variables.

Missing data should be handled prior as well using na.omit or complete.cases on the full dataset.

If error received:

`"Error in is.data.frame(x) : object 'RP' not found"`

reduce the `CV.size`

.

Fred Viole, OVVO Financial Systems

Viole, F. (2016) "Classification Using NNS Clustering Analysis" https://ssrn.com/abstract=2864711

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
## Using 'iris' dataset where test set [IVs.test] is 'iris' rows 141:150.
## Not run:
NNS.stack(iris[1:140, 1:4], iris[1:140, 5], IVs.test = iris[141:150, 1:4])
## End(Not run)
## Using 'iris' dataset to determine [n.best] and [threshold] with no test set.
## Not run:
NNS.stack(iris[ , 1:4], iris[ , 5])
## End(Not run)
## Selecting NNS.reg and dimension reduction techniques.
## Not run:
NNS.stack(iris[1:140, 1:4], iris[1:140, 5], iris[141:150, 1:4], method = c(1, 2))
## End(Not run)
``` |

NNS documentation built on April 15, 2019, 5:05 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.