Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ csv_file = Downloads.download(url)
````

````
"/tmp/jl_7hCVl9/horse.csv"
"/tmp/jl_AutsNd/horse.csv"
````

Entering these lines of code downloads the data to a temporary file at the location
Expand Down Expand Up @@ -531,8 +531,8 @@ A = rand(2, 3)

````
2×3 Matrix{Float64}:
0.68852 0.626316 0.486213
0.206646 0.0678205 0.909788
0.56044 0.53664 0.852799
0.83311 0.655101 0.199531
````

````@julia
Expand All @@ -550,8 +550,8 @@ Asparse = sparse(A)

````
2×3 SparseArrays.SparseMatrixCSC{Float64, Int64} with 6 stored entries:
0.68852 0.626316 0.486213
0.206646 0.0678205 0.909788
0.56044 0.53664 0.852799
0.83311 0.655101 0.199531
````

````@julia
Expand Down
272 changes: 136 additions & 136 deletions docs/src/notebooks/MLJTutorial/02_models/notebook.md

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions docs/src/notebooks/MLJTutorial/03_pipelines/notebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ x = rand(100);
````

````
mean(x) = 0.5049271509171457
std(x) = 0.2930352399455027
mean(x) = 0.48994182660190133
std(x) = 0.3012292457201098

````

Expand All @@ -46,7 +46,7 @@ xhat = transform(mach, x);

````
[ Info: Training machine(Standardizer(features = Symbol[], …), …).
mean(xhat) = -1.9095836023552692e-16
mean(xhat) = -9.103828801926283e-17
std(xhat) = 1.0

````
Expand Down Expand Up @@ -500,7 +500,7 @@ PerformanceEvaluation object with these fields:
measurement, uncertainty_radius_95, per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: DeterministicPipeline-586
Tag: DeterministicPipeline-366
Extract:
┌──────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
Expand Down Expand Up @@ -537,10 +537,10 @@ fit!(mach);
````

````
[ Info: Updating machine(DeterministicPipeline(continuous_encoder = ContinuousEncoder(drop_last = false, …), …), …).
[ Info: Updating machine(DeterministicPipeline(continuous_encoder = ContinuousEncoder(drop_last = false, …), …), …) (with warm restart if possible).
[ Info: Not retraining machine(:continuous_encoder, …). Use `force=true` to force.
[ Info: Not retraining machine(:pca, …). Use `force=true` to force.
[ Info: Updating machine(:ridge_regressor, …).
[ Info: Updating machine(:ridge_regressor, …) (with warm restart if possible).
┌ Info: Solver: MLJLinearModels.Analytical
│ iterative: Bool false
└ max_inner: Int64 200
Expand All @@ -558,9 +558,9 @@ fit!(mach);
````

````
[ Info: Updating machine(DeterministicPipeline(continuous_encoder = ContinuousEncoder(drop_last = false, …), …), …).
[ Info: Updating machine(DeterministicPipeline(continuous_encoder = ContinuousEncoder(drop_last = false, …), …), …) (with warm restart if possible).
[ Info: Not retraining machine(:continuous_encoder, …). Use `force=true` to force.
[ Info: Updating machine(:pca, …).
[ Info: Updating machine(:pca, …) (with warm restart if possible).
[ Info: Training machine(:ridge_regressor, …).
┌ Info: Solver: MLJLinearModels.Analytical
│ iterative: Bool false
Expand Down Expand Up @@ -629,7 +629,7 @@ PerformanceEvaluation object with these fields:
measurement, uncertainty_radius_95, per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: DeterministicPipeline-488
Tag: DeterministicPipeline-710
Extract:
┌──────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
Expand Down Expand Up @@ -669,7 +669,7 @@ PerformanceEvaluation object with these fields:
measurement, uncertainty_radius_95, per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: DeterministicPipeline-307
Tag: DeterministicPipeline-846
Extract:
┌──────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
Expand All @@ -696,7 +696,7 @@ PerformanceEvaluation object with these fields:
measurement, uncertainty_radius_95, per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: DeterministicPipeline-882
Tag: DeterministicPipeline-649
Extract:
┌──────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
Expand Down
15 changes: 9 additions & 6 deletions docs/src/notebooks/MLJTutorial/04_tuning/notebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ savefig("learning_curve2.png")
````

````
"/home/runner/work/MLJTutorial.jl/MLJTutorial.jl/docs/src/notebooks/04_tuning/learning_curve2.png"
"/home/runner/work/MLJTutorial.jl/MLJTutorial.jl/docs/src/notebooks/MLJTutorial/04_tuning/learning_curve2.png"
````

![](learning_curve2.png)
Expand Down Expand Up @@ -366,7 +366,7 @@ PerformanceEvaluation object with these fields:
measurement, uncertainty_radius_95, per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: ProbabilisticPipeline-133
Tag: ProbabilisticPipeline-992
Extract:
┌──────────────────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
Expand All @@ -392,7 +392,7 @@ PerformanceEvaluation object with these fields:
measurement, uncertainty_radius_95, per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: ProbabilisticTunedModel-228
Tag: ProbabilisticTunedModel-915
Extract:
┌──────────────────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
Expand Down Expand Up @@ -487,6 +487,7 @@ DeterministicPipeline(
nrounds = 70,
bagging_size = 1,
early_stopping_rounds = 9223372036854775807,
early_stopping_tolerance = 0.0,
L2 = 1.0,
lambda = 0.0,
gamma = 0.0,
Expand All @@ -506,18 +507,20 @@ DeterministicPipeline(
````

(a) Construct a bounded range `r1` for the `evo_tree_booster`
parameter `max_depth`, varying between 1 and 12.
parameter `max_depth`, varying between 4 and 14.

(b) For the `colsample` parameter of the `EvoTreeRegressor`, define the range

````@julia
r2 = range(model, :(evo_tree_regressor.colsample), lower=0.5, upper=1.0)
r2 = range(model, :(evo_tree_regressor.nbins), values = [32, 64, 128])
````

````
NumericRange(0.5 ≤ evo_tree_regressor.colsample ≤ 1.0; origin=0.75, unit=0.25)
NominalRange(evo_tree_regressor.nbins = 32, 64, 128)
````

(a)

Optimize `model` over these the parameter ranges `r1` and `r2` using a random search
with uniform priors (the default). Use `Holdout()` resampling, and implement your search
by first constructing a "self-tuning" wrap of `model`, as described above. Make `mae`
Expand Down
Loading
Loading