<jupyter_start><jupyter_text>Figure 23.1:     An illustration of Euclidean vs. non-Euclidean graphs. Used with permission from \cite  chami2020machine .\relax<jupyter_code>#@title Setup { display-mode: "form" }
%%time
# If you run this for the first time it would take ~25/30 seconds
!git clone https://github.com/probml/pyprobml /pyprobml &> /dev/null && git clone https://github.com/Sekhen/colab_powertoys.git &> /dev/null 
!pip3 install nbimporter -qqq 
%cd -q /content/colab_powertoys 
from colab_powertoys.probml_toys import probml_toys as pmlt
%cd -q /content/

pmlt.show_image("/pyprobml/notebooks/figures/images/euclidean_grid.pdf.png")
pmlt.show_image("/pyprobml/notebooks/figures/images/graph_structure.pdf.png")<jupyter_output><empty_output><jupyter_text>Figure 23.2:     Illustration of the \textsc  GraphEDM  framework from \citet  chami2020machine . Based on the supervision available, methods will use some or all of the branches. In particular, unsupervised methods do not leverage label decoding for training and only optimize the similarity decoder (lower branch). On the other hand, semi-supervised and supervised methods leverage the additional supervision to learn models' parameters (upper branch). Used with permission.\relax<jupyter_code>#@title Setup { display-mode: "form" }
%%time
# If you run this for the first time it would take ~25/30 seconds
!git clone https://github.com/probml/pyprobml /pyprobml &> /dev/null && git clone https://github.com/Sekhen/colab_powertoys.git &> /dev/null 
!pip3 install nbimporter -qqq 
%cd -q /content/colab_powertoys 
from colab_powertoys.probml_toys import probml_toys as pmlt
%cd -q /content/<jupyter_output><empty_output><jupyter_text>Figure 23.3:     Shallow embedding methods. The encoder is a simple embedding look-up and the graph structure is only used in the loss function. Reprinted with permission from \cite  chami2020machine .\relax<jupyter_code>#@title Setup { display-mode: "form" }
%%time
# If you run this for the first time it would take ~25/30 seconds
!git clone https://github.com/probml/pyprobml /pyprobml &> /dev/null && git clone https://github.com/Sekhen/colab_powertoys.git &> /dev/null 
!pip3 install nbimporter -qqq 
%cd -q /content/colab_powertoys 
from colab_powertoys.probml_toys import probml_toys as pmlt
%cd -q /content/<jupyter_output><empty_output><jupyter_text>Figure 23.4:     An overview of the pipeline for random-walk graph embedding methods. Reprinted with permission from [Pri18] .\relax<jupyter_code>#@title Setup { display-mode: "form" }
%%time
# If you run this for the first time it would take ~25/30 seconds
!git clone https://github.com/probml/pyprobml /pyprobml &> /dev/null && git clone https://github.com/Sekhen/colab_powertoys.git &> /dev/null 
!pip3 install nbimporter -qqq 
%cd -q /content/colab_powertoys 
from colab_powertoys.probml_toys import probml_toys as pmlt
%cd -q /content/

pmlt.show_image("/pyprobml/notebooks/figures/images/walk.png.png")<jupyter_output><empty_output><jupyter_text>Figure 23.5:     Illustration of the GraphSAGE model. Reprinted with permission from [WZJ17] .\relax<jupyter_code>#@title Setup { display-mode: "form" }
%%time
# If you run this for the first time it would take ~25/30 seconds
!git clone https://github.com/probml/pyprobml /pyprobml &> /dev/null && git clone https://github.com/Sekhen/colab_powertoys.git &> /dev/null 
!pip3 install nbimporter -qqq 
%cd -q /content/colab_powertoys 
from colab_powertoys.probml_toys import probml_toys as pmlt
%cd -q /content/

