rail.projects.algorithm_holder module
- class rail.projects.algorithm_holder.RailAlgorithmHolder(**kwargs)[source]
Bases:
Configurable,DynamicClassSimple class for holding an algorithm by name.
This has the information needed to create the associated classes, namely the name of the python module in which they live, and the names of the classes themselves.
- Parameters:
kwargs (Any)
-
config_options:
dict[str,StageParameter] = {'Module': Parameter(Name of associated module, type: <class 'str'>, default: None [required]), 'name': Parameter(Algorithm name, type: <class 'str'>, default: None [required])}
- fill_dict(the_dict)[source]
Fill a dict with infomation about the algorithm
- Return type:
None- Parameters:
the_dict (dict[str, dict[str, str]])
- resolve(key)[source]
Get the associated class one of the parts of the algorithm
- Return type:
type- Parameters:
key (str)
-
sub_classes:
dict[str,type[DynamicClass]] = {'RailAlgorithmHolder': <class 'rail.projects.algorithm_holder.RailAlgorithmHolder'>, 'RailClassificationAlgorithmHolder': <class 'rail.projects.algorithm_holder.RailClassificationAlgorithmHolder'>, 'RailErrorModelAlgorithmHolder': <class 'rail.projects.algorithm_holder.RailErrorModelAlgorithmHolder'>, 'RailPZAlgorithmHolder': <class 'rail.projects.algorithm_holder.RailPZAlgorithmHolder'>, 'RailReducerAlgorithmHolder': <class 'rail.projects.algorithm_holder.RailReducerAlgorithmHolder'>, 'RailSpecSelectionAlgorithmHolder': <class 'rail.projects.algorithm_holder.RailSpecSelectionAlgorithmHolder'>, 'RailSubsamplerAlgorithmHolder': <class 'rail.projects.algorithm_holder.RailSubsamplerAlgorithmHolder'>, 'RailSummarizerAlgorithmHolder': <class 'rail.projects.algorithm_holder.RailSummarizerAlgorithmHolder'>} Dictionary of sub_classes
- class rail.projects.algorithm_holder.RailClassificationAlgorithmHolder(**kwargs)[source]
Bases:
RailAlgorithmHolderWrapper for algorithms that assign objects to tomographic bins.
This wraps the Classify class, which is typically a Classifier type RailStage.
A set of Classifier are used as inputs to the tomography-related pipelines, specifying that the set of algorithms to assign objects to tomographic bins.
- Parameters:
kwargs (Any)
-
config_options:
dict[str,StageParameter] = {'Classify': Parameter(Classifier Class, type: <class 'str'>, default: None [required]), 'Module': Parameter(Name of associated module, type: <class 'str'>, default: None [required]), 'name': Parameter(Algorithm name, type: <class 'str'>, default: None [required])}
-
yaml_tag:
str= 'Classifier'
- class rail.projects.algorithm_holder.RailErrorModelAlgorithmHolder(**kwargs)[source]
Bases:
RailAlgorithmHolderWrapper for algorithms that emulate photometric errors.
This wraps the ErrorModel class, which is typically a PhotoErrorModel type RailStage
A set of ErrorModel are used as inputs to the observation emulation pipelines, specifying that the set of algorithms to emulate photometric errors.
- Parameters:
kwargs (Any)
-
config_options:
dict[str,StageParameter] = {'Bands': Parameter(Bands to apply errors to, type: <class 'list'>, default: ['u', 'g', 'r', 'i', 'z', 'y'] [optional]), 'ErrorModel': Parameter(Photometric Error Model Class, type: <class 'str'>, default: None [required]), 'Module': Parameter(Name of associated module, type: <class 'str'>, default: None [required]), 'name': Parameter(Algorithm name, type: <class 'str'>, default: None [required])}
-
yaml_tag:
str= 'ErrorModel'
- class rail.projects.algorithm_holder.RailPZAlgorithmHolder(**kwargs)[source]
Bases:
RailAlgorithmHolderWrapper for algorithms that estimate per-object p(z).
This wraps both the Inform and Estimate classes.
The Inform class will typically be a CatInformer type RailStage, used to train the model for p(z) estimation.
The Estimate class will typically be a CatEstimator type RailStage, which uses the trained model for p(z) estimation.
A set of PZAlgorithm are used as inputs to several of the pipelines, specifying that the set of algorithms to run the pipeline with.
- Parameters:
kwargs (Any)
-
config_options:
dict[str,StageParameter] = {'Estimate': Parameter(Estimator Class, type: <class 'str'>, default: None [required]), 'Inform': Parameter(Informer Class, type: <class 'str'>, default: None [required]), 'Module': Parameter(Name of associated module, type: <class 'str'>, default: None [required]), 'name': Parameter(Algorithm name, type: <class 'str'>, default: None [required])}
-
yaml_tag:
str= 'PZAlgorithm'
- class rail.projects.algorithm_holder.RailReducerAlgorithmHolder(**kwargs)[source]
Bases:
RailAlgorithmHolderWrapper for algorithms that reduce data sets by applying selections and removing unneed columns.
This wraps the Reduce class, which is typically a RailReducer object.
Typically a single Reducer is used to prepare data for a particular project, possible apply a few different selections along the way.
- Parameters:
kwargs (Any)
-
config_options:
dict[str,StageParameter] = {'Module': Parameter(Name of associated module, type: <class 'str'>, default: None [required]), 'Reduce': Parameter(Data Reducer Class, type: <class 'str'>, default: None [required]), 'name': Parameter(Algorithm name, type: <class 'str'>, default: None [required])}
- resolve(key)[source]
Get the associated class one of the parts of the algorithm
- Return type:
type- Parameters:
key (str)
-
yaml_tag:
str= 'Reducer'
- class rail.projects.algorithm_holder.RailSpecSelectionAlgorithmHolder(**kwargs)[source]
Bases:
RailAlgorithmHolderWrapper for algorithms that emulate spectrosopic selections.
This wraps the SpecSelection class, which is typically a SpecSelector type RailStage.
A set of SpecSelection are used as inputs to the observation emulation pipelines, specifying that the set of algorithms to emulate spectrosopic selections.
- Parameters:
kwargs (Any)
-
config_options:
dict[str,StageParameter] = {'Module': Parameter(Name of associated module, type: <class 'str'>, default: None [required]), 'Select': Parameter(Selector Class, type: <class 'str'>, default: None [required]), 'name': Parameter(Algorithm name, type: <class 'str'>, default: None [required])}
-
yaml_tag:
str= 'SpecSelection'
- class rail.projects.algorithm_holder.RailSubsamplerAlgorithmHolder(**kwargs)[source]
Bases:
RailAlgorithmHolderWrapper for algorithms that sumsample catalogs to provide testing and training data sets.
This wraps the Subsample class, which is typically a RailSubsampler object.
Typically a single Subsample is used to create a number of different test and training data sets for a particular project.
- Parameters:
kwargs (Any)
-
config_options:
dict[str,StageParameter] = {'Module': Parameter(Name of associated module, type: <class 'str'>, default: None [required]), 'Subsample': Parameter(Data Subsampler Class, type: <class 'str'>, default: None [required]), 'name': Parameter(Algorithm name, type: <class 'str'>, default: None [required])}
- resolve(key)[source]
Get the associated class one of the parts of the algorithm
- Return type:
type- Parameters:
key (str)
-
yaml_tag:
str= 'Subsampler'
- class rail.projects.algorithm_holder.RailSummarizerAlgorithmHolder(**kwargs)[source]
Bases:
RailAlgorithmHolderWrapper for algorithms that make ensemble n(z) from a set of p(z).
This wraps the Summarize class, which is typically a PZToNZSummarizer type RailStage.
A set of Summarizer are used as inputs to the tomography-related pipelines, specifying that the set of algorithms to obtain n(z) information.
- Parameters:
kwargs (Any)
-
config_options:
dict[str,StageParameter] = {'Module': Parameter(Name of associated module, type: <class 'str'>, default: None [required]), 'Summarize': Parameter(Summarizer Class, type: <class 'str'>, default: None [required]), 'name': Parameter(Algorithm name, type: <class 'str'>, default: None [required])}
-
yaml_tag:
str= 'Summarizer'