From 872c43e658a2029d868b7d92f3b6c84e0827e275 Mon Sep 17 00:00:00 2001 From: Yi-Xuan Xu Date: Wed, 28 Apr 2021 14:03:56 +0800 Subject: [PATCH] fix(doc): add docstrings for bin_type (#74) * Update cascade.py * Update CHANGELOG.rst --- CHANGELOG.rst | 1 + deepforest/cascade.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7057351..86b3b39 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -30,6 +30,7 @@ Version 0.1.* .. |Fix| replace:: :raw-html:`Fix` :raw-latex:`{\small\sc [Fix]}` .. |API| replace:: :raw-html:`API Change` :raw-latex:`{\small\sc [API Change]}` +- |Fix| |API| add docstrings for parameter ``bin_type`` (`#74 `__) @xuyxu - |Feature| |API| recover the parameter ``min_samples_split`` (`#73 `__) @xuyxu - |Fix| fix the breakdown under the corner case where no internal node exists (`#70 `__) @xuyxu - |Feature| support python 3.9 (`#69 `__) @xuyxu diff --git a/deepforest/cascade.py b/deepforest/cascade.py index 61457cf..480f13d 100644 --- a/deepforest/cascade.py +++ b/deepforest/cascade.py @@ -213,6 +213,12 @@ def _build_regressor_predictor( The number of samples used to construct feature discrete bins. If the size of training set is smaller than ``bin_subsample``, then all training samples will be used. + bin_type : :obj:`{"percentile", "interval"}`, default= :obj:`"percentile"` + The type of binner used to bin feature values into integer-valued bins. + + - If ``"percentile"``, each bin will have approximately the same + number of distinct feature values. + - If ``"interval"``, each bin will have approximately the same size. max_layers : :obj:`int`, default=20 The maximum number of cascade layers in the deep forest. Notice that the actual number of layers can be smaller than ``max_layers`` because @@ -329,6 +335,12 @@ def _build_regressor_predictor( The number of samples used to construct feature discrete bins. If the size of training set is smaller than ``bin_subsample``, then all training samples will be used. + bin_type : :obj:`{"percentile", "interval"}`, default= :obj:`"percentile"` + The type of binner used to bin feature values into integer-valued bins. + + - If ``"percentile"``, each bin will have approximately the same + number of distinct feature values. + - If ``"interval"``, each bin will have approximately the same size. max_layers : :obj:`int`, default=20 The maximum number of cascade layers in the deep forest. Notice that the actual number of layers can be smaller than ``max_layers`` because