Repository: wwu-mmll/photonai_graph (language: python)

Issue:
Revise documentation
Please only change inline documentation scince #21


Discussion / hints:
Please use numpy comment style only!

Fix patch:
diff --git a/.github/workflows/update_documentation.yml b/.github/workflows/update_documentation.yml
index 4659c77..a32b976 100644
--- a/.github/workflows/update_documentation.yml
+++ b/.github/workflows/update_documentation.yml
@@ -20,7 +20,8 @@ jobs:
           python-version: '3.9'
 
       - name: Install mkdocs requirements
-        run: pip install mkdocs mkdocs-material pymdown-extensions mkdocstrings-python
+        run: |
+        pip install mkdocs mkdocs-material pymdown-extensions mkdocstrings-python mkdocs-git-revision-date-localized-plugin
 
       - name: Install photonai_graph requirements
         run: pip install -r requirements.txt
diff --git a/documentation/docs/API.md b/documentation/docs/API.md
index 351c57d..55fcb15 100644
--- a/documentation/docs/API.md
+++ b/documentation/docs/API.md
@@ -1,5 +1,38 @@
 # API
 
-The API of PHOTONAI Graph is based on the PHOTONAI package. It provides additional methods that can be used for graph machine learning, and a few utility functions for handling the conversions of graphs as well as writing and saving them. The different methods are implemented so that they can be used as elements of a photon pipeline or on their own, as all elements are also sklearn compatible as they implement fit/transform/predict functions. There is a certain workflow (link the workflow page) so that the graph machine learning steps work together. Each implemented method is either a transformer or a predictor as can be seen on the chart below.
+The API of PHOTONAI Graph is based on the PHOTONAI package. 
+It provides additional methods that can be used for graph machine learning, and a few utility functions for 
+handling the conversions of graphs as well as writing and saving them. The different methods are implemented 
+so that they can be used as elements of a photon pipeline or on their own, as all elements are also sklearn 
+compatible as they implement fit/transform/predict functions. There is a certain [workflow](/workflow/)
+so that the graph machine learning steps work together. Each implemented method is either a transformer or a
+predictor.
 
-![API Groups](img/API.png)
+## Transformer Classes
+Transformer objects are performing transformations of the input data. Therefore each transformer has to provide
+either a `fit()` and a `transform()` function or a `fit_transform()` function. 
+
+```mermaid
+classDiagram-v2
+    class Transformer{
+    +fit()
+    +transform()
+    +fit_transform()
+    }
+    Transformer <|-- Graph Constructor
+    Transformer <|-- Graph Measures
+    Transformer <|-- Graph Kernel
+    Transformer <|-- Graph Embedding
+```
+
+## Predictor Classes
+Predictor objects are the actual learning algorithm of the respective pipeline.
+Therefore each predictor has to provide at least a `fit()` and a `predict()` function.
+```mermaid
+classDiagram-v2
+    class Predictor{
+    +fit()
+    +predict()
+    }
+    Predictor <|-- GraphNeuralNetwork  
+```
diff --git a/documentation/docs/dynamic_utils.md b/documentation/docs/dynamic_utils.md
index 0329055..f56ee7f 100644
--- a/documentation/docs/dynamic_utils.md
+++ b/documentation/docs/dynamic_utils.md
@@ -2,7 +2,7 @@
 
 A module focused on functions and constructors for dynamic graph data.
 
-!!! note "Warning" 
+!!! warning "Warning" 
     Currently under development and constantly evolving. Use with caution.
 
 ## CofluctTransform
diff --git a/documentation/docs/getting_started.md b/documentation/docs/getting_started.md
index d67b90d..b6e45a3 100644
--- a/documentation/docs/getting_started.md
+++ b/documentation/docs/getting_started.md
@@ -2,15 +2,6 @@
 
 In order to get started, you will need connectivity matrices or data, that is already graph data. For this introduction we will assume that you are using connectivity matrices.
 
