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_nAeUTc/horse.csv"
"/tmp/jl_ruz0kP/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.84235 0.324562 0.731728
0.233998 0.746378 0.485095
0.113155 0.33251 0.397839
0.171581 0.90293 0.436722
````

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

````
2×3 SparseArrays.SparseMatrixCSC{Float64, Int64} with 6 stored entries:
0.84235 0.324562 0.731728
0.233998 0.746378 0.485095
0.113155 0.33251 0.397839
0.171581 0.90293 0.436722
````

````@julia
Expand Down
Binary file modified docs/src/notebooks/MLJTutorial/02_models/learning_curve.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
313 changes: 158 additions & 155 deletions docs/src/notebooks/MLJTutorial/02_models/notebook.md

Large diffs are not rendered by default.

100 changes: 52 additions & 48 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.52573272422357
std(x) = 0.3020501201265377
mean(x) = 0.47696749924138343
std(x) = 0.29728842148044776

````

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

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

````
Expand Down Expand Up @@ -497,18 +497,19 @@ evaluate!(mach, measure=mae, resampling=Holdout()) # `CV(nfolds=6)` is `resampli
````
PerformanceEvaluation object with these fields:
model, tag, measure, operation,
measurement, uncertainty_radius_95, per_fold, per_observation,
measurement (per-fold aggregate), uncertainty_radius_95 (1.96*SE),
per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: DeterministicPipeline-661
Tag: DeterministicPipeline-190
Extract:
┌──────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
├──────────┼───────────┼─────────────┤
│ LPLoss( │ predict │ 176000.0 │
│ p = 1) │ │ │
└──────────┴───────────┴─────────────┘

Apply `describe` to this result for a named tuple summary.
````

### Training of composite models is "smart"
Expand Down Expand Up @@ -626,23 +627,24 @@ evaluate!(mach, measure=mae)
````
PerformanceEvaluation object with these fields:
model, tag, measure, operation,
measurement, uncertainty_radius_95, per_fold, per_observation,
measurement (per-fold aggregate), uncertainty_radius_95 (1.96*SE),
per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: DeterministicPipeline-106
Tag: DeterministicPipeline-398
Extract:
┌──────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
├──────────┼───────────┼─────────────┤
│ LPLoss( │ predict │ 162000.0 │
│ p = 1) │ │ │
└──────────┴───────────┴─────────────┘
┌──────────────────────────────────────────────────────────────┬─────────┐
│ per_fold │ 1.96*SE │
├──────────────────────────────────────────────────────────────┼─────────┤
│ [160000.0, 170000.0, 163000.0, 156000.0, 163000.0, 162000.0] │ 4140.0 │
└──────────────────────────────────────────────────────────────┴─────────┘

┌──────────┬───────────┬─────────────┬─────────┐
│ measure │ operation │ measurement │ 1.96*SE │
├──────────┼───────────┼─────────────┼─────────┤
│ LPLoss( │ predict │ 162300.0 │ 4100.0 │
│ p = 1) │ │ │ │
└──────────┴───────────┴─────────────┴─────────┘
┌──────────────────────────────────────────────────────────────┐
│ per_fold │
├──────────────────────────────────────────────────────────────┤
│ [160000.0, 170000.0, 163000.0, 156000.0, 163000.0, 162000.0] │
└──────────────────────────────────────────────────────────────┘
Apply `describe` to this result for a named tuple summary.
````

MLJ will also allow you to insert *learned* target transformations. For example, we
Expand All @@ -666,23 +668,24 @@ evaluate!(mach, measure=mae)
````
PerformanceEvaluation object with these fields:
model, tag, measure, operation,
measurement, uncertainty_radius_95, per_fold, per_observation,
measurement (per-fold aggregate), uncertainty_radius_95 (1.96*SE),
per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: DeterministicPipeline-264
Tag: DeterministicPipeline-611
Extract:
┌──────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
├──────────┼───────────┼─────────────┤
│ LPLoss( │ predict │ 509000.0 │
│ p = 1) │ │ │
└──────────┴───────────┴─────────────┘
┌───────────────────────────────────────────────────────────┬──────────┐
│ per_fold │ 1.96*SE │
├───────────────────────────────────────────────────────────┼──────────┤
│ [162000.0, 2.2e6, 181000.0, 161000.0, 176000.0, 172000.0] │ 728000.0 │
└───────────────────────────────────────────────────────────┴──────────┘

┌──────────┬───────────┬─────────────┬──────────┐
│ measure │ operation │ measurement │ 1.96*SE │
├──────────┼───────────┼─────────────┼──────────┤
│ LPLoss( │ predict │ 510000.0 │ 730000.0 │
│ p = 1) │ │ │ │
└──────────┴───────────┴─────────────┴──────────┘
┌───────────────────────────────────────────────────────────┐
│ per_fold │
├───────────────────────────────────────────────────────────┤
│ [162000.0, 2.2e6, 181000.0, 161000.0, 176000.0, 172000.0] │
└───────────────────────────────────────────────────────────┘
Apply `describe` to this result for a named tuple summary.
````

