Transform percentage-based units into a 2d space to evaluate changes in distribution with both magnitude and direction.
- Free software: BSD license
- Documentation: https://yeolab.github.io/bonvoyage
To install anchor
, we recommend using the
Anaconda Python Distribution and creating an
environment, so the anchor
code and dependencies don't interfere with
anything else. Here is the command to create an environment:
conda create -n anchor-env pandas numpy matplotlib seaborn scikit-learn
To install this code from the Python Package Index, you can install on the
command line via pip
:
pip install bonvoyage
To install this code, clone this github repository and use pip
to install
git clone [email protected]:yeolab/bonvoyage
cd bonvoyage
pip install . # The "." means "install *this*, the folder where I am now"
To use bonvoyage
to get waypoints, you want your data
to be a pandas
DataFrame of shape (n_samples, n_features)
import bonvoyage
wp = bonvoyage.Waypoints()
waypoints = wp.fit_transform(data)
bonvoyage
is modeled after scikit-learn
in is method of creating a
transforming object and then running fit_transform()
to perform the computation.
To plot the waypoints, use a waypointplot
, which can do either "scatter"
or
"hex"
plot types. By default, hexbin
plots are used:
import bonvoyage
bonvoyage.waypointplot(waypoints)
You can also specify to use scatter
:
import bonvoyage
bonvoyage.waypointplot(waypoints, kind='scatter')
To add color, give a series or other groupby
-able object:
import bonvoyage
bonvoyage.waypointplot(waypoints, kind='scatter', features_groupby=modalities)
- Added tests and examples
- First release on PyPI.