@@ -25,8 +25,7 @@ In this tutorial, we will explore how to use the `EntityEmbedder` to learn and a
25
25
- Build pipelines combining embeddings with downstream models
26
26
27
27
```` julia
28
- using Pkg;
29
- Pkg. activate (@__DIR__ );
28
+ using Pkg; # src
30
29
31
30
32
31
@@ -46,11 +45,6 @@ using StatsBase ## For countmap
46
45
import Plots: mm # # For margin units
47
46
````
48
47
49
- ````
50
- Activating project at `~/Documents/GitHub/MLJTransforms/docs/src/tutorials/entity_embeddings`
51
-
52
- ````
53
-
54
48
## Data Loading and Preprocessing
55
49
56
50
We'll use the Google Play Store dataset which contains information about mobile applications.
@@ -185,7 +179,7 @@ println("\nUnique rating categories: $(sort(unique(df.RatingCategory)))")
185
179
186
180
````
187
181
Distribution of categorical rating labels:
188
- OrderedCollections.OrderedDict{CategoricalValue{String, UInt32}, Int64}("1.0" => 17, "1.5" => 18, "2.0" => 53, "2.5" => 105, "3.0" => 281, "3.5" => 722, "4.0" => 2420, "4.5" => 3542, "5.0" => 571, "NaN" => 1416)
182
+ OrderedCollections.OrderedDict{CategoricalArrays. CategoricalValue{String, UInt32}, Int64}("1.0" => 17, "1.5" => 18, "2.0" => 53, "2.5" => 105, "3.0" => 281, "3.5" => 722, "4.0" => 2420, "4.5" => 3542, "5.0" => 571, "NaN" => 1416)
189
183
190
184
Unique rating categories: ["1.0", "1.5", "2.0", "2.5", "3.0", "3.5", "4.0", "4.5", "5.0", "NaN"]
191
185
@@ -320,7 +314,7 @@ EntityEmbedder(
320
314
alpha = 0.0,
321
315
rng = 39,
322
316
optimiser_changes_trigger_retraining = false,
323
- acceleration = CUDALibs{Nothing}(nothing),
317
+ acceleration = ComputationalResources. CUDALibs{Nothing}(nothing),
324
318
embedding_dims = Dict{Symbol, Real}(:Category => 2, Symbol("Content Rating") => 2, Symbol("Android Ver") => 2, :Genres => 2, :Type => 2)))
325
319
````
326
320
@@ -340,7 +334,7 @@ MLJ.fit!(mach, force = true, verbosity = 1);
340
334
│ `CUDA.jl` must be loaded to access it.
341
335
└ Add `using CUDA` or `import CUDA` to your code. Alternatively, configure a different GPU backend by calling `Flux.gpu_backend!`.
342
336
[ Info: MLJFlux: converting input data to Float32
343
- Optimising neural net: 33%[========> ] ETA: 0:00:00 [K Optimising neural net: 50%[============> ] ETA: 0:00:00[K Optimising neural net: 67%[================> ] ETA: 0:00:00[K Optimising neural net: 83%[====================> ] ETA: 0:00:00 [K Optimising neural net: 100%[=========================] Time: 0:00:00 [K
337
+ Optimising neural net: 33%[========> ] ETA: 0:00:28 [K Optimising neural net: 83%[====================> ] ETA: 0:00:03 [K Optimising neural net: 100%[=========================] Time: 0:00:14 [K
344
338
345
339
````
346
340
@@ -388,8 +382,8 @@ MLJ.fit!(pipe_mach, verbosity = 0)
388
382
trained Machine; does not cache data
389
383
model: ProbabilisticPipeline(entity_embedder = EntityEmbedder(model = NeuralNetworkClassifier(builder = Short(n_hidden = 14, …), …)), …)
390
384
args:
391
- 1: Source @927 ⏎ Table{Union{AbstractVector{Continuous}, AbstractVector{Multiclass{33}}, AbstractVector{Multiclass{2}}, AbstractVector{Multiclass{6}}, AbstractVector{Multiclass{48}}, AbstractVector{Multiclass{34}}}}
392
- 2: Source @044 ⏎ AbstractVector{OrderedFactor{10}}
385
+ 1: Source @148 ⏎ ScientificTypesBase. Table{Union{AbstractVector{ScientificTypesBase. Continuous}, AbstractVector{ScientificTypesBase. Multiclass{33}}, AbstractVector{ScientificTypesBase. Multiclass{2}}, AbstractVector{ScientificTypesBase. Multiclass{6}}, AbstractVector{ScientificTypesBase. Multiclass{48}}, AbstractVector{ScientificTypesBase. Multiclass{34}}}}
386
+ 2: Source @429 ⏎ AbstractVector{ScientificTypesBase. OrderedFactor{10}}
393
387
394
388
````
395
389
0 commit comments