Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonald committed Mar 29, 2023
2 parents dffd2a5 + 7372c8b commit bb3203e
Show file tree
Hide file tree
Showing 109 changed files with 5,170 additions and 12,749 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/wheels_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
- uses: actions/checkout@v2

- name: Build wheels
uses: pypa/cibuildwheel@v2.3.1
uses: pypa/cibuildwheel@v2.12.0
env:
CIBW_PLATFORM: auto
CIBW_ARCHS: auto64
CIBW_SKIP: cp*-musllinux*
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_BUILD_VERBOSITY: 3
CIBW_BEFORE_BUILD: "pip install -r requirements_dev.txt --user && pip install ."
CIBW_BEFORE_BUILD_MACOS: "pip install -r requirements_dev.txt --user && pip install ."
CIBW_BEFORE_BUILD: "pip install -r requirements_dev.txt && pip install ."
CIBW_BEFORE_BUILD_MACOS: "pip install -r requirements_dev.txt && pip install ."
CIBW_BUILD: cp38-* cp39-* cp310-*

- uses: actions/upload-artifact@v2
Expand Down
13 changes: 13 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
History
=======

0.29.0 (2023-03-29)
-------------------

* Change API for clustering (predict / transform)
* Change API for classification (seeds -> labels)
* Change API for ranking (seeds -> weights)
* Change API for GNN (same as classifiers)
* Remove first order methods for link prediction
* Add nearest neighbor methods for link prediction
* Add KNN classifier without embedding
* Add TF-IDF
* Solve security issues by upgrade of wheels and ipython

0.28.3 (2023-01-06)
-------------------

Expand Down
18 changes: 12 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. image:: https://perso.telecom-paristech.fr/bonald/logo_sknetwork.png
:align: right
:width: 100px
:width: 150px
:alt: logo sknetwork


Expand All @@ -21,7 +21,7 @@
.. image:: https://img.shields.io/pypi/pyversions/scikit-network.svg
:target: https://pypi.python.org/pypi/scikit-network

Python package for the analysis of large graphs:
Free software library in Python for the analysis of large graphs:

* Memory-efficient representation of graphs as sparse matrices in scipy_ format
* Fast algorithms
Expand All @@ -37,7 +37,6 @@ Resources
* GitHub: https://github.com/sknetwork-team/scikit-network
* Documentation: https://scikit-network.readthedocs.io


Quick Start
-----------

Expand All @@ -51,10 +50,17 @@ Import scikit-network::

import sknetwork

See our `tutorials <https://scikit-network.readthedocs.io/en/latest/tutorials/data/index.html>`_;
the notebooks are available `here <https://github.com/sknetwork-team/scikit-network/tree/master/docs/tutorials>`_.

You can also have a look at some `use cases <https://scikit-network.readthedocs.io/en/latest/use_cases/text.html>`_.
Documentation
-------------

The documentation is structured as follows:

* `Getting started <https://scikit-network.readthedocs.io/en/latest/first_steps.html>`_: First steps to install, import and use scikit-network.
* `Reference <https://scikit-network.readthedocs.io/en/latest/reference/data.html>`_: Description of each function and object of scikit-network.
* `Tutorials <https://scikit-network.readthedocs.io/en/latest/tutorials/data/index.html>`_: Application of the main tools to toy examples.
* `Use cases <https://scikit-network.readthedocs.io/en/latest/use_cases/text.html>`_: More advanced examples combining several tools on specific use cases.
* `About <https://scikit-network.readthedocs.io/en/latest/authors.html>`_: Authors, history of the library, how to contribute, index of functions and objects.

Citing
------
Expand Down
15 changes: 9 additions & 6 deletions docs/first_steps.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.. _getting_started:

:mod:`scikit-network` is an open-source python package for the analysis of large graphs.
Scikit-network is an open-source python package for the analysis of large graphs.

Each graph is represented by a sparse matrix in ``scipy`` format (CSR).

Installation
------------

To install :mod:`scikit-network`, run this command in your terminal:
To install scikit-network, run this command in your terminal:

.. code-block:: console
Expand All @@ -16,7 +16,7 @@ To install :mod:`scikit-network`, run this command in your terminal:
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.

Alternately, you can download the sources from the `Github repo`_ and run:
Alternately, you can download the sources from `Github`_ and run:

.. code-block:: console
Expand All @@ -26,12 +26,12 @@ Alternately, you can download the sources from the `Github repo`_ and run:
.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
.. _Github repo: https://github.com/sknetwork-team/scikit-network
.. _Github: https://github.com/sknetwork-team/scikit-network

Import
------

