Skip to content

Commit

Permalink
Changed generation PDF in randomized regression
Browse files Browse the repository at this point in the history
In ANNZ::getRndMethodBestPDF(), the PDF was constructed by selecting
the MLMs with the best performance in terms of scatter and outlier
fractions. This has been changed to take into account the combination
of scatter and bias instead.

Also added the user-parameters: “max_sigma68_PDF”, “max_bias_PDF” and
“max_frac68_PDF”. These allow the user to define the maximal value of
the scatter, bias and combined outlier-fraction metrics of MLMs which
are included in PDFs in randomized regression.
  • Loading branch information
IftachSadeh committed Feb 5, 2015
1 parent 2008c26 commit 94c52d8
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 65 deletions.
10 changes: 10 additions & 0 deletions examples/scripts/annz_rndReg_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,16 @@
# -----------------------------------------------------------------------------------------------------------
glob.annz["addOutputVars"] = "MAG_U;MAGERR_I"

# -----------------------------------------------------------------------------------------------------------
# max_sigma68_PDF, max_bias_PDF, max_frac68_PDF
# - if max_sigma68_PDF,max_bias_PDF are positive, they put thresholds on the maximal value of
# the scatter (max_sigma68_PDF), bias (max_bias_PDF) or outlier-fraction (max_frac68_PDF) of an
# MLM which may be included in the PDF created in randomized regression
# -----------------------------------------------------------------------------------------------------------
glob.annz["max_sigma68_PDF"] = 0.044
glob.annz["max_bias_PDF"] = 0.01
glob.annz["max_frac68_PDF"] = 0.08


# --------------------------------------------------------------------------------------------------
# optimization
Expand Down
3 changes: 0 additions & 3 deletions examples/scripts/generalSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ def generalSettings():
# the metric which is more significant in deciding which MLM performs "best".
# glob.annz["optimCondReg"] = "bias"

# option to only generate randomized PDFs based on the scatter metric, not considering outlier fractions
# glob.annz["doNotUseOutFracPdfWeights"] = True

# number of random MLM weighting schemes to generate as part of getRndMethodBestPDF()
# glob.annz["nRndPdfWeightTries"] = 50

Expand Down
2 changes: 1 addition & 1 deletion include/ANNZ.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class ANNZ : public BaseClass {
void getBestANNZ(map < int,vector<int> > & zRegQnt_nANNZ, map < int,vector<double> > & zRegQnt_bias,
map < int,vector<double> > & zRegQnt_sigma68, map < int,vector<double> > & zRegQnt_fracSig68,
vector < int > & bestMLMsV, bool onlyInclusiveBin = true);
void getRndMethodBestPDF(TTree * aChain, int bestANNZindex, vector<int> & zRegQnt_nANNZ,
void getRndMethodBestPDF(TTree * aChain, int bestANNZindex, vector<int> & zRegQnt_nANNZ, vector<double> & zRegQnt_bias,
vector<double> & zRegQnt_sigma68, vector<double> & zRegQnt_fracSig68, vector < vector<double> > & bestWeightsV);
void doEvalReg(TChain * inChain = NULL, TString outDirName = "", vector <TString> * selctVarV = NULL);
void doMetricPlots(TChain * inChain = NULL, vector <TString> * selctMLMv = NULL);
Expand Down
Loading

0 comments on commit 94c52d8

Please sign in to comment.