Skip to content

Commit

Permalink
Merge pull request #97 from sknetwork-team/develop
Browse files Browse the repository at this point in the history
release 0.2.0
  • Loading branch information
Nathan de Lara authored Mar 21, 2019
2 parents 9fb1129 + 230f965 commit 16f34bb
Show file tree
Hide file tree
Showing 42 changed files with 1,991 additions and 1,025 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,5 @@ data/

\.DS_Store


*.ipynb
33 changes: 33 additions & 0 deletions .pyup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#Taken from https://pyup.io/docs/bot/config/

# configure updates globally
# default: all
# allowed: all, insecure, False
update: all

# configure dependency pinning globally
# default: True
# allowed: True, False
pin: True

# set the default branch
# default: empty, the default branch on GitHub
branch: develop

# update schedule
# default: empty
# allowed: "every day", "every week", ..
schedule: "every day"

# search for requirement files
# default: True
# allowed: True, False
search: True

# configure the branch prefix the bot is using
# default: pyup-
branch_prefix: pyup/

# allow to close stale PRs
# default: True
close_prs: True
5 changes: 0 additions & 5 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ Development Lead
* Bertrand Charpentier <[email protected]>
* Nathan De Lara <[email protected]>
* Quentin Lutz <[email protected]>

Contributors
------------

* Alexandre Hollocou <[email protected]>
29 changes: 24 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.. figure:: ../logo_sknetwork.png
:align: right
:width: 100px
:alt: logo sknetwork

==============
scikit-network
==============
Expand Down Expand Up @@ -25,11 +30,25 @@ Graph algorithms
* Documentation: https://scikit-network.readthedocs.io.


Features
--------
How to use scikit-network?
--------------------------

Graphs have a unified format, namely ``scipy.sparse.csr_matrix``.


About the documentation
-----------------------

We use the following notations in the documentation:

* :math:`A` denotes the adjacency matrix for undirected and directed graphs.

* :math:`B` denotes the biadjacency matrix for bipartite graphs (possibly non-square).

* :math:`d = A1` or :math:`B1` is the out-degree vector and :math:`D = \text{diag}(d)` the associated diagonal matrix.

* :math:`f = A^T1` or :math:`B^T1` is the in-degree vector and :math:`F = \text{diag}(f)` the associated diagonal matrix.

* Embedding
* Clustering
* Hierarchy
* :math:`w = 1^TA1` or :math:`1 ^TB1` is the total weight of the graph.


8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@

# General information about the project.
project = u'scikit-network'
copyright = u"2018, Bertrand Charpentier"
author = u"Bertrand Charpentier"
copyright = u"2019, scikit-network"
author = u"scikit-network team"

# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
Expand Down Expand Up @@ -94,7 +94,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
#html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
Expand All @@ -105,7 +105,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = []


# -- Options for HTMLHelp output ---------------------------------------
Expand Down
7 changes: 5 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.. figure:: ../sknetwork/../logo_sknetwork.png
:align: right
:width: 200px
:alt: logo sknetwork

Welcome to scikit-network's documentation!
==========================================

Expand All @@ -9,8 +14,6 @@ Welcome to scikit-network's documentation!
installation
usage
reference/index
reference2
modules
contributing
authors
history
Expand Down
30 changes: 25 additions & 5 deletions docs/reference/clustering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,38 @@ Clustering

Louvain
-------
.. automodule:: sknetwork.clustering.louvain
:toctree: generated/
.. automodule:: sknetwork.clustering

.. autoclass:: Louvain
.. autoclass:: sknetwork.clustering.Louvain
:members:

.. autoclass:: GreedyModularity
.. autoclass:: sknetwork.clustering.GreedyModularity
:members:

.. autoclass:: GreedyModularityJiT
.. autoclass:: sknetwork.clustering.GreedyModularityNumba
:members:

Louvain for bipartite graphs
----------------------------

.. autoclass:: sknetwork.clustering.BiLouvain
:members:

.. autoclass:: sknetwork.clustering.GreedyBipartite
:members:

.. autoclass:: sknetwork.clustering.GreedyBipartiteNumba
:members:


Metrics
-------
.. autofunction:: sknetwork.clustering.modularity

.. autofunction:: sknetwork.clustering.bimodularity

.. autofunction:: sknetwork.clustering.cocitation_modularity

.. autofunction:: sknetwork.clustering.performance

.. autofunction:: sknetwork.clustering.cocitation_performance
29 changes: 21 additions & 8 deletions docs/reference/embedding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,30 @@ Embedding
.. currentmodule:: sknetwork


Spectral embeddings
-------------------
.. automodule:: sknetwork.embedding.forwardbackward_embedding
:toctree: generated/
Spectral
--------
.. automodule:: sknetwork.embedding

.. autoclass:: ForwardBackwardEmbedding
.. autoclass:: sknetwork.embedding.SpectralEmbedding
:members:

.. automodule:: sknetwork.embedding.spectral_embedding
:toctree: generated/
SVD
---

.. autoclass:: SpectralEmbedding
.. autoclass:: sknetwork.embedding.GSVDEmbedding
:members:

Metrics
-------
.. autofunction:: sknetwork.embedding.dot_modularity

.. autofunction:: sknetwork.embedding.hscore


Randomized methods
------------------
.. autofunction:: sknetwork.embedding.randomized_range_finder

.. autofunction:: sknetwork.embedding.randomized_svd

.. autofunction:: sknetwork.embedding.randomized_eig
25 changes: 0 additions & 25 deletions docs/reference/hierarchical_clustering.rst

This file was deleted.

22 changes: 22 additions & 0 deletions docs/reference/hierarchy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _hierarchical_clustering:

Hierarchical clustering
***********************

.. currentmodule:: sknetwork

Paris
-----
.. automodule:: sknetwork.hierarchy
.. autosummary::
:toctree: generated/

.. autoclass:: sknetwork.hierarchy.paris.Paris
:members:


Metrics
-------
.. autofunction:: sknetwork.hierarchy.metrics.dasgupta_cost

.. autofunction:: sknetwork.hierarchy.metrics.tree_sampling_divergence
6 changes: 4 additions & 2 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ Reference
.. toctree::

embedding
flat_clustering
hierarchical_clustering
clustering
hierarchy
loader
toy_graphs
9 changes: 9 additions & 0 deletions docs/reference/loader.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _loader:

Loader
******

.. currentmodule:: sknetwork

.. autoclass:: sknetwork.loader.Parser
:members:
12 changes: 12 additions & 0 deletions docs/reference/toy_graphs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _toy_graphs:

Toy graphs
**********

.. currentmodule:: sknetwork

.. autofunction:: sknetwork.toy_graphs.house_graph

.. autofunction:: sknetwork.toy_graphs.karate_club_graph

.. autofunction:: sknetwork.toy_graphs.star_wars_villains_graph
Binary file added logo_sknetwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd
15 changes: 11 additions & 4 deletions sknetwork/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Top-level package for scikit-network"""

"""Top-level package for scikit-network."""

__author__ = """Bertrand Charpentier"""
__email__ = '[email protected]'
__author__ = """scikit-network team"""
__email__ = "[email protected]"
__version__ = '0.2.0'

from scipy.sparse.csgraph import *
from sknetwork.toy_graphs import *
from sknetwork.loader import *
from sknetwork.clustering import *
from sknetwork.hierarchy import *
from sknetwork.embedding import *
3 changes: 3 additions & 0 deletions sknetwork/clustering/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from sknetwork.clustering.louvain import *
from sknetwork.clustering.bilouvain import *
from sknetwork.clustering.metrics import *
Loading

0 comments on commit 16f34bb

Please sign in to comment.