NNS.boost | R Documentation |
Ensemble method for classification using the predictions of the NNS multivariate regression NNS.reg collected from uncorrelated feature combinations.
NNS.boost( IVs.train, DV.train, IVs.test = NULL, type = NULL, depth = NULL, learner.trials = 100, epochs = NULL, CV.size = NULL, balance = FALSE, ts.test = NULL, folds = 5, threshold = NULL, obj.fn = expression(sum((predicted - actual)^2)), objective = "min", extreme = FALSE, features.only = FALSE, feature.importance = TRUE, status = TRUE )
IVs.train |
a matrix or data frame of variables of numeric or factor data types. |
DV.train |
a numeric or factor vector with compatible dimensions to |
IVs.test |
a matrix or data frame of variables of numeric or factor data types with compatible dimensions to |
type |
|
depth |
options: (integer, NULL, "max"); |
learner.trials |
integer; 100 (default) Sets the number of trials to obtain an accuracy |
epochs |
integer; |
CV.size |
numeric [0, 1]; |
balance |
logical; |
ts.test |
integer; NULL (default) Sets the length of the test set for time-series data; typically |
folds |
integer; 5 (default) Sets the number of |
threshold |
numeric; |
obj.fn |
expression;
|
objective |
options: ("min", "max") |
extreme |
logical; |
features.only |
logical; |
feature.importance |
logical; |
status |
logical; |
Returns a vector of fitted values for the dependent variable test set $results
, and the final feature loadings $feature.weights
, along with final feature frequencies $feature.frequency
.
Like a logistic regression, the (type = "CLASS")
setting is not necessary for target variable of two classes e.g. [0, 1]. The response variable base category should be 1 for classification problems.
Fred Viole, OVVO Financial Systems
Viole, F. (2016) "Classification Using NNS Clustering Analysis" https://www.ssrn.com/abstract=2864711
## Using 'iris' dataset where test set [IVs.test] is 'iris' rows 141:150. ## Not run: a <- NNS.boost(iris[1:140, 1:4], iris[1:140, 5], IVs.test = iris[141:150, 1:4], epochs = 100, learner.trials = 100, type = "CLASS", depth = NULL) ## Test accuracy mean(a$results == as.numeric(iris[141:150, 5])) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.