OSelm_training: Trains an online sequential extreme learning machine with...

Description Usage Arguments Value References Examples

View source: R/OSELM.R

Description

Trains an online sequential extreme learning machine with random weights

Usage

1
OSelm_training(p, y, Elm_Type, nHiddenNeurons, ActivationFunction, N0, Block)

Arguments

p

dataset used to perform the training of the model

y

classes vector for classiication or regressors for regression

Elm_Type

select if the ELM must perform a "regression" or "classification"

nHiddenNeurons

number of neurons in the hidden layer

ActivationFunction

"rbf" for radial basis function with Gaussian kernels , "sig" for sigmoidal fucntion, "sin" for sine function, "hardlim" for hard limit function

N0

size of the first block to be processed

Block

size of each chunk to be processed at each step

Value

returns all the parameters used in the function, the weight matrix, the labels for the classification, the number of classes found, the bias, the beta activation function and the accuracy on the trainingset

References

[1] N.-Y. Liang, G.-B. Huang, P. Saratchandran, and N. Sundararajan, 'A Fast and Accurate On-line Sequential Learning Algorithm for Feedforward Networks' IEEE Transactions on Neural Networks, vol. 17, no. 6, pp. 1411-1423, 2006

Examples

1
2
3
4
5
x = runif(100, 0, 50)
y = sqrt(x)
train = data.frame(y,x)
train = data.frame(preProcess(train))
OSelm_train.formula(y~x, train, "regression", 100, "hardlim", 10, 10)

Example output

$ActivationFunction
[1] "hardlim"

$Elm_Type
[1] "regression"

$iw
              [,1]        [,2]
  [1,]  0.62162667 -0.01699588
  [2,] -0.74885570 -0.02540705
  [3,] -0.53817724 -0.56330944
  [4,] -0.25538656  0.90446482
  [5,]  0.90174017 -0.23537341
  [6,] -0.54128100  0.92686856
  [7,]  0.90981968 -0.48209869
  [8,]  0.28383093 -0.58586017
  [9,] -0.89333561 -0.56851199
 [10,] -0.43752201 -0.26394290
 [11,]  0.45737318 -0.16799122
 [12,] -0.58316867 -0.69985148
 [13,]  0.56293974  0.39528646
 [14,]  0.23002428 -0.98353766
 [15,] -0.55363615 -0.32614163
 [16,] -0.85229589  0.75157554
 [17,]  0.30862875 -0.58094503
 [18,] -0.19650317  0.32846800
 [19,]  0.80105933 -0.90269828
 [20,]  0.52641968  0.66654219
 [21,]  0.86749352 -0.95591879
 [22,] -0.38835305  0.80073998
 [23,]  0.50111308 -0.92767351
 [24,]  0.35221495  0.99886577
 [25,]  0.62959290  0.56096793
 [26,]  0.93649752  0.38545381
 [27,] -0.04512502  0.79762689
 [28,]  0.03815114 -0.37993076
 [29,]  0.58113732 -0.87710062
 [30,]  0.03215773 -0.08966710
 [31,]  0.46175753 -0.22370180
 [32,] -0.93306070 -0.08474678
 [33,]  0.43643636  0.32281730
 [34,] -0.87582899 -0.14313328
 [35,] -0.26681330 -0.04568948
 [36,] -0.10147480  0.93161333
 [37,]  0.08496715 -0.64649545
 [38,]  0.30239370  0.17032619
 [39,]  0.72661416  0.67721003
 [40,]  0.53790706 -0.80370940
 [41,] -0.28546848 -0.97413138
 [42,]  0.97838409 -0.72578884
 [43,] -0.24308745 -0.39378348
 [44,]  0.45110035  0.76143258
 [45,]  0.92280555  0.79700683
 [46,]  0.24548363 -0.22306114
 [47,] -0.06666799  0.61223611
 [48,]  0.06987380  0.85898598
 [49,] -0.60976891 -0.74358126
 [50,] -0.08416869  0.22074765
 [51,] -0.39038112 -0.58493775
 [52,]  0.95140958 -0.25635445
 [53,] -0.76799756  0.57794767
 [54,]  0.24796063  0.55981214
 [55,] -0.43859540 -0.87958872
 [56,] -0.40627688  0.67040616
 [57,] -0.61322300  0.38298567
 [58,]  0.20098824  0.58868341
 [59,]  0.71515813 -0.21442258
 [60,]  0.06831176 -0.43800288
 [61,]  0.78616771 -0.23245701
 [62,]  0.32069815 -0.72870289
 [63,] -0.85113431 -0.43595828
 [64,]  0.37317371  0.97557157
 [65,]  0.93372264  0.68034039
 [66,]  0.62871158  0.80878234
 [67,] -0.51538467  0.62058356
 [68,]  0.33601148  0.05057245
 [69,]  0.51505009  0.86559804
 [70,]  0.64583117  0.52688903
 [71,] -0.69009504 -0.93753116
 [72,]  0.15025162 -0.87529257
 [73,] -0.17008450 -0.52488551
 [74,] -0.50898037  0.31654497
 [75,] -0.48913823  0.54651223
 [76,]  0.36548808 -0.02559330
 [77,] -0.47277755  0.17275752
 [78,]  0.60545941  0.26687083
 [79,] -0.69240072  0.03906271
 [80,] -0.54344992  0.84869126
 [81,]  0.92047372  0.30418615
 [82,]  0.80146012  0.57481657
 [83,]  0.35946149 -0.31326892
 [84,] -0.81838855  0.79212895
 [85,] -0.31114129 -0.55189106
 [86,]  0.26154198 -0.07618085
 [87,] -0.66445371  0.57256051
 [88,] -0.20203023  0.53437695
 [89,]  0.13682995 -0.31068158
 [90,]  0.63836229  0.74910875
 [91,]  0.57737490 -0.16701172
 [92,] -0.40995828  0.14948665
 [93,]  0.52000580 -0.57408413
 [94,] -0.58144762 -0.27965222
 [95,]  0.59708585  0.06812694
 [96,]  0.14185535 -0.87598740
 [97,] -0.53360408 -0.13886500
 [98,]  0.11161553  0.78299021
 [99,] -0.16068881 -0.71441618