````@julia
Expand All @@ -693,23 +696,24 @@ evaluate!(mach, measure=mae)
````
PerformanceEvaluation object with these fields:
model, tag, measure, operation,
measurement, uncertainty_radius_95, per_fold, per_observation,
measurement (per-fold aggregate), uncertainty_radius_95 (1.96*SE),
per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: DeterministicPipeline-300
Tag: DeterministicPipeline-592
Extract:
┌──────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
├──────────┼───────────┼─────────────┤
│ LPLoss( │ predict │ 172000.0 │
│ p = 1) │ │ │
└──────────┴───────────┴─────────────┘
┌──────────────────────────────────────────────────────────────┬─────────┐
│ per_fold │ 1.96*SE │
├──────────────────────────────────────────────────────────────┼─────────┤
│ [171000.0, 172000.0, 173000.0, 170000.0, 173000.0, 171000.0] │ 1240.0 │
└──────────────────────────────────────────────────────────────┴─────────┘

┌──────────┬───────────┬─────────────┬─────────┐
│ measure │ operation │ measurement │ 1.96*SE │
├──────────┼───────────┼─────────────┼─────────┤
│ LPLoss( │ predict │ 171500.0 │ 1200.0 │
│ p = 1) │ │ │ │
└──────────┴───────────┴─────────────┴─────────┘
┌──────────────────────────────────────────────────────────────┐
│ per_fold │
├──────────────────────────────────────────────────────────────┤
│ [171000.0, 172000.0, 173000.0, 170000.0, 173000.0, 171000.0] │
└──────────────────────────────────────────────────────────────┘
Apply `describe` to this result for a named tuple summary.
````

### Tutorial 3 Resources
Expand Down
Binary file modified docs/src/notebooks/MLJTutorial/04_tuning/gamma_sampler.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 30 additions & 28 deletions docs/src/notebooks/MLJTutorial/04_tuning/notebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,23 +363,24 @@ err = evaluate!(mach, resampling=CV(nfolds=3), measure=log_loss)
````
PerformanceEvaluation object with these fields:
model, tag, measure, operation,
measurement, uncertainty_radius_95, per_fold, per_observation,
measurement (per-fold aggregate), uncertainty_radius_95 (1.96*SE),
per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: ProbabilisticPipeline-509
Tag: ProbabilisticPipeline-307
Extract:
┌──────────────────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
├──────────────────────┼───────────┼─────────────┤
│ LogLoss( │ predict │ 0.782 │
│ tol = 2.22045e-16) │ │ │
└──────────────────────┴───────────┴─────────────┘
┌──────────────────────┬─────────┐
│ per_fold │ 1.96*SE │
├──────────────────────┼─────────┤
│ [0.83, 0.721, 0.794] │ 0.0773 │
└──────────────────────┴─────────┘

┌──────────────────────┬───────────┬─────────────┬─────────┐
│ measure │ operation │ measurement │ 1.96*SE │
├──────────────────────┼───────────┼─────────────┼─────────┤
│ LogLoss( │ predict │ 0.782 │ 0.077 │
│ tol = 2.22045e-16) │ │ │ │
└──────────────────────┴───────────┴─────────────┴─────────┘
┌──────────────────────┐
│ per_fold │
├──────────────────────┤
│ [0.83, 0.721, 0.794] │
└──────────────────────┘
Apply `describe` to this result for a named tuple summary.
````

````@julia
Expand All @@ -389,23 +390,24 @@ tuned_err = evaluate!(tuned_mach, resampling=CV(nfolds=3), measure=log_loss)
````
PerformanceEvaluation object with these fields:
model, tag, measure, operation,
measurement, uncertainty_radius_95, per_fold, per_observation,
measurement (per-fold aggregate), uncertainty_radius_95 (1.96*SE),
per_fold, per_observation,
fitted_params_per_fold, report_per_fold,
train_test_rows, resampling, repeats
Tag: ProbabilisticTunedModel-395
Tag: ProbabilisticTunedModel-779
Extract:
┌──────────────────────┬───────────┬─────────────┐
│ measure │ operation │ measurement │
├──────────────────────┼───────────┼─────────────┤
│ LogLoss( │ predict │ 0.779 │
│ tol = 2.22045e-16) │ │ │
└──────────────────────┴───────────┴─────────────┘
┌───────────────────────┬─────────┐
│ per_fold │ 1.96*SE │
├───────────────────────┼─────────┤
│ [0.798, 0.802, 0.738] │ 0.0496 │
└───────────────────────┴─────────┘

┌──────────────────────┬───────────┬─────────────┬─────────┐
│ measure │ operation │ measurement │ 1.96*SE │
├──────────────────────┼───────────┼─────────────┼─────────┤
│ LogLoss( │ predict │ 0.779 │ 0.05 │
│ tol = 2.22045e-16) │ │ │ │
└──────────────────────┴───────────┴─────────────┴─────────┘
┌───────────────────────┐
│ per_fold │
├───────────────────────┤
│ [0.798, 0.802, 0.738] │
└───────────────────────┘
Apply `describe` to this result for a named tuple summary.
````

### Tutorial 4 Resources
Expand Down
Loading
Loading