Geometry

Classes:

Angle([abs, degrees])

Get angle between line formed by two points and horizontal axis

Distance(pairwise, n_dim, metric, …)

Given an n_samples x n_dimensions array, compute pairwise or mean distances

Transform(rhythm, *args, **kwargs)

Metaclass for data transformations

class Distance(pairwise: bool = False, n_dim: int = 2, metric: str = 'euclidean', squareform: bool = True, *args, **kwargs)[source]

Bases: autopilot.transform.transforms.Transform

Given an n_samples x n_dimensions array, compute pairwise or mean distances

Parameters
  • pairwise (bool) – If False (default), return mean distance. if True, return all distances

  • n_dim (int) – number of dimensions (input array will be filtered like input[:,0:n_dim]

  • metric (str) – any metric acceptable to :func:`scipy.spatial.distance.pdist

  • squareform (bool) – if pairwise is True, if True return square distance matrix, otherwise return compressed distance matrix (dist(X[i], X[j] = y[i*j])

  • *args

  • **kwargs

Attributes:

format_in

format_out

Methods:

process(input)

format_in = {'type': <class 'numpy.ndarray'>}
format_out = {'type': <class 'numpy.ndarray'>}
process(input: numpy.ndarray)[source]
class Angle(abs=True, degrees=True, *args, **kwargs)[source]

Bases: autopilot.transform.transforms.Transform

Get angle between line formed by two points and horizontal axis

Attributes:

format_in

format_out

Methods:

process(input)

format_in = {'type': <class 'numpy.ndarray'>}
format_out = {'type': <class 'float'>}
process(input)[source]