Skip to content

Commit 9fef867

Browse files
committed
✨ Further improve docs
1 parent 6471045 commit 9fef867

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/mlj_embedder_interface.jl

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ Train the machine using `fit!(mach)`.
119119
```julia
120120
using MLJ
121121
using CategoricalArrays
122-
import Pkg; Pkg.add("MLJLIBSVMInterface") # For SVC
123122
124123
# Setup some data
125124
N = 200
@@ -142,7 +141,6 @@ NeuralNetworkClassifier = @load NeuralNetworkClassifier pkg=MLJFlux
142141
SVC = @load SVC pkg=LIBSVM
143142
144143
145-
146144
emb = EntityEmbedder(NeuralNetworkClassifier(embedding_dims=Dict(:Column2 => 2, :Column3 => 2)))
147145
clf = SVC(cost = 1.0)
148146
@@ -174,15 +172,15 @@ yhat = predict(mach, X)
174172
machy = machine(emb, X, y)
175173
fit!(machy)
176174
julia> Xnew = transform(machy, X)
177-
(Column1 = Float32[1.0, 2.0, 3.0, 4.0, 5.0, 1.0, … ],
178-
Column2_1 = Float32[1.285769, 0.08033762, -0.09961729, -0.2812789, 0.94185555, 1.285769, … ],
179-
Column2_2 = Float32[-0.8712612, -0.34193662, -0.8327084, 1.6905315, 0.75170106, -0.8712612, …],
180-
Column3_1 = Float32[-0.00044717162, 1.5679433, -0.48835647, -0.9364795, -0.9364795, -0.00044717162, …],
181-
Column3_2 = Float32[-1.086054, 1.1133554, -1.5444189, 0.2760421, 0.2760421, -1.086054, … ],
175+
(Column1 = Float32[1.0, 2.0, 3.0, … ],
176+
Column2_1 = Float32[1.2, 0.08, -0.09, -0.2, 0.94, 1.2, … ],
177+
Column2_2 = Float32[-0.87, -0.34, -0.8, 1.6, 0.75, -0.87, …],
178+
Column3_1 = Float32[-0.0, 1.56, -0.48, -0.9, -0.9, -0.0, …],
179+
Column3_2 = Float32[-1.0, 1.1, -1.54, 0.2, 0.2, -1.0, … ],
182180
Column4 = Float32[1.0, 2.0, 3.0, 4.0, 5.0, 1.0, … ],
183-
Column5 = Float32[0.27364022, 0.12229505, -0.60269946, 1.5815768, -0.6342952, -0.12323896, … ],
184-
Column6_1 = Float32[-0.99640805, -0.99640805, 0.8055623, 0.8055623, 0.34632754, -0.99640805, … ],
185-
Column6_2 = Float32[-1.0043539, -1.0043539, 0.19345926, 0.19345926, 1.7287723, -1.0043539, … ])
181+
Column5 = Float32[0.27, 0.12, -0.60, 1.5, -0.6, -0.123, … ],
182+
Column6_1 = Float32[-0.99, -0.99, 0.8, 0.8, 0.34, -0.99, … ],
183+
Column6_2 = Float32[-1.00, -1.0, 0.19, 0.19, 1.7, -1.00, … ])
186184
```
187185
188186
See also

0 commit comments

Comments
 (0)