Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch python-igraph to igraph #260

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,32 @@

> Nature uses as little as possible of anything. - Johannes Kepler

This is a Python implementation of the TDA Mapper algorithm for visualization of high-dimensional data. For complete documentation, see [https://kepler-mapper.scikit-tda.org](https://kepler-mapper.scikit-tda.org).
This is a Python implementation of the TDA Mapper algorithm for visualization of high-dimensional data. For complete documentation, see [https://kepler-mapper.scikit-tda.org](https://kepler-mapper.scikit-tda.org).

KeplerMapper employs approaches based on the Mapper algorithm (Singh et al.) as first described in the paper "Topological Methods for the Analysis of High Dimensional Data Sets and 3D Object Recognition".

KeplerMapper can make use of Scikit-Learn API compatible cluster and scaling algorithms.


## Install

### Dependencies

KeplerMapper requires:

- Python (>= 3.6)
- NumPy
- Scikit-learn
- Python (>= 3.6)
- NumPy
- Scikit-learn

Using the plotly visualizations requires a few extra libraries:

- Python-Igraph
- Plotly
- Ipywidgets
- igraph
- Plotly
- Ipywidgets

Additionally, running some of the examples requires:

- matplotlib
- umap-learn

- matplotlib
- umap-learn

### Installation

Expand All @@ -47,6 +45,7 @@ pip install kmapper
```

To install from source:

```
git clone https://github.com/MLWave/kepler-mapper
cd kepler-mapper
Expand All @@ -58,6 +57,7 @@ pip install -e .
KeplerMapper adopts the scikit-learn API as much as possible, so it should feel very familiar to anyone who has used these libraries.

### Python code

```python
# Import the class
import kmapper as km
Expand Down
6 changes: 2 additions & 4 deletions kmapper/plotlyviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
import plotly.io as pio
except ImportError:
print(
"""To use the plotly visualization tools, you must have the packages python-igraph, plotly, and ipywidgets installed in your environment."""
"""To use the plotly visualization tools, you must have the packages igraph, plotly, and ipywidgets installed in your environment."""
""" It looks like at least one of these is missing. Please install again with"""
"""\n\n\t`pip install python-igraph plotly ipywidgets`\n\nand try again"""
"""\n\n\t`pip install igraph plotly ipywidgets`\n\nand try again"""
)
raise

Expand Down Expand Up @@ -226,7 +226,6 @@ def scomplex_to_graph(
colorscale,
node_color_function="mean",
):

color_values = np.array(color_values)

json_dict = {"nodes": [], "links": []}
Expand Down Expand Up @@ -712,7 +711,6 @@ def _get_plotly_data(E, coords):


def _text_mapper_summary(mapper_summary):

d = mapper_summary["custom_meta"]
text = "<br><b>Projection: </b>" + d["projection"]
text += (
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"pytest", # ~=6.2.5",
"networkx", # ~=2.5.1",
"matplotlib", # ~=3.3.4",
"python-igraph", # ~=0.9.6",
"igraph",
"plotly", # ~=5.3.1",
"ipywidgets", # ~=7.6.5",
],
Expand All @@ -45,7 +45,7 @@
# for building docs for plotlyviz stuff
"networkx", # ~=2.5.1",
"matplotlib", # ~=3.3.4",
"python-igraph", # ~=0.9.6",
"igraph",
"plotly", # ~=5.3.1",
"ipykernel",
"ipywidgets", # ~=7.6.5",
Expand Down