sN.MLPpredict: Runs a multilayer perceptron

Description Usage Arguments Value Examples

View source: R/main.R

Description

Runs a multilayer perceptron

Usage

1
sN.MLPpredict(nnModel, X, raw = FALSE)

Arguments

nnModel

A list containing the coefficients for the MLP (as produced with sN.MLPtrain())

X

Matrix of predictors

raw

If true, returns score of each output option. If false, returns the output option with highest value.

Value

The predicted values obtained by the MLP

Examples

1
2
3
4
5
6
7
data(UCI.transfusion);
X=as.matrix(sN.normalizeDF(as.data.frame(UCI.transfusion[,1:4])));
y=as.matrix(UCI.transfusion[,5]);
myMLP=sN.MLPtrain(X=X,y=y,hidden_layer_size=4,it=50,lambda=0.5,alpha=0.5);
myPrediction=sN.MLPpredict(nnModel=myMLP,X=X,raw=TRUE);
#library('verification');
#roc.area(y,myPrediction[,2]);

Example output



simpleNeural documentation built on March 26, 2020, 6:23 p.m.