1) Kendall's sphere of triangles

In this first workshop session, we will perform simple statistical operations in a nonlinear shape space: the set of polygons up to similarities.

The main references on the subject are:

  • Shape manifolds, procrustean metrics, and complex projective spaces (1984);
  • Statistical shape analysis, with applications in R (1998,2016);
  • Functional and Shape Data Analysis (2016);

which are respectively Kendall's landmark paper, a classic handbook by Dryden and Mardia and a recent handbook by Srivastava and Klassen.

In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
import plotly
# run at the start of every notebook

# Mandatory imports...
import numpy as np
from numpy   import random
import torch
from torch import tensor
from torch.nn import Parameter

# Custom modules:
from kendall_triangles import KendallTriangles # Fancy visualization
from model import Model  # Optimization blackbox
from display import plot # Simple plotting routine for triangles

# Finally, emulate complex numbers with pairs of floats:
from torch_complex import rot, normalize, herm, angle, mod2, mod