amrElm.default: AMR-ELM.

Description Usage Arguments Value Examples

Description

Creates a model for AMR-ELM.

Usage

1
2
## Default S3 method:
amrElm(X, y, hidden_neurons, affinity = c("cosine", "none"))

Arguments

X

training data, numerical with zero mean and unit variance and patterns in the lines, attributes in the columns

y

training data labels (binary, -1 and +1)

hidden_neurons

the number of hidden neurons

affinity

- only cosine implemented

Value

the amrElm model for supervised problems, with: Z: hidden layer weights H: hidden layer output weights: output layer weights affinity: the affinity used to generate the model (e.g.: cosine affinity) dataTrain: training data for generating affinity matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
library(amrElm)

data(heart)

data <- heart$data
labels <- heart$labels
n <- nrow(data)

split <- caTools::sample.split(labels, SplitRatio = 0.7)
train_data <- data[split == TRUE, ]
test_data <- data[split == FALSE, ]

train_labels <- labels[split == TRUE]
test_labels <- labels[split == FALSE]

model <- amrElm(train_data, train_labels, hidden_neurons = 500)
predicted_labels <- predict(model, test_data)

## End(Not run)

rladeira/amrElm documentation built on May 27, 2019, 9:17 a.m.