Skip to content
Snippets Groups Projects
Commit 60be9705 authored by Fize Jacques's avatar Fize Jacques
Browse files

add new get_started

parent 786f1c6c
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,8 @@ extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.napoleon',
'sphinx.ext.autosectionlabel'
'sphinx.ext.autosectionlabel',
'nbsphinx'
]
# Add any paths that contain templates here, relative to this directory.
......
This diff is collapsed.
Get Started
===========
Installation
------------
See :ref:`Installation`
Generate a graph with a model
-----------------------------
We developed a serie of functions for generating graph based on the following models:
* Spatial model
* Stochastic Block Model
* Configuration Model
* Random (ER)
* Mixed Model (Spatial + SBM
For example, if you want to generate a graph based on a stochastic block model, use the following code :
.. code-block:: python
from lib.random import stochastic_block_model_graph
G = stochastic_block_model_graph(nb_nodes=300,nb_edges=1200,nb_com=5,percentage_edge_betw=0.01)
If you wish to generate a dataset containing generated graph with different configurations,
you can use the script generate_random_graph.py` using the following command :
.. code-block:: shell
python generate_theoric_random_graph.py <output_dir>
\ No newline at end of file
......@@ -12,7 +12,7 @@ Summary
:maxdepth: 2
installation
get_started
get_started.ipynb
graph_generator
link_pred_eval
......
Installation
============
To use the code in this repo, first you'll need to install Python requirements using the following command
To simplify things, this installation guide is using conda environnement. Therefore, first, we must
create a Python3.7 environnement
.. code-block:: shell
pip install -r requirements.txt
conda create --name test_lp python=3.7
conda activate test_lp
Then, you need to install graph-tool.
.. code-block:: shell
conda install -c conda-forge graph-tool
Once graph-tool is installed, we need to install OpenNE:
.. code-block:: shell
git clone https://github.com/thunlp/OpenNE.git
cd OpenNE
conda install numpy networkx scipy tensorflow==1.14 gensim scikit-learn
cd src
python setup.py install
cd ..
To verify if the installation went well, run the following command :
.. code-block:: shell
python -m openne --help
Then, install our custom version of EvalNE using pip
.. code-block:: shell
pip install git+https://github.com/thunlp/OpenNE.git
pip install git+https://github.com/Jacobe2169/EvalNE
Finally, install the Python library `graph-tool
<https://graph-tool.skewed.de>`_.
\ No newline at end of file
Finally, To use the code in this repo, you'll need to install Python requirements using the following command
.. code-block:: shell
pip install -r requirements.txt
pip install decorator==4.3
\ No newline at end of file
doc/source/schema_process.png

38.8 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment