About Jupyter Notebooks

This document was made from a jupyter notebook and can show and run python code. The document is broken up into what are called cells, each cell is either code, output, or markdown (text). For example this cell is markdown, which means it is plain text with a couple small formatting things, like the link in the first sentence. You can change the cell type using the dropdown menu at the top of the page.

[1]:
#This cell is python
#The cell below it is output
print("This is an output cell")
This is an output cell

The code cells contain python code that you can edit and run your self. Try changing the one above.

Importing

First you need to import the metaknowledge package

[2]:
import metaknowledge as mk

And you will often need the networkx package

[3]:
import networkx as nx

And matplotlib to display the graphs and to make them look nice when displayed

[4]:
import matplotlib.pyplot as plt
%matplotlib inline

metaknowledge also has a matplotlib based graph visualizer that will be used sometimes

[5]:
import metaknowledge.visual as mkv

These lines of code will be at the top of all the other lessons as they are what let us use metaknowledge.