hoggorm is a Python package for explorative multivariate statistics in Python. It contains the following methods:
- PCA (principal component analysis)
- PCR (principal component regression)
- PLSR (partial least squares regression)
- PLSR1 for single variable responses
- PLSR2 for multivariate responses
- matrix correlation coefficients RV, RV2 and SMI.
Unlike scikit-learn, which is an excellent python machine learning package focusing on classification, regression, clustering and predicition, hoggorm rather aims at understanding and interpretation of the variance in the data. hoggorm also contains tools for prediction. The complementary package hoggormplot can be used for visualization of results of models trained with hoggorm.
Below are links to some Jupyter notebooks that illustrate how to use hoggorm and hoggormplot with the methods mentioned above. All examples are also found in the examples folder.
- Jupyter notebooks with examples of how to use hoggorm
- for PCA
- PCA on cancer data on men in OECD countries
- PCA on NIR spectroscopy data measured on gasoline
- PCA on sensory data measured on cheese
- PCA on cancer data on men in OECD countries
- for PCR
- PCR on sensory and fluorescence spectroscopy data measured on cheese
- PCR on sensory and fluorescence spectroscopy data measured on cheese
- for PLSR1 for univariate response (one response variable)
- PLSR1 on NIR spectroscopy and octane data measured on gasoline
- for PLSR2 for multivariate response (multiple response variables)
- PLSR2 on sensory and fluorescence spectroscopy data measured on cheese
- PLSR2 on sensory and fluorescence spectroscopy data measured on cheese
- for matrix correlation coefficients RV and RV2
- RV and RV2 coefficient on sensory and fluorescence spectroscopy data measured on cheese
- RV and RV2 coefficient on sensory and fluorescence spectroscopy data measured on cheese
- for the SMI (similarity of matrix index)
Make sure that Python 3.5 or higher is installed. A convenient way to install Python and many useful packages for scientific computing is to use the Anaconda distribution.
- numpy >= 1.9
Install hoggorm easily from the command line from the PyPI - the Python Packaging Index.
pip install hoggorm
You can install using the conda package manager by running
conda install -c conda-forge hoggorm
- Documentation at Read the Docs
- Jupyter notebooks with examples of how to use Hoggorm together with the complementary plotting package hoggormplot.
If you use hoggorm in a report or scientific publication, we would appreciate citations to the following paper:
Tomic et al., (2019). hoggorm: a python library for explorative multivariate statistics. Journal of Open Source Software, 4(39), 980, https://doi.org/10.21105/joss.00980
Bibtex entry:
@article{hoggorm,
title={hoggorm: a python library for explorative multivariate statistics},
author={Tomic, Oliver and Graff, Thomas and Liland, Kristian Hovde and N{\ae}s, Tormod},
journal={The Journal of Open Source Software},
volume={4},
number={39},
year={2019}
doi={10.21105/joss.00980},
url={http://joss.theoj.org/papers/10.21105/joss.00980}
}