Skip to content

Commit deab391

Browse files
authored
Merge pull request #18 from JuliaAI/dev
For a 0.2.1 release
2 parents b925c00 + f8f2b5b commit deab391

File tree

2 files changed

+35
-11
lines changed

2 files changed

+35
-11
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MLJDecisionTreeInterface"
22
uuid = "c6f25543-311c-4c74-83dc-3ea6d1015661"
33
authors = ["Anthony D. Blaom <[email protected]>"]
4-
version = "0.2.0"
4+
version = "0.2.1"
55

66
[deps]
77
DecisionTree = "7806a523-6efd-50cb-b5f6-3fa6f1930dbb"

src/MLJDecisionTreeInterface.jl

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,20 @@ MMI.metadata_model(
325325

326326
# # DOCUMENT STRINGS
327327

328+
const DOC_CART = "[CART algorithm](https://en.wikipedia.org/wiki/Decision_tree_learning)"*
329+
", originally published in Breiman, Leo; Friedman, J. H.; Olshen, R. A.; "*
330+
"Stone, C. J. (1984): \"Classification and regression trees\". *Monterey, "*
331+
"CA: Wadsworth & Brooks/Cole Advanced Books & Software.*"
332+
333+
const DOC_RANDOM_FOREST = "[Random Forest algorithm]"*
334+
"(https://en.wikipedia.org/wiki/Random_forest), originally published in "*
335+
"Breiman, L. (2001): \"Random Forests.\", *Machine Learning*, vol. 45, pp. 5–32"
336+
328337
"""
329338
$(MMI.doc_header(DecisionTreeClassifier))
330339
340+
`DecisionTreeClassifier` implements the $DOC_CART.
341+
331342
# Training data
332343
333344
In MLJ or MLJBase, bind an instance `model` to data with
@@ -338,10 +349,11 @@ where
338349
339350
- `X`: any table of input features (eg, a `DataFrame`) whose columns
340351
each have one of the following element scitypes: `Continuous`,
341-
`Count`, or `<:OrderedFactor`.
352+
`Count`, or `<:OrderedFactor`; check column scitypes with `schema(X)`
342353
343354
- `y`: is the target, which can be any `AbstractVector` whose element
344-
scitype is `<:OrderedFactor` or `<:Multiclass`.
355+
scitype is `<:OrderedFactor` or `<:Multiclass`; check the scitype
356+
with `scitype(y)`
345357
346358
Train the machine using `fit!(mach, rows=...)`.
347359
@@ -460,6 +472,9 @@ DecisionTreeClassifier
460472
"""
461473
$(MMI.doc_header(RandomForestClassifier))
462474
475+
`RandomForestClassifier` implements the standard $DOC_RANDOM_FOREST.
476+
477+
463478
# Training data
464479
465480
In MLJ or MLJBase, bind an instance `model` to data with
@@ -470,10 +485,11 @@ where
470485
471486
- `X`: any table of input features (eg, a `DataFrame`) whose columns
472487
each have one of the following element scitypes: `Continuous`,
473-
`Count`, or `<:OrderedFactor`.
488+
`Count`, or `<:OrderedFactor`; check column scitypes with `schema(X)`
474489
475490
- `y`: the target, which can be any `AbstractVector` whose element
476-
scitype is `<:OrderedFactor` or `<:Multiclass`.
491+
scitype is `<:OrderedFactor` or `<:Multiclass`; check the scitype
492+
with `scitype(y)`
477493
478494
Train the machine with `fit!(mach, rows=...)`.
479495
@@ -546,6 +562,7 @@ RandomForestClassifier
546562
"""
547563
$(MMI.doc_header(AdaBoostStumpClassifier))
548564
565+
549566
# Training data
550567
551568
In MLJ or MLJBase, bind an instance `model` to data with
@@ -556,10 +573,11 @@ where:
556573
557574
- `X`: any table of input features (eg, a `DataFrame`) whose columns
558575
each have one of the following element scitypes: `Continuous`,
559-
`Count`, or `<:OrderedFactor`.
576+
`Count`, or `<:OrderedFactor`; check column scitypes with `schema(X)`
560577
561578
- `y`: the target, which can be any `AbstractVector` whose element
562-
scitype is `<:OrderedFactor` or `<:Multiclass`.
579+
scitype is `<:OrderedFactor` or `<:Multiclass`; check the scitype
580+
with `scitype(y)`
563581
564582
Train the machine with `fit!(mach, rows=...)`.
565583
@@ -619,6 +637,9 @@ AdaBoostStumpClassifier
619637
"""
620638
$(MMI.doc_header(DecisionTreeRegressor))
621639
640+
`DecisionTreeRegressor` implements the $DOC_CART.
641+
642+
622643
# Training data
623644
624645
In MLJ or MLJBase, bind an instance `model` to data with
@@ -629,10 +650,10 @@ where
629650
630651
- `X`: any table of input features (eg, a `DataFrame`) whose columns
631652
each have one of the following element scitypes: `Continuous`,
632-
`Count`, or `<:OrderedFactor`.
653+
`Count`, or `<:OrderedFactor`; check column scitypes with `schema(X)`
633654
634655
- `y`: the target, which can be any `AbstractVector` whose element
635-
scitype is `Continuous`.
656+
scitype is `Continuous`; check the scitype with `scitype(y)`
636657
637658
Train the machine with `fit!(mach, rows=...)`.
638659
@@ -699,6 +720,9 @@ DecisionTreeRegressor
699720
"""
700721
$(MMI.doc_header(RandomForestRegressor))
701722
723+
`DecisionTreeRegressor` implements the standard $DOC_RANDOM_FOREST
724+
725+
702726
# Training data
703727
704728
In MLJ or MLJBase, bind an instance `model` to data with
@@ -709,10 +733,10 @@ where
709733
710734
- `X`: any table of input features (eg, a `DataFrame`) whose columns
711735
each have one of the following element scitypes: `Continuous`,
712-
`Count`, or `<:OrderedFactor`.
736+
`Count`, or `<:OrderedFactor`; check column scitypes with `schema(X)`
713737
714738
- `y`: the target, which can be any `AbstractVector` whose element
715-
scitype is `Continuous`.
739+
scitype is `Continuous`; check the scitype with `scitype(y)`
716740
717741
Train the machine with `fit!(mach, rows=...)`.
718742

0 commit comments

Comments
 (0)