# Model Structure Selection¶

These modules detect an optimal number of neurons in ELM, and remove extra unnecessary neurons. They are used in ELM.train() if you give optional flag V (validation), CV (cross-validation) or LOO (Leave-One-Out validation).

Created on Mon Oct 27 17:48:33 2014

@author: akusok

hpelm.mss_v.train_v(self, X, T, Xv, Tv)[source]

Model structure selection with a validation set.

Trains ELM, validates model and sets an optimal validated solution.

Parameters: self (ELM) – ELM object that calls train_v() X (matrix) – training set inputs T (matrix) – training set outputs Xv (matrix) – validation set inputs Tv (matrix) – validation set outputs

Created on Mon Oct 27 17:48:33 2014

@author: akusok

hpelm.mss_cv.train_cv(self, X, T, k)[source]

Model structure selection with cross-validation.

Trains ELM, cross-validates model and sets an optimal validated solution.

Parameters: self (ELM) – ELM object that calls train_v() X (matrix) – training set inputs T (matrix) – training set outputs k (int) – number of parts to split the dataset into, k-2 parts are used for training and 2 parts are left out: 1 for validation and 1 for test; repeated k times until all parts have been left out for validation and test, and results averaged over these k repetitions. err_t – error for the optimal model, computed in the ‘cross-testing’ manner on data part which is not used for training or validation double

Created on Mon Oct 27 17:48:33 2014

@author: akusok

hpelm.mss_loo.train_loo(self, X, T)[source]

Model structure selection with Leave-One-Out (LOO) validation.

Trains ELM, validates model with LOO and sets an optimal validated solution. Effect is similar to cross-validation with k==N, but ELM has explicit formula of solution for LOO without iterating k times.

Parameters: self (ELM) – ELM object that calls train_v() X (matrix) – training set inputs T (matrix) – training set outputs