Skip to content

Commit

Permalink
bug fix for ANNZ::doMetricPlots()
Browse files Browse the repository at this point in the history
  • Loading branch information
IftachSadeh committed Nov 20, 2016
1 parent 72f2c31 commit 9e31ea2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
## Master version (20/11/2016)

- Added the option to to *not* store the full value of pdfs in the output of optimization/evaluation, by setting
```python
glob.annz["doStorePdfBins"] = False
```
```python
glob.annz["doStorePdfBins"] = False
```
In this case, only the average metrics of a pdf are included in the output.

- Added the `sampleFrac_errKNN` option, to allow to sub-sample the input dataset for the knn uncertainty calculation (similar to e.g., `sampleFracInp_wgtKNN` and `sampleFracInp_inTrain`).

- Added metric plots of the distribution of the KNN error estimator vs. the true bias. The plots are added to the output by setting
```python
glob.annz["doKnnErrPlots"] = True
```
```python
glob.annz["doKnnErrPlots"] = True
```

- Added support for input ROOT files with different Tree names.

Expand Down
7 changes: 5 additions & 2 deletions src/ANNZ_loopReg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3452,8 +3452,11 @@ void ANNZ::doMetricPlots(TChain * aChain, vector <TString> * addPlotVarV, TStri
if(doKnnErrPlots) {
TString cutStr("_comn"), hisTmpName("his1_TMP");

TString treeCuts = (TString)getTrainTestCuts(cutStr,0,0,0,var);
TString drawExprs = (TString)regBestNameVal+"-"+zTrgName+">>"+hisTmpName;
int nMLMnow = max(0, glob->GetOptI("nMLMnow"));
TString MLMname = (TString)( (nTagBestMLM == 0) ? getTagName(nMLMnow) : regBestNameVal);

TString treeCuts = (TString)getTrainTestCuts(cutStr,nMLMnow,0,0,var);
TString drawExprs = (TString)MLMname+"-"+zTrgName+">>"+hisTmpName;
TCanvas * tmpCnvs = new TCanvas("tmpCnvs","tmpCnvs");
int nEvtPass = aChain->Draw(drawExprs,treeCuts); DELNULL(tmpCnvs);

Expand Down

0 comments on commit 9e31ea2

Please sign in to comment.