Skip to content

Commit

Permalink
Added begin of notebook.
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnstRoell committed Oct 21, 2024
1 parent 8fdf5c0 commit 073041c
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions examples/train_gnn.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Training a GNN on the Mantra Dataset\n",
"\n",
"In this quick tutorial, we provide an example use-case for the mantra dataset.\n",
"After a quick overview and preliminary exploratory analysis we train a GNN\n",
"to predict the orientability. \n",
"\n",
"Our dataset can be installed via the pip command line with the command \n",
"```{python}\n",
"pip install mantra\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exploratory analysis of the dataset."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# Load all required packages. \n",
"\n",
"import torch \n",
"import numpy as np \n",
"import pandas as pd \n",
"import seaborn as sns \n",
"\n",
"# Load the mantra dataset\n",
"from mantra.datasets import ManifoldTriangulations\n",
"\n",
"# Instantiate the dataset. Following the `torch-geometric` API, we download the \n",
"# dataset into the root directory. \n",
"dataset = ManifoldTriangulations(root=\"../data\", manifold=\"2\", version=\"latest\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Exploratory analysis\n",
"\n",
"As a first step we aim to have a throrough understanding of the dataset. In particular we are interested \n",
"in the distribution of the various properties in the dataset, such as the betti \n",
"numbers, types of manifolds and distribution of orientability. \n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit 073041c

Please sign in to comment.