https://github.com/burnpiro/elm-pure
Pure implementation of ELM (Extreme Learning Machine) in python (just with numpy)
https://github.com/burnpiro/elm-pure
extreme-learning-machine machine-learning ml
Last synced: 12 months ago
JSON representation
Pure implementation of ELM (Extreme Learning Machine) in python (just with numpy)
- Host: GitHub
- URL: https://github.com/burnpiro/elm-pure
- Owner: burnpiro
- Created: 2020-03-01T21:36:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-13T20:25:14.000Z (about 6 years ago)
- Last Synced: 2025-04-07T16:41:05.739Z (about 1 year ago)
- Topics: extreme-learning-machine, machine-learning, ml
- Language: Jupyter Notebook
- Homepage:
- Size: 180 KB
- Stars: 44
- Watchers: 3
- Forks: 25
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Minimalist implementation of Extreme Learning Machine

This is an implementation of Extreme Learning Machine as defined in [Extreme Learning Machine: A New LearningScheme of Feedforward Neural Networks](https://www.researchgate.net/publication/4116697_Extreme_learning_machine_A_new_learning_scheme_of_feedforward_neural_networks) paper by Guang-Bin Huang, Qin-Yu Zhu, and Chee-Kheong Siew
## Dependencies
Please always check `requirements.txt` for current dependencies
- Python 3.7
- Numpy 1.17
- Keras 2.3
Keras are not used to design model. It's just a great source of datasets :P Feel free remove it and use your own dataset.
## Usage
Currently tests are run on MNIST dataset (it's a hand-written digits dataset). You can change that inside `test.py` file.
```bash
python test.py
```
If you want, you can load weights into model by passing them as arguments:
- `beta_init`
- `w_init`
- `bias_init`
You can also change `activation` and `loss` function just pass:
- `activation` - `sigmoid`, `fourier`, `hardlimit`
- `loss` - `mse` (mean square error), `mae` (mean absolute error)
### Important
Watch out for computation complexity. Each time you try to __fit__ the model it has to do expensive matrix inversion [Moore–Penrose inverse](https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_inverse). MNIST dataset has 60k images (__H__ matrix has size of __60000x1024__) and takes around 8.5s to inverse on i7-7820X CPU. Remember about it when changing dataset or number of hidden layers
## Todo
- Implement saving/loading model (`h5py`)
- Implement tests
- Implement performance metric