astra.contrib.thecannon.tasks.train¶
Module Contents¶
Classes¶
TrainTheCannonBase |
A base task for training The Cannon. |
TrainingSetTarget |
A training set target. |
TrainTheCannonGivenTrainingSetTarget |
A task to train The Cannon, given some file that contains high-quality labels, |
TrainTheCannonGivenTrainingSetTask |
A general task to train The Cannon, given some task that would create the training set. |
-
class
astra.contrib.thecannon.tasks.train.TrainTheCannonBase¶ A base task for training The Cannon.
Parameters: - label_names – A list of label names.
- order – (optional) The polynomial order to use for this model (default: 2).
- regularization – (optional) The strength of L1-regularization to apply during training.
- threads – (optional) The number of threads to use (default: 1).
- plot – (optional) A boolean flag to indicate whether to produce post-training quality plots.
-
regularization¶
-
threads¶
-
plot¶
-
task_namespace= TheCannon¶
-
label_names¶
-
order¶
-
run(self)¶ Execute this task.
-
output(self)¶ The output of this task.
-
class
astra.contrib.thecannon.tasks.train.TrainingSetTarget¶ A training set target.
Parameters: training_set_path – The path to a
picklefile that contains a dictionary with the following keys:wavelength: an array of shape(P, )wherePis the number of pixelsflux: an array of flux values with shape(N, P)whereNis the number of observed spectra andPis the number of pixelsivar: an array of inverse variance values with shape(N, P)whereNis the number of observed spectra andPis the number of pixelslabels: an array of shape(L, N)whereLis the number of labels andNis the number observed spectralabel_names: a tuple of lengthLthat describes the names of the labels
-
training_set_path¶
-
output(self)¶
-
class
astra.contrib.thecannon.tasks.train.TrainTheCannonGivenTrainingSetTarget¶ A task to train The Cannon, given some file that contains high-quality labels, and pseudo-continuum-normalised fluxes and inverse variances.
Parameters: - training_set_path –
The path to a
picklefile that contains a dictionary with the following keys:wavelength: an array of shape(P, )wherePis the number of pixelsflux: an array of flux values with shape(N, P)whereNis the number of observed spectra andPis the number of pixelsivar: an array of inverse variance values with shape(N, P)whereNis the number of observed spectra andPis the number of pixelslabels: an array of shape(L, N)whereLis the number of labels andNis the number observed spectralabel_names: a tuple of lengthLthat describes the names of the labels
- regularization – (optional) The L1 regularization strength to use during training (default: 0.0).
- threads – (optional) The number of threads to use during training (default: 1).
- plot – (optional) Produce quality assurance figures after training (default: True).
-
training_set_path¶
-
regularization¶
-
threads¶
-
plot¶
-
task_namespace= TheCannon¶
-
label_names¶
-
order¶
-
requires(self)¶ Requirements of this task.
-
run(self)¶ Execute this task.
-
output(self)¶ The output of this task.
- training_set_path –
-
class
astra.contrib.thecannon.tasks.train.TrainTheCannonGivenTrainingSetTask¶ A general task to train The Cannon, given some task that would create the training set.
-
create_training_set_task¶
-
regularization¶
-
threads¶
-
plot¶
-
task_namespace= TheCannon¶
-
label_names¶
-
order¶
-
requires(self)¶ The requirements of this task.
-
run(self)¶ Execute this task.
-
output(self)¶ The output of this task.
-