astra.contrib.thecannon.vectorizer.base

A base vectorizer for The Cannon.

Module Contents

Classes

BaseVectorizer A vectorizer class that models spectral fluxes and its derivatives.
class astra.contrib.thecannon.vectorizer.base.BaseVectorizer(label_names, terms, **kwargs)

A vectorizer class that models spectral fluxes and its derivatives.

terms

Return the terms provided for this vectorizer.

label_names

Return the label names that are used in this vectorizer.

__str__(self)

Return str(self).

__repr__(self)

Return repr(self).

__getstate__(self)

Return the state of the vectorizer.

__setstate__(self, state)

Set the state of the vectorizer.

__call__(self, *args, **kwargs)

An alias to the get_label_vector method.

get_label_vector(self, labels, *args, **kwargs)

Return the label vector based on the labels provided.

Parameters:labels – The values of the labels. These should match the length and order of the label_names attribute.
get_label_vector_derivative(self, labels, *args, **kwargs)

Return the derivative of the label vector with respect to the given label.

Parameters:labels – The values of the labels to calculate the label vector for.