All Projects → msuzen → bristol

msuzen / bristol

Licence: GPL-3.0 license
Parallel random matrix tools and complexity for deep learning

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to bristol

Nni
An open source AutoML toolkit for automate machine learning lifecycle, including feature engineering, neural architecture search, model compression and hyper-parameter tuning.
Stars: ✭ 10,698 (+42692%)
Mutual labels:  machine-learning-algorithms, neural-architecture-search
bihm
Bidirectional Helmholtz Machines
Stars: ✭ 40 (+60%)
Mutual labels:  machine-learning-algorithms
awesome-computer-vision-models
A list of popular deep learning models related to classification, segmentation and detection problems
Stars: ✭ 419 (+1576%)
Mutual labels:  machine-learning-algorithms
mlreef
The collaboration workspace for Machine Learning
Stars: ✭ 1,409 (+5536%)
Mutual labels:  machine-learning-algorithms
receptive field analysis toolbox
A toolbox for receptive field analysis and visualizing neural network architectures
Stars: ✭ 84 (+236%)
Mutual labels:  neural-architecture-search
Soomvaar
Soomvaar is the repo which 🏩 contains different collection of 👨‍💻🚀code in Python and 💫✨Machine 👬🏼 learning algorithms📗📕 that is made during 📃 my practice and learning of ML and Python✨💥
Stars: ✭ 41 (+64%)
Mutual labels:  machine-learning-algorithms
HyperKeras
An AutoDL tool for Neural Architecture Search and Hyperparameter Optimization on Tensorflow and Keras
Stars: ✭ 29 (+16%)
Mutual labels:  neural-architecture-search
FinRL Podracer
Cloud-native Financial Reinforcement Learning
Stars: ✭ 179 (+616%)
Mutual labels:  machine-learning-algorithms
GDLibrary
Matlab library for gradient descent algorithms: Version 1.0.1
Stars: ✭ 50 (+100%)
Mutual labels:  machine-learning-algorithms
Sales-Prediction
In depth analysis and forecasting of product sales based on the items, stores, transaction and other dependent variables like holidays and oil prices.
Stars: ✭ 56 (+124%)
Mutual labels:  machine-learning-algorithms
books-ML-and-DL
.pdf Format Books for Machine and Deep Learning
Stars: ✭ 105 (+320%)
Mutual labels:  machine-learning-algorithms
Clustering Algorithms from Scratch
Implementing Clustering Algorithms from scratch in MATLAB and Python
Stars: ✭ 170 (+580%)
Mutual labels:  machine-learning-algorithms
CM-NAS
CM-NAS: Cross-Modality Neural Architecture Search for Visible-Infrared Person Re-Identification (ICCV2021)
Stars: ✭ 39 (+56%)
Mutual labels:  neural-architecture-search
cheapml
Machine Learning algorithms coded from scratch
Stars: ✭ 17 (-32%)
Mutual labels:  machine-learning-algorithms
mdgrad
Pytorch differentiable molecular dynamics
Stars: ✭ 127 (+408%)
Mutual labels:  statistical-mechanics
greycat
GreyCat - Data Analytics, Temporal data, What-if, Live machine learning
Stars: ✭ 104 (+316%)
Mutual labels:  machine-learning-algorithms
Multi-Type-TD-TSR
Extracting Tables from Document Images using a Multi-stage Pipeline for Table Detection and Table Structure Recognition:
Stars: ✭ 174 (+596%)
Mutual labels:  machine-learning-algorithms
mnist-neural-network-deeplearnjs
🍃 Using a Neural Network to recognize MNIST digets in JavaScript.
Stars: ✭ 26 (+4%)
Mutual labels:  machine-learning-algorithms
Moo-GBT
Library for Multi-objective optimization in Gradient Boosted Trees
Stars: ✭ 63 (+152%)
Mutual labels:  machine-learning-algorithms
pyspark-ML-in-Colab
Pyspark in Google Colab: A simple machine learning (Linear Regression) model
Stars: ✭ 32 (+28%)
Mutual labels:  machine-learning-algorithms

Bristol