[100,]  0.44624097 -0.74058937

$bias
  [1]  0.243601260  0.037325017  0.163354283 -0.587269668  0.753057356
  [6]  0.203218169 -0.192957390 -0.958434348 -0.781578999  0.818944075
 [11]  0.067571648  0.250676920  0.902861194  0.915051652 -0.635092484
 [16] -0.803830944  0.514599144  0.113898719 -0.343911382 -0.646883403
 [21] -0.973048586  0.534563649  0.342469912  0.307612373  0.897083350
 [26] -0.598661255 -0.444805234 -0.511932064  0.102002712 -0.222007746
 [31] -0.903540153 -0.625846183  0.555683142 -0.255101170 -0.387074211
 [36] -0.920140824 -0.729667445 -0.083618013 -0.249350864  0.170382462
 [41]  0.213905482 -0.451087031 -0.268324109  0.169715910  0.473479150
 [46]  0.545947853 -0.475663142 -0.976202834  0.866586614  0.276931342
 [51]  0.563573057 -0.186830939  0.147034131 -0.555497688 -0.206515208
 [56] -0.623709414  0.492586143  0.026065796 -0.775500099  0.095154217
 [61] -0.264671063 -0.970684911 -0.280011307  0.538906392 -0.428471460
 [66]  0.202331554 -0.281256405  0.546482623  0.172707809  0.031763679
 [71]  0.448070133  0.117355620  0.624128965  0.878084547  0.725638662
 [76]  0.100833078  0.446817604 -0.351743195 -0.233856125  0.070969824
 [81] -0.267588203  0.702135769 -0.141779377  0.667025608 -0.597086900
 [86]  0.652096094  0.673987599  0.097227444  0.814478210 -0.768876615
 [91]  0.002082378  0.352571303 -0.668758169  0.165130005  0.089344277
 [96] -0.043671446 -0.611228204 -0.321183194  0.772846424 -0.016231143

