Skip to content

Commit

Permalink
Update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
reidjohnson committed Feb 22, 2024
1 parent 721165f commit c9834f7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
23 changes: 12 additions & 11 deletions quantile_forest/_quantile_forest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
Quantile regression forest of trees-based ensemble methods.
"""Quantile regression forest of trees-based ensemble methods.
The module structure is the following:
Expand Down Expand Up @@ -859,11 +858,12 @@ class RandomForestQuantileRegressor(BaseForestQuantileRegressor):
"""A random forest regressor that provides quantile estimates.
A quantile random forest is a meta estimator that fits a number of
decision trees on various sub-samples of the dataset and uses averaging
to improve the predictive accuracy and control over-fitting. The
sub-sample size is controlled with the `max_samples` parameter if
`bootstrap=True` (default), otherwise the whole dataset is used to build
each tree.
decision trees on various sub-samples of the dataset, keeps the values of
samples that reach each node, and assesses the conditional distribution
based on this information. The sub-sample size is controlled with the
`max_samples` parameter if `bootstrap=True` (default), otherwise the whole
dataset is used to build each tree. The leaf-sample size is controlled
with the `max_samples_leaf` parameter.
Parameters
----------
Expand Down Expand Up @@ -1146,10 +1146,11 @@ def _more_tags(self):
class ExtraTreesQuantileRegressor(BaseForestQuantileRegressor):
"""An extra-trees regressor that provides quantile estimates.
This class implements a meta estimator that fits a number of randomized
decision trees (a.k.a. extra-trees) on various sub-samples of the dataset
and use averaging to improve the predictive accuracy and control
over-fitting.
A quantile extra trees regressor is a meta estimator that fits a number of
randomized decision trees (a.k.a. extra-trees) on various sub-samples of
the dataset, keeps the values of samples that reach each node, and
assesses the conditional distribution based on this information. The
leaf-sample size is controlled with the `max_samples_leaf` parameter.
Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions quantile_forest/_quantile_forest_fast.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ ctypedef double float64_t
cdef class QuantileForest:
# The QuantileForest object.

# Input/Output layout
# Input/Output layout.
cdef public vector[vector[float64_t]] y_train
cdef public intp_t[:, :, :, :] y_train_leaves
cdef public bint sparse_pickle

# Methods
# Methods.
cpdef cnp.ndarray predict(
self,
vector[double] quantiles,
Expand Down
4 changes: 1 addition & 3 deletions quantile_forest/tests/test_quantile_forest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Testing for the quantile forest module (quantile_forest._quantile_forest).
"""
"""Testing for the quantile forest module (quantile_forest._quantile_forest)."""

import math
import pickle
Expand Down
2 changes: 1 addition & 1 deletion quantile_forest/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.dev
1.3.dev0

0 comments on commit c9834f7

Please sign in to comment.