-## Installation
-
-First install photonai-graph into a new python/conda environment.
-
-```
-pip install photonai
-pip install photonai-graph
-```
-
 ## Loading your matrices
 
 If you are using dense matrices, photonai-graph assumes that they have a certain shape: They should come as numpy matrices or array with the dimensions **Subjects x nodes x nodes x modalities (optional)**. If you are using matlab files, from NBS, CONN or other popular neuroimaging connectivity toolboxes, you will have to import them. An example function on how to import matlab data matrices can be seen [here](https://github.com/BenisFarmen/connectivity_loading/blob/master/load_functions.py). 
diff --git a/documentation/docs/graph_construction.md b/documentation/docs/graph_construction.md
index 043c3f6..c1030a7 100644
--- a/documentation/docs/graph_construction.md
+++ b/documentation/docs/graph_construction.md
@@ -1,8 +1,48 @@
 # Graph Construction
 
-The Graph Construction module is a collection of transformer classes that construct adjacency matrices for graphs based on connectivity matrices. This includes well established methods like thresholding the connectivity matrix, but also allows for more complex adjacency matrix construction methods like kNN-based matrix construction. The adjacency matrices that the transform method of each class returns can then be converted into different formats like networkx, scipy sparse or dgl graphs.
+The Graph Construction module is a collection of transformer classes that construct adjacency matrices 
+for graphs based on connectivity matrices. This includes well established methods like thresholding the 
+connectivity matrix, but also allows for more complex adjacency matrix construction methods like kNN-based 
+matrix construction. The adjacency matrices that the transform method of each class returns can then be 
+converted into different formats like networkx, scipy sparse or dgl graphs.
 
-Depending on the type of data you are working with, you might have very noisy data. Or you might be interested only in weaker connections. Or you want the same adjacency matrix for every graph. Transforming your connectivity matrix into an adjacency matrix of your choice can be achieved by the different graph constructor classes, which implement different transformations of the connectivity matrix. In the case of noisy data, thresholding the connections might reduce noise and increase computational speed, by having to evaluate less edges later on. Picking a threshold or percentage window allows you to discard other connections, focusing on the information that is contained in the connections that fall in your window range. And creating the same adjacency matrix for every graph, with only different node features might allow you to use graph algorithms you might otherwise not be able to use.
+Depending on the type of data you are working with, you might have very noisy data. 
+Or you might be interested only in weaker connections. Or you want the same adjacency matrix for every graph. 
+Transforming your connectivity matrix into an adjacency matrix of your choice can be achieved by the different 
+graph constructor classes, which implement different transformations of the connectivity matrix. In the case of 
+noisy data, thresholding the connections might reduce noise and increase computational speed, by having to evaluate 
+less edges later on. Picking a threshold or percentage window allows you to discard other connections, focusing on 
+the information that is contained in the connections that fall in your window range. And creating the same 
+adjacency matrix for every graph, with only different node features might allow you to use graph algorithms you 
+might otherwise not be able to use.
+
+```mermaid
+classDiagram-v2
+    direction RL
+    class Graph Constructor{
+    +fit()
+    +transform()
+    +fit_transform()
+    }
+    Graph Constructor <|-- GraphConstructorThreshold
+    Graph Constructor <|-- GraphConstructorPrecentage
+    Graph Constructor <|-- GraphConstructorThresholdWindow
+    Graph Constructor <|-- GraphConstructorPercentageWindow
+    Graph Constructor <|-- GraphConstructorKNN
+    Graph Constructor <|-- GraphConstructorSpatial
+    Graph Constructor <|-- GraphConstructorRandomWalks
+    
+    link GraphConstructor "/graph_construction/#graphconstructor"
+    link GraphConstructorThreshold "/graph_construction/#graphconstructorthreshold"
+    link GraphConstructorPercentage "/graph_construction/#graphconstructorpercentage"
+    link GraphConstructorThresholdWindow "/graph_construction/#graphconstructorthresholdwindow"
+    link GraphConstructorPercentageWindow "/graph_construction/#graphconstructorpercentagewindow"
+    link GraphConstructorKNN "/graph_construction/#graphconstructorknn"
+    link GraphConstructorSpatial "/graph_construction/#graphconstructorspatial"
+    link GraphConstructorRandomWalks "/graph_construction/#graphconstructorrandomwalks"
+```
+
+Hint: By clicking on the class in the above diagram you will find the according documentation.
 
 ## GraphConstructor
 ::: photonai_graph.GraphConstruction.GraphConstructor.__init__
diff --git a/documentation/docs/graph_utilities.md b/documentation/docs/graph_utilities.md
index c7fdd85..b0a033b 100644
--- a/documentation/docs/graph_utilities.md
+++ b/documentation/docs/graph_utilities.md
@@ -1,6 +1,14 @@
 # Graph Utility functions
 
-The graph utility functions module is a set of utility functions when working with graphs. They contain functions for plotting graphs, converting them and checking for certain properties (for example: checking if the graph asteroidal). The module is split into two main parts: conversion functions, which handle conversions between different graph formats and non-conversion functions (saving/writing graphs, plotting them, ...). These functions can also be used outside of the PHOTONAI Graph framework to handle conversions or check graph layouts.
+The graph utility functions module is a set of utility functions when working with graphs. 
+They contain functions for plotting graphs, converting them and checking for certain properties,
+for example checking if the graph asteroidal. The module is split into two main parts: 
+
+1. Conversion functions, which handle conversions between different graph formats 
+2. Non-conversion functions such as saving/writing graphs, plotting, etc. 
+
+All utility functions can also be used outside the PHOTONAI Graph 
+framework to handle conversions or check graph layouts.
 
 ## Graph Utility Functions
 
diff --git a/documentation/docs/img/API.png b/documentation/docs/img/API.png
deleted file mode 100644
index a03b997..0000000
Binary files a/documentation/docs/img/API.png and /dev/null differ
diff --git a/documentation/docs/img/Workflow.png b/documentation/docs/img/Workflow.png
deleted file mode 100644
index 1dffc16..0000000
Binary files a/documentation/docs/img/Workflow.png and /dev/null differ
diff --git a/documentation/docs/index.md b/documentation/docs/index.md
index 6801e31..9df1fc7 100644
--- a/documentation/docs/index.md
+++ b/documentation/docs/index.md
@@ -2,19 +2,11 @@
 
 This is an extension module to the PHOTONAI Python toolbox. With PHOTONAI Graph, you can create graph embeddings, calculate graph measures, train graph neural networks and use other graph machine learning methods.
 
-!!! note "Warning"
+!!! danger "Warning"
     Please consider that this package is still under active development. Use wisely!
 
 ## Background
 
 Graphs structures can be found in many different fields from social networks, to molecular graphs to brain networks. They are very common in biology and neuroscience, for example in the area of connectomics. Graphs provide a natural representation of networks and allow for the study of their properties. In order to make use of the special information that the graph structure provides, different machine learning techniques have been developed. PHOTONAI Graph integrates a lot of these algorithms into the PHOTON framework and makes out-of-the-box models available for the study of graphs.
 
-This allows researchers from a variety of fields to use graph machine learning techniques for their projects and to build pipelines and evaluate them within a few lines of code. 
-
-## Installation
-
-Since PHOTONAI Graph is an extension the PHOTONAI framework, it requires PHOTONAI for building pipelines (though for the use outside of pipelines it is not necessarily required). PHOTONAI Graph can be easily installed after creating a python/conda environment.
-
-```bash
-pip install photonai-graph
-```
+This allows researchers from a variety of fields to use graph machine learning techniques for their projects and to build pipelines and evaluate them within a few lines of code.
\ No newline at end of file
diff --git a/documentation/docs/installation.md b/documentation/docs/installation.md
index 58e294e..aed2d15 100644
--- a/documentation/docs/installation.md
+++ b/documentation/docs/installation.md
@@ -1,5 +1,43 @@
-To install PHOTONAI Graph, you should create a new python/anaconda environment. After creating an environment activate it and install PHOTONAI Graph by simply executing:
+# Installation
+The bare installation of PHOTONAI Graph will get you up and running with machine learning graph analysis.
+Some analysis may require additional packages. PHOTONAI Graph will inform you about these requirements if needed.
 
-```bash
+
+## Prerequisites
+We recommend using [anaconda](https://www.anaconda.com/) environments. Alternatively you can simply use virtual environments or install PHOTONAI Graph system wide.
+
+## Installation via PIP
+
+The PHOTONAI Graph library can simply be installed via pip:
+
+```shell
 pip install photonai-graph
 ```
+
+If you prefer to use the dev version of PHOTONAI Graph:
+
+!!! warning 
+    This Version could be unstable due to active development
+
+```shell
+pip install git+https://github.com/wwu-mmll/photonai_graph@dev
+```
+
+## Installation verification
+You can verify your installation by starting python and runnning:
+
+```python
+import photonai_graph
+print(photonai_graph.__version__)
+```
+
+This should not return an error but the currently installed version number of PHOTONAI Graph.
+
+## Additional packages
+To be able to use all modules of the toolbox you have to install these additional packages:
+```shell
+pip install tensorflow
+pip install torch
+pip install dgl
+pip install grakel
+```
\ No newline at end of file
diff --git a/documentation/docs/workflow.md b/documentation/docs/workflow.md
index 9ba1736..dabc90b 100644
--- a/documentation/docs/workflow.md
+++ b/documentation/docs/workflow.md
@@ -2,7 +2,18 @@
 
 The starting point for PHOTON Graph can be either connectivity matrices or data that is already in a graph format (networkx, dgl, sparse/dense adjacency matrices). Depending on your starting point, there are different ways in which you will you will have set up your pipeline. In the case that you have connectivity matrices, you will need to use graph constructors to turn those connectivity matrices into adjacency matrices. After can choose from different options of doing machine learning with your graph data.
 
-![Pipeline Overview](img/Workflow.png)
+```mermaid
+graph TD
+    A[Connectivity Matrices] --> B(Graph Constructor)
+    B --> C{Graph Data}
+    C --> D[Graph Embedding]
+    C --> E[Graph Kernel]
+    C --> F[Graph Measures]
+    C --> G[Graph Neural Network]
+    D --> H["Classical" Machine Learning]
+    E --> H
+    F --> H
+```
 
 ### Connectivity matrices
 
diff --git a/documentation/mkdocs.yml b/documentation/mkdocs.yml
index 2eee0e9..3b9c9a3 100644
--- a/documentation/mkdocs.yml
+++ b/documentation/mkdocs.yml
@@ -3,6 +3,7 @@ site_name: PHOTONAI - Graph
 repo_name: 'photonai-graph'
 repo_url: 'https://github.com/wwu-mmll/photonai-graph'
 site_dir: '../docs'
+edit_uri: 'edit/master/documentation/docs'
 
 
 # Social media
@@ -15,11 +16,11 @@ extra:
 theme: 
   name: 'material'
   palette:
-    primary: 'deep orange'
-    accent: 'deep orange'
+    primary: 'teal'
+    accent: 'teal'
   font:
     text: 'Roboto'
-    code: 'Roboto Mono'
+    code: 'Space Mono'
 
 # Latex
 extra_javascript:
@@ -27,7 +28,15 @@ extra_javascript:
 
 # extensions
 markdown_extensions:
-  - pymdownx.arithmatex
+  - pymdownx.highlight:
+      auto_title: true
+  - pymdownx.inlinehilite
+  - pymdownx.snippets
+  - pymdownx.superfences:
+      custom_fences:
+        - name: mermaid
+          class: mermaid
+          format: !!python/name:pymdownx.superfences.fence_code_format
   - codehilite
   - admonition
 
@@ -37,18 +46,19 @@ nav:
 - Installation: 'installation.md'
 - Getting Started: 'getting_started.md'
 - Workflow: 'workflow.md'
-- API: 'API.md'
-- Graph Construction: 
-    - Theory: 
-       'graph_construction.md'
-    - Examples:
-       'examples/graph_construction_examples.md'
-- Dynamic Utilities: 'dynamic_utils.md'
-- Graph Measures: 'graph_measures.md'
-- Graph Embeddings: 'graph_embeddings.md'
-- Graph Kernels: 'graph_kernels.md'
-- Graph Neural Networks: 'graph_convnets.md'
-- Graph Utilities: 'graph_utilities.md'
+- API:
+  - Introduction: 'API.md'
+  - Graph Construction:
+      - Functions:
+         'graph_construction.md'
+      - Examples:
+         'examples/graph_construction_examples.md'
+  - Dynamic Utilities: 'dynamic_utils.md'
+  - Graph Measures: 'graph_measures.md'
+  - Graph Embeddings: 'graph_embeddings.md'
+  - Graph Kernels: 'graph_kernels.md'
+  - Graph Neural Networks: 'graph_convnets.md'
+  - Graph Utilities: 'graph_utilities.md'
 
 extra_css:
   - stylesheets/material.css
@@ -60,4 +70,5 @@ plugins:
           selection:
             docstring_style: numpy
           rendering:
-            show_source: false
\ No newline at end of file
+            show_source: false
+  - git-revision-date-localized
\ No newline at end of file


Test patch:
diff --git a/documentation/docs/img/test.jpg b/documentation/docs/img/test.jpg
deleted file mode 100644
index acaab43..0000000
Binary files a/documentation/docs/img/test.jpg and /dev/null differ
diff --git a/documentation/docs/test.jpg b/documentation/docs/test.jpg
deleted file mode 100644
index acaab43..0000000
Binary files a/documentation/docs/test.jpg and /dev/null differ