$beta
                [,1]
  [1,] -4.001788e-03
  [2,]  2.870425e-17
  [3,] -6.003243e-02
  [4,]  1.214982e-17
  [5,] -4.001788e-03
  [6,]  2.118356e-02
  [7,] -4.001788e-03
  [8,]  4.957239e-18
  [9,]  3.360935e-19
 [10,] -4.001788e-03
 [11,] -4.001788e-03
 [12,] -8.948177e-02
 [13,] -4.001788e-03
 [14,] -4.001788e-03
 [15,]  0.000000e+00
 [16,]  0.000000e+00
 [17,] -4.001788e-03
 [18,]  2.118356e-02
 [19,] -2.518535e-02
 [20,]  2.118356e-02
 [21,] -2.518535e-02
 [22,]  2.118356e-02
 [23,] -4.001788e-03
 [24,]  5.603064e-02
 [25,] -4.001788e-03
 [26,]  4.346433e-02
 [27,]  2.404039e-02
 [28,]  0.000000e+00
 [29,] -2.804218e-02
 [30,]  0.000000e+00
 [31,]  0.000000e+00
 [32,]  0.000000e+00
 [33,] -4.001788e-03
 [34,]  0.000000e+00
 [35,]  0.000000e+00
 [36,]  0.000000e+00
 [37,]  0.000000e+00
 [38,] -4.001788e-03
 [39,]  5.603064e-02
 [40,] -4.001788e-03
 [41,] -2.518535e-02
 [42,] -2.804218e-02
 [43,]  0.000000e+00
 [44,]  5.603064e-02
 [45,] -4.001788e-03
 [46,] -4.001788e-03
 [47,]  0.000000e+00
 [48,]  0.000000e+00
 [49,] -2.518535e-02
 [50,]  4.346433e-02
 [51,] -2.518535e-02
 [52,] -4.001788e-03
 [53,]  0.000000e+00
 [54,]  2.404039e-02
 [55,] -6.003243e-02
 [56,]  0.000000e+00
 [57,]  2.118356e-02
 [58,]  5.048118e-02
 [59,] -5.448297e-02
 [60,] -2.518535e-02
 [61,] -4.001788e-03
 [62,] -4.746612e-02
 [63,]  0.000000e+00
 [64,]  4.346433e-02
 [65,]  5.603064e-02
 [66,] -4.001788e-03
 [67,]  0.000000e+00
 [68,] -4.001788e-03
 [69,]  5.603064e-02
 [70,] -4.001788e-03
 [71,] -5.448297e-02
 [72,] -2.518535e-02
 [73,] -2.804218e-02
 [74,] -4.001788e-03
 [75,]  8.547999e-02
 [76,] -4.001788e-03
 [77,]  2.118356e-02
 [78,]  2.030573e-01
 [79,]  0.000000e+00
 [80,]  2.404039e-02
 [81,] -4.001788e-03
 [82,] -4.001788e-03
 [83,] -2.804218e-02
 [84,]  2.118356e-02
 [85,]  0.000000e+00
 [86,] -4.001788e-03
 [87,]  2.118356e-02
 [88,]  2.118356e-02
 [89,] -4.001788e-03
 [90,]  2.118356e-02
 [91,] -4.001788e-03
 [92,]  2.118356e-02
 [93,] -5.448297e-02
 [94,]  0.000000e+00
 [95,] -4.001788e-03
 [96,] -2.518535e-02
 [97,]  0.000000e+00
 [98,]  2.118356e-02
 [99,] -2.804218e-02
[100,] -2.804218e-02

$TrainingAccuracy
[1] 0.3779474

$call
OSelm_train.formula(formula = y ~ x, data = train, Elm_type = "regression", 
    nHiddenNeurons = 100, ActivationFunction = "hardlim", N0 = 10, 
    Block = 10)

$formula
y ~ x

ELMR documentation built on May 2, 2019, 2:20 a.m.

Related to OSelm_training in ELMR...