LSSTDESC / rail_sklearn

RAIL algorithms that depend on scikit-learn.
MIT License
1 stars 0 forks source link

Use the `calculated_point_estimates` config parameter in `KNearNeighEstimator` and `SklNeurNetEstimator` #8

Open drewoldag opened 1 year ago

drewoldag commented 1 year ago

A new config parameter, calculated_point_estimates was introduced in rail_base PR #29. This parameter defines which point estimates to compute automatically during the estimation stage.

The implementation will likely look similar to what was done for RAIL_flexzboost in PR #34

The following is a rough gist:

ancil_dictionary = dict()

calculated_point_estimates = []
if ‘calculated_point_estimates’ in self.config:
    calculated_point_estimates = self.config.calculated_point_estimates

if ‘mode’ in calculated_point_estimates:
    ancil_dictionary.update(mode = <mode calculation>)

if ‘mean’ in calculated_point_estimates:
    ancil_dictionary.update(mean = <mean calculation>)

if ‘median’ in calculated_point_estimates:
    ancil_dictionary.update(median = <median calculation>)

if calculated_point_estimates:
    qp_dstn.set_ancil(ancil_dictionary)