Import :mod:`scikit-network` in Python:
Import scikit-network in Python:

.. code-block:: python
Expand All @@ -41,6 +41,7 @@ Graph loading
-------------

A graph is represented by its :term:`adjacency` matrix (square matrix).

When the graph is bipartite, it can be represented by its :term:`biadjacency` matrix (rectangular matrix).

Check our :ref:`tutorial<DataTag>` for various ways of loading a graph
Expand All @@ -61,7 +62,9 @@ Here is an example to cluster the `Karate club graph`_ with the `Louvain algorit
adjacency = karate_club()
algo = Louvain()
algo.fit(adjacency)
labels = algo.labels_
Please look at this :ref:`tutorial<ClusteringTag>` for a visualization of the result.

.. _Karate club graph: https://en.wikipedia.org/wiki/Zachary%27s_karate_club
.. _Louvain algorithm: https://en.wikipedia.org/wiki/Louvain_method
16 changes: 8 additions & 8 deletions docs/reference/classification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ Classification

Node classification algorithms.

The attribute ``labels_`` assigns a label to each node of the graph.

PageRank
--------
.. autoclass:: sknetwork.classification.PageRankClassifier
The attribute ``labels_`` gives the label of each node of the graph.

Diffusion
---------
.. autoclass:: sknetwork.classification.DiffusionClassifier

Nearest neighbors
-----------------
.. autoclass:: sknetwork.classification.KNN

Propagation
-----------
.. autoclass:: sknetwork.classification.Propagation

Nearest neighbors
-----------------
.. autoclass:: sknetwork.classification.KNN
PageRank
--------
.. autoclass:: sknetwork.classification.PageRankClassifier

Metrics
-------
Expand Down
4 changes: 0 additions & 4 deletions docs/reference/clustering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ Propagation
-----------
.. autoclass:: sknetwork.clustering.PropagationClustering

K-Means
-------
.. autoclass:: sknetwork.clustering.KMeans

Post-processing
---------------
.. autofunction:: sknetwork.clustering.reindex_labels
Expand Down
5 changes: 0 additions & 5 deletions docs/reference/embedding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,3 @@ Spring
------

.. autoclass:: sknetwork.embedding.Spring

Metrics
-------
.. autofunction:: sknetwork.embedding.get_cosine_similarity

4 changes: 0 additions & 4 deletions docs/reference/hierarchy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ Louvain

.. autoclass:: sknetwork.hierarchy.LouvainIteration

Ward
----
.. autoclass:: sknetwork.hierarchy.Ward

Metrics
-------
.. autofunction:: sknetwork.hierarchy.dasgupta_cost
Expand Down
29 changes: 4 additions & 25 deletions docs/reference/linkpred.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,11 @@ Link prediction

Link prediction algorithms.

The method ``predict`` assigns a scores to edges.
The attribute ``links_`` gives the predicted links of each node as a sparse matrix.


First order methods
-------------------
.. autoclass:: sknetwork.linkpred.CommonNeighbors
Nearest neighbors
-----------------

.. autoclass:: sknetwork.linkpred.JaccardIndex
.. autoclass:: sknetwork.linkpred.NN

.. autoclass:: sknetwork.linkpred.SaltonIndex

.. autoclass:: sknetwork.linkpred.SorensenIndex

.. autoclass:: sknetwork.linkpred.HubPromotedIndex

.. autoclass:: sknetwork.linkpred.HubDepressedIndex

.. autoclass:: sknetwork.linkpred.AdamicAdar

.. autoclass:: sknetwork.linkpred.ResourceAllocation

.. autoclass:: sknetwork.linkpred.PreferentialAttachment


Post-processing
---------------
.. autofunction:: sknetwork.linkpred.is_edge

.. autofunction:: sknetwork.linkpred.whitened_sigmoid
22 changes: 3 additions & 19 deletions docs/reference/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,17 @@ Neighborhood
.. autofunction:: sknetwork.utils.get_neighbors


Clustering
----------

.. autoclass:: sknetwork.utils.KMeansDense

.. autoclass:: sknetwork.utils.WardDense

Membership matrix
-----------------

.. autofunction:: sknetwork.utils.get_membership

.. autofunction:: sknetwork.utils.from_membership

TF-IDF
------

Nearest-neighbors
-----------------

.. autoclass:: sknetwork.utils.KNNDense

.. autoclass:: sknetwork.utils.CNNDense


Co-Neighborhood
---------------

.. autofunction:: sknetwork.utils.co_neighbor_graph
.. autofunction:: sknetwork.utils.get_tfidf


Projection
Expand Down
Loading

0 comments on commit bb3203e

Please sign in to comment.