Build Status Coverage Status PyPI version Downloads Downloads arXiv:1704.08303 Zenodo:Archive:v0.1.8 Zenodo:Surrogate Matrices Data arXiv:1911.07831 arXiv:2006.13687

Parallel random matrix tools and random matrix theory deep learning applications. Generate matrices from Circular Unitary Ensemble (CUE), Circular Ortogonal Ensemble (COE) and Circular Symplectic Ensemble (CSE). Additional spectral analysis utilities are also implemented, such as computation of spectral density and spectral ergodicity for complexity of deep learning architectures.

Features

  • Generation of Circular Ensembles: CUE, COE and CSE.
  • Random matrices: Reproducibility both in serial and parallel processing.
  • Eigenvalue Spectra, spectral densitiy.
  • Kullbach-Leibler divergence and spectral ergodicity measure functionality.
  • Cascading Periodic Spectral Ergodicity (cPSE)

Installation

Install with pip from pypi.

pip install bristol

To use the latest development version

pip install -upgrade git+https://github.com/msuzen/bristol.git

Documentation

Complexity of a deep learning model: cPSE

Vanilla case

In the vanilla case a list of matrices that are representative of ordered set of weight matrices can be used to compute cPSE over layers. As an examples:

from bristol import cPSE
import numpy as np
np.random.seed(42)
matrices = [np.random.normal(size=(64,64)) for _ in range(10)]
(d_layers, cpse) = cPSE.cpse_measure_vanilla(matrices)

Even for set of Gaussian matrices, d_layers decrease. Note that different layer types should be converted to a matrix format, i.e., CNNs to 2D matrices. See the main paper.

For torch models

You need to put your model as pretrained model format of PyTorch. An example for vgg, and use cPSE.cpse_measure function simply:

from bristol import cPSE
import torchvision.models as models
netname = 'vgg11'
pmodel = getattr(models, netname)(pretrained=True)
(d_layers, cpse) = cPSE.cpse_measure(pmodel)

This would give cpse a single number expressing the complexity of your network and d_layers evolution of periodic spectral ergodicity withing layers as a vector, order matters.

Prototype notebooks

  • Basics of circular ensembles ipynb.

  • Computing spectral ergodicity for generated matrices ipynb. This is to reproduce the main figure from arXiv:1704.08693.

  • The concept of cascading periodic ergodicity (cPSE) ipynb This is only to reproduce paper's results from arXiv:1911.07831.

  • Empirical deviations of semicircle law in mixed-matrix ensembles,
    M. Suezen, hal-03464130 | ipynb Reproduces the work with the same title.

Contact

  • Please create an issue for any type of questions or contact msuzen.

References

  • Berry, M V & Pragya Shukla 2013, Hearing random matrices and random waves, New. J. Phys. 15 013026 (11pp) berry456

  • Spectral Ergodicity in Deep Learning Architectures via Surrogate Random Matrices, Mehmet Süzen, Cornelius Weber, Joan J. Cerdà, arXiv:1704.08693

  • Periodic Spectral Ergodicity: A Complexity Measure for Deep Neural Networks and Neural Architecture Search, Mehmet Süzen, Cornelius Weber, Joan J. Cerdà, arXiv:1911.07831

  • Empirical deviations of semicircle law in mixed-matrix ensembles,
    M. Suezen, hal-03464130 | ipynb Reproduces the work with the same title.

Citation

If you use the ideas or tools from this package please do cite our manuscripts.

@article{suezen2017a,
    title={Spectral Ergodicity in Deep Learning Architectures via Surrogate Random Matrices},
    author={Mehmet Süzen and Cornelius Weber and Joan J. Cerdà},
    year={2017},
    eprint={1704.08303},
    archivePrefix={arXiv},
    primaryClass={stat.ML}
}
@article{suezen2019a,
    title={Periodic Spectral Ergodicity: A Complexity Measure for Deep Neural Networks and Neural Architecture Search},
    author={Mehmet Süzen and Cornelius Weber and Joan J. Cerdà},
    year={2019},
    eprint={1911.07831},
    archivePrefix={arXiv},
    primaryClass={stat.ML}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].