Skip to content

Commit

Permalink
various fix, estimparam release
Browse files Browse the repository at this point in the history
  • Loading branch information
fradav committed May 7, 2019
1 parent 40bc81a commit dea9333
Show file tree
Hide file tree
Showing 7 changed files with 341 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ script:
- cd vcpkg
- CC=clang-7 && CXX=clang++-7 ./bootstrap-vcpkg.sh -useSystemBinaries -disableMetrics
- ./vcpkg integrate install
- ./vcpkg install range-v3 catch2 hdf5[cpp] highfive cxxopts
- ./vcpkg install range-v3 catch2 hdf5[cpp] highfive cxxopts fmt boost-accumulators
- ./vcpkg install eigen3 --head
- cd ..
- mkdir build
Expand Down
59 changes: 52 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ Libraries we use :
- [Ranger : A Fast Implementation of Random Forests](https://github.com/imbs-hl/ranger) [@wright2015ranger], there tuned to make "online" calculations (not storing the whole forests in memory)
- [Eigen : C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.](http://eigen.tuxfamily.org)

# Usage
```
## Model Choice

```text
- ABC Random Forest/Model choice command line options
Usage:
ModelChoice [OPTION...]
-h, --header arg Header file (default: headerRF.txt)
-r, --reftable arg Reftable file (default: reftableRF.bin)
-b, --statobs arg Statobs file (default: statobsRF.txt)
-o, --output arg Prefix output (default: onlineranger_out)
-o, --output arg Prefix output (default: modelchoice_out)
-n, --nref arg Number of samples, 0 means all (default: 0)
-m, --minnodesize arg Minimal node size. 0 means 1 for classification or
5 for regression (default: 0)
Expand All @@ -34,8 +35,52 @@ Usage:
```

Header, reftable and statobs files should be in the current directory.
Three files are created :
- `onlineranger_out.ooberror` : OOB Error rate vs number of trees (line number is the number of trees)
- `onlineranger_out.confusion` : OOB Confusion matrix of the classifier
- `onlineranger_out.importance` : variables importance (sorted)

Three files are created :


- `modelchoice_out.ooberror` : OOB Error rate vs number of trees (line number is the number of trees)
- `modelchoice_out.importance` : variables importance (sorted)
- `modelchoice_out.predictions` : votes, prediction and posterior error rate
- `modelchoice_out.confusion` : OOB Confusion matrix of the classifier

## Parameter Estimation

```text
- ABC Random Forest/Model parameter estimation command line options
Usage:
..\..\build\EstimParam.exe [OPTION...]
-h, --header arg Header file (default: headerRF.txt)
-r, --reftable arg Reftable file (default: reftableRF.bin)
-b, --statobs arg Statobs file (default: statobsRF.txt)
-o, --output arg Prefix output (default: estimparam_out)
-n, --nref arg Number of samples, 0 means all (default: 0)
-m, --minnodesize arg Minimal node size. 0 means 1 for classification or
5 for regression (default: 0)
-t, --ntree arg Number of trees (default: 500)
-j, --threads arg Number of threads, 0 means all (default: 0)
-s, --seed arg Seed, 0 means generated (default: 0)
-c, --noisecolumns arg Number of noise columns (default: 5)
-p, --pls Enable PLS (default: true)
--chosenscen arg Chosen scenario (mandatory)
--ntrain arg number of training samples (mandatory)
--ntest arg number of testing samples (mandatory)
--parameter arg name of the parameter of interest (mandatory)
--help Print help
```

Header, reftable and statobs files should be in the current directory.

Five files (or seven if pls activated) are created :

- `estimparam_out.ooberror` : OOB MSE rate vs number of trees (line number is the number of trees)
- `estimparam_out.importance` : variables importance (sorted)
- `estimparam_out.predictions` : expectation, variance and 0.05, 0.5, 0.95 quantile for prediction
- `estimparam_out.predweights` : weights of the prediction (for density plot)
- `estimparam_out.teststats` : various statistics on test (MSE, NMSE, NMAE etc.)

if pls enabled :

- `estimparam_out.plsvar` : variance explained by number of components
- `estimparam_out.plsweights` : variable weight in the first component (sorted by absolute value)
Loading

0 comments on commit dea9333

Please sign in to comment.