Skip to content

Commit 063eaa5

Browse files
ablaomtylerjthomas9
andauthored
Fix package name in MLJ interface - take II (#24)
* `beacon-biosignals` -> `JuliaAI` * `CatBoostRegressor` and `CatBoostClassifier` docs * fix codecov image link * Fix formatting * add temp fix for CatBoostClassifier tests * fix package_name trait for MLJ interface --------- Co-authored-by: tylerjthomas9 <[email protected]>
1 parent bde0968 commit 063eaa5

File tree

6 files changed

+48
-17
lines changed

6 files changed

+48
-17
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# CatBoost.jl
22

3-
[![Build Status][build-img]][build-url] [![CodeCov][codecov-img]][codecov-url] [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://beacon-biosignals.github.io/CatBoost.jl/dev)
3+
[![Build Status][build-img]][build-url] [![CodeCov][codecov-img]][codecov-url] [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaAI.github.io/CatBoost.jl/dev)
44

5-
[build-img]: https://github.com/beacon-biosignals/CatBoost.jl/workflows/CI/badge.svg
6-
[build-url]: https://github.com/beacon-biosignals/CatBoost.jl/actions
7-
[codecov-img]: https://codecov.io/gh/beacon-biosignals/CatBoost.jl/branch/main/graph/badge.svg?token=e4RFBNkB9a
8-
[codecov-url]: https://codecov.io/github/beacon-biosignals/CatBoost.jl
5+
[build-img]: https://github.com/JuliaAI/CatBoost.jl/workflows/CI/badge.svg
6+
[build-url]: https://github.com/JuliaAI/CatBoost.jl/actions
7+
[codecov-img]: https://codecov.io/gh/JuliaAI/CatBoost.jl/branch/main/graph/badge.svg
8+
[codecov-url]: https://codecov.io/github/JuliaAI/CatBoost.jl
99

1010

1111
Julia interface to [CatBoost](https://catboost.ai/).

docs/make.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ makedocs(; modules=[CatBoost], sitename="CatBoost.jl", authors="Beacon Biosignal
55
pages=["Introduction" => "index.md", "Wrapper" => "wrapper.md",
66
"MLJ API" => "mlj_api.md"])
77

8-
deploydocs(; repo="github.com/beacon-biosignals/CatBoost.jl.git", push_preview=true,
9-
devbranch="main")
8+
deploydocs(; repo="github.com/JuliaAI/CatBoost.jl.git", push_preview=true, devbranch="main")

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Julia interface to [CatBoost](https://catboost.ai/). This library is a wrapper CatBoost's Python package via [PythonCall.jl](https://github.com/cjdoris/PythonCall.jl).
44

5-
For a nice introduction to the package, see the [examples](https://github.com/beacon-biosignals/CatBoost.jl/blob/main/examples/).
5+
For a nice introduction to the package, see the [examples](https://github.com/JuliaAI/CatBoost.jl/blob/main/examples/).
66

77
# Installation
88

src/CatBoost.jl

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ function __init__()
3939
cv
4040

4141
@doc """
42-
Pool(data; label=nothing, cat_features=nothing, text_features=nothing,
43-
pairs=nothing, delimiter='\t', has_header=false, weight=nothing,
44-
group_id = nothing, group_weight=nothing, subgroup_id=nothing,
45-
pairs_weight=nothing, baseline=nothing, features_names=nothing,
46-
thread_count = -1) -> Py
42+
Pool(data; label=nothing, cat_features=nothing, text_features=nothing,
43+
pairs=nothing, delimiter='\t', has_header=false, weight=nothing,
44+
group_id = nothing, group_weight=nothing, subgroup_id=nothing,
45+
pairs_weight=nothing, baseline=nothing, features_names=nothing,
46+
thread_count = -1) -> Py
4747
4848
Creates a `Pool` object holding training data and labels. `data` may also be passed
4949
as a keyword argument.
@@ -56,6 +56,32 @@ function __init__()
5656
"""
5757
Pool
5858

59+
@doc """
60+
CatBoostClassifier(args...; kwargs...) -> Py
61+
62+
Creates a `CatBoostClassifier` object.
63+
64+
---
65+
66+
## Python documentation for `catboost.CatBoostClassifier`
67+
68+
$(@doc catboost.CatBoostClassifier)
69+
"""
70+
CatBoostClassifier
71+
72+
@doc """
73+
CatBoostRegressor(args...; kwargs...) -> Py
74+
75+
Creates a `CatBoostRegressor` object.
76+
77+
---
78+
79+
## Python documentation for `catboost.CatBoostRegressor`
80+
81+
$(@doc catboost.CatBoostRegressor)
82+
"""
83+
CatBoostRegressor
84+
5985
return nothing
6086
end
6187

src/MLJCatBoostInterface.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ function MMI.feature_importances(m::CatBoostModels, fitresult, report)
167167
return feature_importance(fitresult)
168168
end
169169

170-
MMI.metadata_pkg.((CatBoostClassifier, CatBoostRegressor), name="CatBoost.jl",
170+
MMI.metadata_pkg.((CatBoostClassifier, CatBoostRegressor), name="CatBoost",
171171
package_uuid="e2e10f9a-a85d-4fa9-b6b2-639a32100a12",
172-
package_url="https://github.com/beacon-biosignals/CatBoost.jl",
173-
is_pure_julia=false, package_license="MIT")
172+
package_url="https://github.com/JuliaAI/CatBoost.jl", is_pure_julia=false,
173+
package_license="MIT")
174174

175175
MMI.metadata_model(CatBoostClassifier;
176176
input_scitype=Union{MMI.Table(MMI.Continuous, MMI.Count,

test/mlj_interface.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@
5050
end
5151
@testset "CatBoostClassifier" begin
5252
for data in [MLJTestInterface.make_binary(), MLJTestInterface.make_multiclass()]
53-
failures, summary = MLJTestInterface.test([CatBoostClassifier], data...;
53+
X = data[1]
54+
y = data[2]
55+
# catboost fails if only 1 class is present when training
56+
# MLJTestInterface splits the data down the middle, so the binary
57+
# data only has one class during training
58+
y[1] = y[end]
59+
failures, summary = MLJTestInterface.test([CatBoostClassifier], X, y;
5460
mod=@__MODULE__, verbosity=0, # bump to debug
5561
throw=false)
5662
@test isempty(failures)

0 commit comments

Comments
 (0)