You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contributions are welcome, encouraged, and appreciated!
4
+
5
+
If you encounter any bugs while using the project, or believe there's a feature that would prove useful, feel free to [submit a new issue](https://github.com/zillow/quantile-forest/issues/new/choose).
6
+
7
+
All contributions, suggestions, and feedback you submitted are accepted under the [project's license](https://github.com/zillow/quantile-forest/blob/main/LICENSE).
8
+
9
+
## Submitting an Issue
10
+
11
+
[Issues](https://github.com/zillow/quantile-forest/issues) should be used to report problems with the package or any of its dependencies, request a new feature, or to discuss potential changes before a PR is created.
12
+
13
+
When reporting bugs, please provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example), the version of the package, and the environment (e.g., Python version).
14
+
15
+
If you find an existing Issue that addresses the problem you're having, please add your own reproducible example to the existing issue rather than creating a new one.
16
+
17
+
## Submitting a Pull Request
18
+
19
+
[PRs](https://github.com/zillow/quantile-forest/pulls) are always welcome and can be a quick way to get your fix or improvement merged. In general, PRs should:
20
+
21
+
- Only fix/add the functionality in question.
22
+
- Address a single concern in the fewest number of changes possible.
23
+
- Include updated documentation.
24
+
25
+
For changes that address core functionality or would require breaking changes (e.g., a major release), it's generally best to first open an Issue to discuss your proposed changes.
26
+
27
+
In general, we follow the ["fork-and-pull" Git workflow](https://gist.github.com/Chaser324/ce0505fbed06b947d962)
28
+
29
+
-[Fork](https://github.com/zillow/quantile-forest/fork) the repository to your own GitHub account
30
+
- Clone the project to your machine
31
+
- Create a branch locally with a succinct but descriptive name
32
+
- Commit changes to the branch
33
+
- Following any formatting and testing guidelines specific to this repo
34
+
- Push changes to your fork
35
+
- Open a PR in our repository
36
+
37
+
## Setting Up Your Environment
38
+
39
+
To contribute to the `quantile-forest` source code, start by forking and then cloning the repository (i.e. `git clone [email protected]:YourUsername/quantile-forest.git`)
40
+
41
+
Once inside the repository, to build and install the package, run:
42
+
43
+
```cmd
44
+
python setup.py build_ext --inplace
45
+
python setup.py install
46
+
```
47
+
48
+
## Testing Your Changes
49
+
50
+
To execute unit tests from the `quantile-forest` repository, run:
51
+
52
+
```cmd
53
+
pytest quantile_forest -v
54
+
```
55
+
56
+
## Troubleshooting
57
+
58
+
If the build fails because SciPy is not installed, ensure OpenBLAS and LAPACK are available and accessible.
Copy file name to clipboardexpand all lines: docs/user_guide.rst
+2-6
Original file line number
Diff line number
Diff line change
@@ -22,15 +22,15 @@ Quantile Regression Forests
22
22
23
23
A standard decision tree can be extended in a straightforward way to estimate conditional quantiles. When a decision tree is fit, rather than storing only the sufficient statistics of the response variable at the leaf node, such as the mean and variance, all of the response values can be stored with the leaf node. At prediction time, these values can then be used to calculate empirical quantile estimates.
24
24
25
-
The quantile-based approach can be extended to random forests. To estimate :math:`F(Y=y|x) = q`, each response value in `y_train` is given a weight or frequency. Formally, the weight or frequency given to the :math:`j`\th sample of `y_train`, :math:`y_j`, while estimating the quantile is
25
+
The quantile-based approach can be extended to random forests. To estimate :math:`F(Y=y|x) = q`, each response value in the training set is given a weight or frequency. Formally, the weight or frequency given to the :math:`j`\th training sample, :math:`y_j`, while estimating the quantile is
where :math:`L(x)` denotes the leaf that :math:`x` falls into.
32
32
33
-
Informally, this means that given a new unknown sample, we first find the leaf that it falls into at each tree. Then for each `(X, y)` pair in the training data, a weight or frequency is given to `y` for each tree based on the number of times each training sample falls into the same leaf as the new sample. This information can then be used to calculate the empirical quantile estimates.
33
+
Informally, this means that given a new unknown sample, we first find the leaf that it falls into for each tree in the ensemble. Each training sample :math:`y_j` that falls into the same leaf as the new sample is given a weight that equals the fraction of samples in the leaf. Each :math:`y_j` that does not fall into the same leaf as the new sample is given a weight or frequency of zero. The weights or frequencies for each :math:`y_j` are then summed or aggregated across all of the trees in the ensemble. This information can then be used to calculate the empirical quantile estimates.
34
34
35
35
This approach was first proposed by :cite:t:`2006:meinshausen`.
36
36
@@ -163,7 +163,3 @@ The maximum number of proximity counts output per test sample can be limited by
163
163
Out-of-bag (OOB) proximity counts can be returned by specifying `oob_score = True`::
0 commit comments