rail.estimation.algos.random_gauss module
Example code that just spits out random numbers between 0 and 3 for z_mode, and Gaussian centered at z_mode with width random_width*(1+zmode).
- class rail.estimation.algos.random_gauss.RandomGaussEstimator
Bases:
CatEstimatorRandom CatEstimator
- Parameters:
output_mode ([str] default=default) – What to do with the outputs. The options are ‘default’, where outputs will be written to files and some returned, and ‘return’, where outputs will only be returned and not written.
chunk_size ([int] default=10000) – Number of objects per chunk for parallel processing or to evalute per loop in single node processing
hdf5_groupname ([str] default=photometry) – name of hdf5 group for data, if None, then set to ‘’
zmin ([float] default=0.0) – The minimum redshift of the z grid or sample
zmax ([float] default=3.0) – The maximum redshift of the z grid or sample
nzbins ([int] default=301) – The number of gridpoints in the z grid
id_col ([str] default=object_id) – name of the object ID column
redshift_col ([str] default=redshift) – name of redshift column
calc_summary_stats ([bool] default=False) – Compute summary statistics
calculated_point_estimates ([list] default=[]) – List of strings defining which point estimates to automatically calculate using qp.Ensemble.Options include, ‘mean’, ‘mode’, ‘median’.
recompute_point_estimates ([bool] default=False) – Force recomputation of point estimates
rand_width ([float] default=0.025) – ad hock width of PDF
seed ([int] default=87) – random seed
column_name ([str] default=mag_i_lsst) – name of a column that has the correct number of galaxies to find length of
input (TableHandle (INPUT))
model (ModelHandle (INPUT))
output (QPHandle (OUTPUT))
- __init__(args, **kwargs)
Constructor: Do CatEstimator specific initialization
- Parameters:
args (Any)
kwargs (Any)
- Return type:
None
- entrypoint_function: str | None = 'estimate'
- inputs = [('input', <class 'rail.core.data.TableHandle'>), ('model', <class 'rail.core.data.ModelHandle'>)]
- interactive_function: str | None = 'random_gauss_estimator'
- name = 'RandomGaussEstimator'
- validate()
Validation which checks if the required column names by the stage exist in the data
- Return type:
None
- class rail.estimation.algos.random_gauss.RandomGaussInformer
Bases:
CatInformerPlaceholder Informer
- Parameters:
output_mode ([str] default=default) – What to do with the outputs. The options are ‘default’, where outputs will be written to files and some returned, and ‘return’, where outputs will only be returned and not written.
hdf5_groupname ([str] default=photometry) – name of hdf5 group for data, if None, then set to ‘’
input (TableHandle (INPUT))
model (ModelHandle (OUTPUT))
- entrypoint_function: str | None = 'inform'
- interactive_function: str | None = 'random_gauss_informer'
- name = 'RandomGaussInformer'
- run()
Run the stage and return the execution status.
Subclasses must implemented this method.
- Return type:
None