Skip to content

Commit

Permalink
Implements fit and predict methods for bagging (mars-project#2516)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjsi committed Oct 19, 2021
1 parent a5e4044 commit 3c67be0
Show file tree
Hide file tree
Showing 6 changed files with 1,063 additions and 12 deletions.
2 changes: 2 additions & 0 deletions docs/source/reference/learn/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ Ensemble Methods
.. autosummary::
:toctree: generated/

ensemble.BaggingClassifier
ensemble.BaggingRegressor
ensemble.BlockwiseVotingClassifier
ensemble.BlockwiseVotingRegressor

Expand Down
6 changes: 3 additions & 3 deletions mars/core/operand/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def _create_tileable(self,

def _new_tileables(self,
inputs: List[TileableType],
kws: dict = None,
kws: List[dict] = None,
**kw) -> List[TileableType]:
output_limit = kw.pop('output_limit', None)
if output_limit is None:
Expand Down Expand Up @@ -227,7 +227,7 @@ def _new_tileables(self,

def new_tileables(self,
inputs: List[TileableType],
kws=None,
kws: List[dict] = None,
**kw) -> List[TileableType]:
"""
Create tileable objects(Tensors or DataFrames).
Expand All @@ -240,7 +240,7 @@ def new_tileables(self,
----------
inputs : list
Input tileables
kws : dict
kws : List[dict]
Kwargs for each output.
kw : dict
Common kwargs for all outputs.
Expand Down
2 changes: 1 addition & 1 deletion mars/learn/ensemble/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from ._bagging import BaggingSample, BaggingSampleReindex
from ._bagging import BaggingClassifier, BaggingRegressor
from ._blockwise import BlockwiseVotingClassifier, BlockwiseVotingRegressor
Loading

0 comments on commit 3c67be0

Please sign in to comment.