We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28930d4 commit 5cdee87Copy full SHA for 5cdee87
README.md
@@ -56,19 +56,20 @@ using CatBoost.MLJCatBoostInterface
56
using DataFrames
57
using MLJBase
58
59
-train_data = DataFrame([[1,4,30], [4,5,40], [5,6,50], [6,7,60]], :auto)
60
-eval_data = DataFrame([[2,1], [4,4], [6,50], [8,60]], :auto)
61
-train_labels = [10.0, 20.0, 30.0]
+# Initialize data
+train_data = DataFrame([[1, 4, 30], [4, 5, 40], [5, 6, 50], [6, 7, 60]], :auto)
+train_labels = [10.0, 20.0, 30.0]
62
+eval_data = DataFrame([[2, 1], [4, 4], [6, 50], [8, 60]], :auto)
63
-# Initialize MLJ Machine
64
-model = CatBoostRegressor(iterations = 2, learning_rate = 1, depth = 2)
+# Initialize CatBoostClassifier
65
+model = CatBoostRegressor(; iterations=2, learning_rate=1.0, depth=2)
66
mach = machine(model, train_data, train_labels)
67
68
# Fit model
69
MLJBase.fit!(mach)
70
71
# Get predictions
-preds = predict(model, eval_data)
72
+preds_class = MLJBase.predict(mach, eval_data)
73
74
end # module
75
```
docs/src/index.md
@@ -48,19 +48,20 @@ using CatBoost.MLJCatBoostInterface
48
49
50
51
52
53
54
55
examples/mlj/binary.jl
@@ -3,7 +3,6 @@ module Binary
3
using CatBoost.MLJCatBoostInterface
4
5
6
-using PythonCall
7
8
# Initialize data
9
train_data = DataFrame([coerce(["a", "a", "c"], Multiclass),
examples/mlj/multiclass.jl
@@ -3,7 +3,6 @@ module Multiclass
train_data = DataFrame([coerce(["a", "a", "c"], MLJBase.Multiclass),
examples/mlj/regression.jl
@@ -3,7 +3,6 @@ module Regression
train_data = DataFrame([[1, 4, 30], [4, 5, 40], [5, 6, 50], [6, 7, 60]], :auto)
0 commit comments