This is a mini "test" Jupyter notebook to make sure the main packages we'll use are installed. Run it after following the installation instructions.
If you get a command not found
error, try to run conda install <package-name>
(in the ntds_2019
environment, i.e., after conda activate ntds_2019
).
!conda --version
conda 4.7.2
!git --version
git version 2.23.0
!python --version
Python 3.7.3
!jupyter --version
!ipython --version
!jupyter-lab --version
!jupyter-notebook --version
4.4.0 7.8.0 1.1.3 (dev), 1.0.4 (app) 6.0.1
If you get a ModuleNotFoundError
error, try to run conda install <package-name>
(in the ntds_2019
environment, i.e., after conda activate ntds_2019
).
import numpy as np
np.__version__
'1.15.4'
import scipy
scipy.__version__
'1.3.1'
import pandas as pd
pd.__version__
'0.25.1'
import matplotlib as mpl
mpl.__version__
'3.1.1'
import networkx as nx
nx.__version__
'2.3'
import pygsp
pygsp.__version__
'0.5.1'
import sklearn
sklearn.__version__
'0.21.3'
import torch
torch.__version__
'1.2.0'
import dgl
dgl.__version__
'0.3.1'
%matplotlib inline
graph = pygsp.graphs.Logo()
graph.estimate_lmax()
filt = pygsp.filters.Heat(graph, tau=100)
DELTAS = [20, 30, 1090]
signal = np.zeros(graph.N)
signal[DELTAS] = 1
signal = filt.filter(signal)
graph.plot_signal(signal, highlight=DELTAS)