pmlt.show_image("/pyprobml/notebooks/figures/images/sample_and_agg.png.png")<jupyter_output><empty_output><jupyter_text>Figure 23.6:     Euclidean (left) and hyperbolic (right) embeddings of a tree graph. Hyperbolic embeddings learn natural hierarchies in the embedding space (depth indicated by color). Reprinted with permission from [Ine+19] .\relax<jupyter_code>#@title Setup { display-mode: "form" }
%%time
# If you run this for the first time it would take ~25/30 seconds
!git clone https://github.com/probml/pyprobml /pyprobml &> /dev/null && git clone https://github.com/Sekhen/colab_powertoys.git &> /dev/null 
!pip3 install nbimporter -qqq 
%cd -q /content/colab_powertoys 
from colab_powertoys.probml_toys import probml_toys as pmlt
%cd -q /content/

pmlt.show_image("/pyprobml/notebooks/figures/images/gcn_depth.pdf.png")
pmlt.show_image("/pyprobml/notebooks/figures/images/hgcn_depth.pdf.png")<jupyter_output><empty_output><jupyter_text>Figure 23.7:     Unsupervised graph neural networks. Graph structure and input features are mapped to low-dimensional embeddings using a graph neural network encoder. Embeddings are then decoded to compute a graph regularization loss (unsupervised). Reprinted with permission from \cite  chami2020machine .\relax<jupyter_code>#@title Setup { display-mode: "form" }
%%time
# If you run this for the first time it would take ~25/30 seconds
!git clone https://github.com/probml/pyprobml /pyprobml &> /dev/null && git clone https://github.com/Sekhen/colab_powertoys.git &> /dev/null 
!pip3 install nbimporter -qqq 
%cd -q /content/colab_powertoys 
from colab_powertoys.probml_toys import probml_toys as pmlt
%cd -q /content/<jupyter_output><empty_output><jupyter_text>Figure 23.8:     A graph representation of some financial transactions. Adapted from   http://pgql-lang.org/spec/1.2/ .<jupyter_code>#@title Setup { display-mode: "form" }
%%time
# If you run this for the first time it would take ~25/30 seconds
!git clone https://github.com/probml/pyprobml /pyprobml &> /dev/null && git clone https://github.com/Sekhen/colab_powertoys.git &> /dev/null 
!pip3 install nbimporter -qqq 
%cd -q /content/colab_powertoys 
from colab_powertoys.probml_toys import probml_toys as pmlt
%cd -q /content/

pmlt.show_image("/pyprobml/notebooks/figures/images/financial-transaction-graph.png")<jupyter_output><empty_output><jupyter_text>Figure 23.9:     Structurally similar molecules do not necessarily have similar odor descriptors. (A) Lyral, the reference molecule. (B) Molecules with similar structure can share similar odor descriptors. (C) However, a small structural change can render the molecule odorless. (D) Further, large structural changes can leave the odor of the molecule largely unchanged. From Figure 1 of [Ben+19] , originally from [GWP12] . Used with kind permission of <NAME>.<jupyter_code>#@title Setup { display-mode: "form" }
%%time
# If you run this for the first time it would take ~25/30 seconds
!git clone https://github.com/probml/pyprobml /pyprobml &> /dev/null && git clone https://github.com/Sekhen/colab_powertoys.git &> /dev/null 
!pip3 install nbimporter -qqq 
%cd -q /content/colab_powertoys 
from colab_powertoys.probml_toys import probml_toys as pmlt
%cd -q /content/

pmlt.show_image("/pyprobml/notebooks/figures/images/smell-fig1.png")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10625273283777875, 'fraction_numerical': 0.014866637516397026, 'mean_word_length': 4.875, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 56, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '92479', 'license': 'MIT', 'n_tokens_mistral': 2446, 'n_tokens_neox': 2311, 'n_words': 670, 'path': 'notebooks/figures/chapter23_figures.ipynb', 'repo_name': 'Junjun1guo/pyprobml', 'size': '6881'}