@@ -25,8 +25,7 @@ In this tutorial, we will explore how to use the `EntityEmbedder` to learn and a
2525- Build pipelines combining embeddings with downstream models
2626
2727```` julia
28- using Pkg;
29- Pkg. activate (@__DIR__ );
28+ using Pkg; # src
3029
3130
3231
@@ -46,11 +45,6 @@ using StatsBase ## For countmap
4645import Plots: mm # # For margin units
4746````
4847
49- ````
50- Activating project at `~/Documents/GitHub/MLJTransforms/docs/src/tutorials/entity_embeddings`
51-
52- ````
53-
5448## Data Loading and Preprocessing
5549
5650We'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)))")
185179
186180````
187181Distribution 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)
189183
190184Unique rating categories: ["1.0", "1.5", "2.0", "2.5", "3.0", "3.5", "4.0", "4.5", "5.0", "NaN"]
191185
@@ -320,7 +314,7 @@ EntityEmbedder(
320314 alpha = 0.0,
321315 rng = 39,
322316 optimiser_changes_trigger_retraining = false,
323- acceleration = CUDALibs{Nothing}(nothing),
317+ acceleration = ComputationalResources. CUDALibs{Nothing}(nothing),
324318 embedding_dims = Dict{Symbol, Real}(:Category => 2, Symbol("Content Rating") => 2, Symbol("Android Ver") => 2, :Genres => 2, :Type => 2)))
325319````
326320
@@ -340,7 +334,7 @@ MLJ.fit!(mach, force = true, verbosity = 1);
340334│ `CUDA.jl` must be loaded to access it.
341335└ Add `using CUDA` or `import CUDA` to your code. Alternatively, configure a different GPU backend by calling `Flux.gpu_backend!`.
342336[ 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
344338
345339````
346340
@@ -388,8 +382,8 @@ MLJ.fit!(pipe_mach, verbosity = 0)
388382trained Machine; does not cache data
389383 model: ProbabilisticPipeline(entity_embedder = EntityEmbedder(model = NeuralNetworkClassifier(builder = Short(n_hidden = 14, …), …)), …)
390384 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}}
393387
394388````
395389
0 commit comments