A Data ExploratioN pIpeliNE
Project description
<p align="center">
<img src="http://www.slipguru.unige.it/Software/adenine/_static/ade_logo_bitmap.png"><br><br>
</p>
-----------------
# Adenine: A data exploration pipeline
**adenine** is a machine learning and data mining Python library for exploratory data analysis.
The main structure of **adenine** can be summarized in the following 4 steps.
1. **Imputing:** Does your dataset have missing entries? In the first step you can fill the missing values choosing between different strategies: feature-wise median, mean and most frequent value or k-NN imputing.
2. **Preprocessing:** Have you ever wondered what would have changed if only your data have been preprocessed in a different way? Or is it data preprocessing a good idea after all? **adenine** includes several preprocessing procedures, such as: data recentering, Min-Max scaling, standardization and normalization. **adenine** also allows you to compare the results of the analysis made with different preprocessing strategies.
3. **Dimensionality Reduction:** In the context of data exploration, this phase becomes particularly helpful for high dimensional data. This step includes manifold learning (such as isomap, multidimensional scaling, etc) and unsupervised feature learning (principal component analysis, kernel PCA, etc) techniques.
4. **Clustering:** This step aims at grouping data into clusters in an unsupervised manner. Several techniques such as k-means, spectral or hierarchical clustering are offered.
The final output of **adenine** is a compact, textual and graphical representation of the results obtained from the pipelines made with each possible combination of the algorithms selected at each step.
**adenine** can run on multiple cores/machines* and it is fully `scikit-learn` compliant.
## Installation
**adenine** supports Python 2.7.
### Pip installation
`$ pip install adenine`
### Installing from sources
```bash
$ git clone https://github.com/slipguru/adenine
$ cd adenine
$ python setup.py install
```
## Try Adenine
### 1. Create your configuration file
Start from the provided template and edit your configuration file with your favourite text editor
```bash
$ ade_run.py -c my-config-file.py
$ vim my-config-file.py
...
```
```python
from adenine.utils import data_source
# -------------------------- EXPERMIENT INFO ------------------------- #
exp_tag = '_experiment'
output_root_folder = 'results'
plotting_context = 'notebook' # one of {paper, notebook, talk, poster}
file_format = 'pdf' # or 'png'
# ---------------------------- INPUT DATA ---------------------------- #
# Load an example dataset or specify your input data in tabular format
X, y, feat_names, index = data_source.load('iris')
# ----------------------- PIPELINES DEFINITION ------------------------ #
# --- Missing Values Imputing --- #
step0 = {'Impute': [True, {'missing_values': 'NaN',
'strategy': ['nearest_neighbors']}]}
# --- Data Preprocessing --- #
step1 = {'MinMax': [True, {'feature_range': [(0, 1)]}]}
# --- Unsupervised feature learning --- #
step2 = {'KernelPCA': [True, {'kernel': ['linear', 'rbf', 'poly']}],
'Isomap': [False, {'n_neighbors': 5}],
'MDS': [True, {'metric': True}],
'tSNE': [False],
'RBM': [True, {'n_components': 256}]
}
# --- Clustering --- #
# affinity ca be precumputed for AP, Spectral and Hierarchical
step3 = {'KMeans': [True, {'n_clusters': [3, 'auto']}],
'Spectral': [False, {'n_clusters': [3]}],
'Hierarchical': [False, {'n_clusters': [3],
'affinity': ['euclidean'],
'linkage': ['ward', 'average']}]
}
```
### 2. Run the pipelines
```bash
$ ade_run.py my-config-file.py
```
### 3. Automatically generate beautiful publication-ready plots and textual results
```bash
$ ade_analysis.py results/ade_experiment_<TODAY>
```
## *Got Big Data?
**adenine** takes advantage of `mpi4py` to distribute the execution of the pipelines on HPC architectures
```bash
$ mpirun -np <MPI-TASKS> --hosts <HOSTS-LIST> ade_run.py my-config-file.py
```
<img src="http://www.slipguru.unige.it/Software/adenine/_static/ade_logo_bitmap.png"><br><br>
</p>
-----------------
# Adenine: A data exploration pipeline
**adenine** is a machine learning and data mining Python library for exploratory data analysis.
The main structure of **adenine** can be summarized in the following 4 steps.
1. **Imputing:** Does your dataset have missing entries? In the first step you can fill the missing values choosing between different strategies: feature-wise median, mean and most frequent value or k-NN imputing.
2. **Preprocessing:** Have you ever wondered what would have changed if only your data have been preprocessed in a different way? Or is it data preprocessing a good idea after all? **adenine** includes several preprocessing procedures, such as: data recentering, Min-Max scaling, standardization and normalization. **adenine** also allows you to compare the results of the analysis made with different preprocessing strategies.
3. **Dimensionality Reduction:** In the context of data exploration, this phase becomes particularly helpful for high dimensional data. This step includes manifold learning (such as isomap, multidimensional scaling, etc) and unsupervised feature learning (principal component analysis, kernel PCA, etc) techniques.
4. **Clustering:** This step aims at grouping data into clusters in an unsupervised manner. Several techniques such as k-means, spectral or hierarchical clustering are offered.
The final output of **adenine** is a compact, textual and graphical representation of the results obtained from the pipelines made with each possible combination of the algorithms selected at each step.
**adenine** can run on multiple cores/machines* and it is fully `scikit-learn` compliant.
## Installation
**adenine** supports Python 2.7.
### Pip installation
`$ pip install adenine`
### Installing from sources
```bash
$ git clone https://github.com/slipguru/adenine
$ cd adenine
$ python setup.py install
```
## Try Adenine
### 1. Create your configuration file
Start from the provided template and edit your configuration file with your favourite text editor
```bash
$ ade_run.py -c my-config-file.py
$ vim my-config-file.py
...
```
```python
from adenine.utils import data_source
# -------------------------- EXPERMIENT INFO ------------------------- #
exp_tag = '_experiment'
output_root_folder = 'results'
plotting_context = 'notebook' # one of {paper, notebook, talk, poster}
file_format = 'pdf' # or 'png'
# ---------------------------- INPUT DATA ---------------------------- #
# Load an example dataset or specify your input data in tabular format
X, y, feat_names, index = data_source.load('iris')
# ----------------------- PIPELINES DEFINITION ------------------------ #
# --- Missing Values Imputing --- #
step0 = {'Impute': [True, {'missing_values': 'NaN',
'strategy': ['nearest_neighbors']}]}
# --- Data Preprocessing --- #
step1 = {'MinMax': [True, {'feature_range': [(0, 1)]}]}
# --- Unsupervised feature learning --- #
step2 = {'KernelPCA': [True, {'kernel': ['linear', 'rbf', 'poly']}],
'Isomap': [False, {'n_neighbors': 5}],
'MDS': [True, {'metric': True}],
'tSNE': [False],
'RBM': [True, {'n_components': 256}]
}
# --- Clustering --- #
# affinity ca be precumputed for AP, Spectral and Hierarchical
step3 = {'KMeans': [True, {'n_clusters': [3, 'auto']}],
'Spectral': [False, {'n_clusters': [3]}],
'Hierarchical': [False, {'n_clusters': [3],
'affinity': ['euclidean'],
'linkage': ['ward', 'average']}]
}
```
### 2. Run the pipelines
```bash
$ ade_run.py my-config-file.py
```
### 3. Automatically generate beautiful publication-ready plots and textual results
```bash
$ ade_analysis.py results/ade_experiment_<TODAY>
```
## *Got Big Data?
**adenine** takes advantage of `mpi4py` to distribute the execution of the pipelines on HPC architectures
```bash
$ mpirun -np <MPI-TASKS> --hosts <HOSTS-LIST> ade_run.py my-config-file.py
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
adenine-0.1.4.tar.gz
(40.9 kB
view details)
File details
Details for the file adenine-0.1.4.tar.gz
.
File metadata
- Download URL: adenine-0.1.4.tar.gz
- Upload date:
- Size: 40.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dcc125879c89892524e5ff0e45774d7e6bcfb67a01b89fd7d0177a62f4c0902 |
|
MD5 | a922d031180f2e800db6b41c2534ea10 |
|
BLAKE2b-256 | 6fa6dfdbfe57ae66554d673d449920f7d89dffd72b8f09b49cbe3fa7578b079c |