Skip to content

Commit ec5af95

Browse files
authored
Merge pull request #1113 from DilumAluthge/dpa/repo-transfer
Updates now that MLJ.jl has been moved to the JuliaAI GitHub organization
2 parents f0ddfd9 + 5e02d5a commit ec5af95

File tree

9 files changed

+833
-707
lines changed

9 files changed

+833
-707
lines changed

examples/lightning_tour/lightning_tour.ipynb

Lines changed: 237 additions & 110 deletions
Large diffs are not rendered by default.

examples/lightning_tour/lightning_tour.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# # Lightning tour of MLJ
22

33
# *For a more elementary introduction to MLJ, see [Getting
4-
# Started](https://alan-turing-institute.github.io/MLJ.jl/dev/getting_started/).*
4+
# Started](https://juliaai.github.io/MLJ.jl/dev/getting_started/).*
55

66
# **Note.** Be sure this file has not been separated from the
77
# accompanying Project.toml and Manifest.toml files, which should not

examples/telco/notebook.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"metadata": {},
1313
"source": [
1414
"An application of the [MLJ\n",
15-
"toolbox](https://alan-turing-institute.github.io/MLJ.jl/dev/) to the\n",
15+
"toolbox](https://juliaai.github.io/MLJ.jl/dev/) to the\n",
1616
"Telco Customer Churn dataset, aimed at practicing data scientists\n",
1717
"new to MLJ (Machine Learning in Julia). This tutorial does not\n",
1818
"cover exploratory data analysis."
@@ -31,9 +31,9 @@
3131
"metadata": {},
3232
"source": [
3333
"For other MLJ learning resources see the [Learning\n",
34-
"MLJ](https://alan-turing-institute.github.io/MLJ.jl/dev/learning_mlj/)\n",
34+
"MLJ](https://juliaai.github.io/MLJ.jl/dev/learning_mlj/)\n",
3535
"section of the\n",
36-
"[manual](https://alan-turing-institute.github.io/MLJ.jl/dev/)."
36+
"[manual](https://juliaai.github.io/MLJ.jl/dev/)."
3737
]
3838
},
3939
{
@@ -132,7 +132,7 @@
132132
"the notebook, package instantiation and pre-compilation may take a\n",
133133
"minute or so to complete. **This step will fail** if the [correct\n",
134134
"Manifest.toml and Project.toml\n",
135-
"files](https://github.com/alan-turing-institute/MLJ.jl/tree/dev/examples/telco)\n",
135+
"files](https://github.com/JuliaAI/MLJ.jl/tree/dev/examples/telco)\n",
136136
"are not in the same directory as this notebook."
137137
]
138138
},
@@ -203,7 +203,7 @@
203203
"metadata": {},
204204
"source": [
205205
"This section is a condensed adaption of the [Getting Started\n",
206-
"example](https://alan-turing-institute.github.io/MLJ.jl/dev/getting_started/#Fit-and-predict)\n",
206+
"example](https://juliaai.github.io/MLJ.jl/dev/getting_started/#Fit-and-predict)\n",
207207
"in the MLJ documentation."
208208
]
209209
},
@@ -448,7 +448,7 @@
448448
"metadata": {},
449449
"source": [
450450
"A machine stores some other information enabling [warm\n",
451-
"restart](https://alan-turing-institute.github.io/MLJ.jl/dev/machines/#Warm-restarts)\n",
451+
"restart](https://juliaai.github.io/MLJ.jl/dev/machines/#Warm-restarts)\n",
452452
"for some models, but we won't go into that here. You are allowed to\n",
453453
"access and mutate the `model` parameter:"
454454
]
@@ -1140,7 +1140,7 @@
11401140
"metadata": {},
11411141
"source": [
11421142
"For tools helping us to identify suitable models, see the [Model\n",
1143-
"Search](https://alan-turing-institute.github.io/MLJ.jl/dev/model_search/#model_search)\n",
1143+
"Search](https://juliaai.github.io/MLJ.jl/dev/model_search/#model_search)\n",
11441144
"section of the manual. We will build a gradient tree-boosting model,\n",
11451145
"a popular first choice for structured data like we have here. Model\n",
11461146
"code is contained in a third-party package called\n",
@@ -1379,7 +1379,7 @@
13791379
"source": [
13801380
"Note that the component models appear as hyper-parameters of\n",
13811381
"`pipe`. Pipelines are an implementation of a more general [model\n",
1382-
"composition](https://alan-turing-institute.github.io/MLJ.jl/dev/composing_models/#Composing-Models)\n",
1382+
"composition](https://juliaai.github.io/MLJ.jl/dev/composing_models/#Composing-Models)\n",
13831383
"interface provided by MLJ that advanced users may want to learn about."
13841384
]
13851385
},
@@ -2152,7 +2152,7 @@
21522152
"metadata": {},
21532153
"source": [
21542154
"We choose a `StratifiedCV` resampling strategy; the complete list of options is\n",
2155-
"[here](https://alan-turing-institute.github.io/MLJ.jl/dev/evaluating_model_performance/#Built-in-resampling-strategies)."
2155+
"[here](https://juliaai.github.io/MLJ.jl/dev/evaluating_model_performance/#Built-in-resampling-strategies)."
21562156
]
21572157
},
21582158
{
@@ -2393,7 +2393,7 @@
23932393
"metadata": {},
23942394
"source": [
23952395
"First, we select appropriate controls from [this\n",
2396-
"list](https://alan-turing-institute.github.io/MLJ.jl/dev/controlling_iterative_models/#Controls-provided):"
2396+
"list](https://juliaai.github.io/MLJ.jl/dev/controlling_iterative_models/#Controls-provided):"
23972397
]
23982398
},
23992399
{
@@ -2559,7 +2559,7 @@
25592559
"wanting to visualize the effect of changes to a *single*\n",
25602560
"hyper-parameter (which could be an iteration parameter). See, for\n",
25612561
"example, [this section of the\n",
2562-
"manual](https://alan-turing-institute.github.io/MLJ.jl/dev/learning_curves/)\n",
2562+
"manual](https://juliaai.github.io/MLJ.jl/dev/learning_curves/)\n",
25632563
"or [this\n",
25642564
"tutorial](https://github.com/ablaom/MLJTutorial.jl/blob/dev/notebooks/04_tuning/notebook.ipynb)."
25652565
]
@@ -2689,7 +2689,7 @@
26892689
"metadata": {},
26902690
"source": [
26912691
"Next, we choose an optimization strategy from [this\n",
2692-
"list](https://alan-turing-institute.github.io/MLJ.jl/dev/tuning_models/#Tuning-Models):"
2692+
"list](https://juliaai.github.io/MLJ.jl/dev/tuning_models/#Tuning-Models):"
26932693
]
26942694
},
26952695
{

examples/telco/notebook.jl

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# # MLJ for Data Scientists in Two Hours
22

33
# An application of the [MLJ
4-
# toolbox](https://alan-turing-institute.github.io/MLJ.jl/dev/) to the
4+
# toolbox](https://juliaai.github.io/MLJ.jl/dev/) to the
55
# Telco Customer Churn dataset, aimed at practicing data scientists
66
# new to MLJ (Machine Learning in Julia). This tutorial does not
77
# cover exploratory data analysis.
@@ -10,9 +10,9 @@
1010
# deep-learning).
1111

1212
# For other MLJ learning resources see the [Learning
13-
# MLJ](https://alan-turing-institute.github.io/MLJ.jl/dev/learning_mlj/)
13+
# MLJ](https://juliaai.github.io/MLJ.jl/dev/learning_mlj/)
1414
# section of the
15-
# [manual](https://alan-turing-institute.github.io/MLJ.jl/dev/).
15+
# [manual](https://juliaai.github.io/MLJ.jl/dev/).
1616

1717
# **Topics covered**: Grabbing and preparing a dataset, basic
1818
# fit/predict workflow, constructing a pipeline to include data
@@ -78,7 +78,7 @@
7878
# the notebook, package instantiation and pre-compilation may take a
7979
# minute or so to complete. **This step will fail** if the [correct
8080
# Manifest.toml and Project.toml
81-
# files](https://github.com/alan-turing-institute/MLJ.jl/tree/dev/examples/telco)
81+
# files](https://github.com/JuliaAI/MLJ.jl/tree/dev/examples/telco)
8282
# are not in the same directory as this notebook.
8383

8484
using Pkg
@@ -94,7 +94,7 @@ Pkg.instantiate()
9494
# don't fully grasp should become clearer in the Telco study.
9595

9696
# This section is a condensed adaption of the [Getting Started
97-
# example](https://alan-turing-institute.github.io/MLJ.jl/dev/getting_started/#Fit-and-predict)
97+
# example](https://juliaai.github.io/MLJ.jl/dev/getting_started/#Fit-and-predict)
9898
# in the MLJ documentation.
9999

100100
# First, using the built-in iris dataset, we load and inspect the features
@@ -137,7 +137,7 @@ fit!(mach, rows=train_rows)
137137
fitted_params(mach)
138138

139139
# A machine stores some other information enabling [warm
140-
# restart](https://alan-turing-institute.github.io/MLJ.jl/dev/machines/#Warm-restarts)
140+
# restart](https://juliaai.github.io/MLJ.jl/dev/machines/#Warm-restarts)
141141
# for some models, but we won't go into that here. You are allowed to
142142
# access and mutate the `model` parameter:
143143

@@ -292,7 +292,7 @@ const ytest, Xtest = unpack(df_test, ==(:Churn), !=(:customerID));
292292
# > Introduces: `@load`, `input_scitype`, `target_scitype`
293293

294294
# For tools helping us to identify suitable models, see the [Model
295-
# Search](https://alan-turing-institute.github.io/MLJ.jl/dev/model_search/#model_search)
295+
# Search](https://juliaai.github.io/MLJ.jl/dev/model_search/#model_search)
296296
# section of the manual. We will build a gradient tree-boosting model,
297297
# a popular first choice for structured data like we have here. Model
298298
# code is contained in a third-party package called
@@ -340,7 +340,7 @@ pipe = ContinuousEncoder() |> booster
340340

341341
# Note that the component models appear as hyperparameters of
342342
# `pipe`. Pipelines are an implementation of a more general [model
343-
# composition](https://alan-turing-institute.github.io/MLJ.jl/dev/composing_models/#Composing-Models)
343+
# composition](https://juliaai.github.io/MLJ.jl/dev/composing_models/#Composing-Models)
344344
# interface provided by MLJ that advanced users may want to learn about.
345345

346346
# From the above display, we see that component model hyperparameters
@@ -464,7 +464,7 @@ plot!([0, 1], [0, 1], linewidth=2, linestyle=:dash, color=:black)
464464
# `acceleration=CPUThreads()` to parallelize the computation.
465465

466466
# We choose a `StratifiedCV` resampling strategy; the complete list of options is
467-
# [here](https://alan-turing-institute.github.io/MLJ.jl/dev/evaluating_model_performance/#Built-in-resampling-strategies).
467+
# [here](https://juliaai.github.io/MLJ.jl/dev/evaluating_model_performance/#Built-in-resampling-strategies).
468468

469469
e_pipe = evaluate(pipe, X, y,
470470
resampling=StratifiedCV(nfolds=6, rng=123),
@@ -535,7 +535,7 @@ pipe2 = ContinuousEncoder() |>
535535
# [MLJFlux.jl](https://github.com/FluxML/MLJFlux.jl).
536536

537537
# First, we select appropriate controls from [this
538-
# list](https://alan-turing-institute.github.io/MLJ.jl/dev/controlling_iterative_models/#Controls-provided):
538+
# list](https://juliaai.github.io/MLJ.jl/dev/controlling_iterative_models/#Controls-provided):
539539

540540
controls = [
541541
Step(1), # to increment iteration parameter (`pipe.nrounds`)
@@ -580,7 +580,7 @@ fit!(mach_iterated_pipe);
580580
# wanting to visualize the effect of changes to a *single*
581581
# hyperparameter (which could be an iteration parameter). See, for
582582
# example, [this section of the
583-
# manual](https://alan-turing-institute.github.io/MLJ.jl/dev/learning_curves/)
583+
# manual](https://juliaai.github.io/MLJ.jl/dev/learning_curves/)
584584
# or [this
585585
# tutorial](https://github.com/ablaom/MLJTutorial.jl/blob/dev/notebooks/04_tuning/notebook.ipynb).
586586

@@ -618,7 +618,7 @@ r2 = range(iterated_pipe, p2, lower=2, upper=6)
618618
# and `upper`.
619619

620620
# Next, we choose an optimization strategy from [this
621-
# list](https://alan-turing-institute.github.io/MLJ.jl/dev/tuning_models/#Tuning-Models):
621+
# list](https://juliaai.github.io/MLJ.jl/dev/tuning_models/#Tuning-Models):
622622

623623
tuning = RandomSearch(rng=123)
624624

@@ -755,4 +755,3 @@ ŷ_basic = predict(mach_basic, Xtest);
755755
auc(ŷ_basic, ytest),
756756
accuracy(mode.(ŷ_basic), ytest)
757757
)
758-

examples/telco/notebook.pluto.jl

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ md"# MLJ for Data Scientists in Two Hours"
1010
# ╔═╡ 8a6670b8-96a8-4a5d-b795-033f6f2a0674
1111
md"""
1212
An application of the [MLJ
13-
toolbox](https://alan-turing-institute.github.io/MLJ.jl/dev/) to the
13+
toolbox](https://juliaai.github.io/MLJ.jl/dev/) to the
1414
Telco Customer Churn dataset, aimed at practicing data scientists
1515
new to MLJ (Machine Learning in Julia). This tutorial does not
1616
cover exploratory data analysis.
@@ -25,9 +25,9 @@ deep-learning).
2525
# ╔═╡ b04c4790-59e0-42a3-af2a-25235e544a31
2626
md"""
2727
For other MLJ learning resources see the [Learning
28-
MLJ](https://alan-turing-institute.github.io/MLJ.jl/dev/learning_mlj/)
28+
MLJ](https://juliaai.github.io/MLJ.jl/dev/learning_mlj/)
2929
section of the
30-
[manual](https://alan-turing-institute.github.io/MLJ.jl/dev/).
30+
[manual](https://juliaai.github.io/MLJ.jl/dev/).
3131
"""
3232

3333
# ╔═╡ 4eb8dff4-c23a-4b41-8af5-148d95ea2900
@@ -106,7 +106,7 @@ used to develop this tutorial. If this is your first time running
106106
the notebook, package instantiation and pre-compilation may take a
107107
minute or so to complete. **This step will fail** if the [correct
108108
Manifest.toml and Project.toml
109-
files](https://github.com/alan-turing-institute/MLJ.jl/tree/dev/examples/telco)
109+
files](https://github.com/JuliaAI/MLJ.jl/tree/dev/examples/telco)
110110
are not in the same directory as this notebook.
111111
"""
112112

@@ -131,7 +131,7 @@ don't fully grasp should become clearer in the Telco study.
131131
# ╔═╡ 33ca287e-8cba-47d1-a0de-1721c1bc2df2
132132
md"""
133133
This section is a condensed adaption of the [Getting Started
134-
example](https://alan-turing-institute.github.io/MLJ.jl/dev/getting_started/#Fit-and-predict)
134+
example](https://juliaai.github.io/MLJ.jl/dev/getting_started/#Fit-and-predict)
135135
in the MLJ documentation.
136136
"""
137137

@@ -197,7 +197,7 @@ end
197197
# ╔═╡ 0f978839-cc95-4c3a-8a29-32f11452654a
198198
md"""
199199
A machine stores some other information enabling [warm
200-
restart](https://alan-turing-institute.github.io/MLJ.jl/dev/machines/#Warm-restarts)
200+
restart](https://juliaai.github.io/MLJ.jl/dev/machines/#Warm-restarts)
201201
for some models, but we won't go into that here. You are allowed to
202202
access and mutate the `model` parameter:
203203
"""
@@ -324,7 +324,7 @@ begin
324324
return x
325325
end
326326
end
327-
327+
328328
df0.TotalCharges = fix_blanks(df0.TotalCharges);
329329
end
330330

@@ -424,7 +424,7 @@ md"> Introduces: `@load`, `input_scitype`, `target_scitype`"
424424
# ╔═╡ f97969e2-c15c-42cf-a6fa-eaf14df5d44b
425425
md"""
426426
For tools helping us to identify suitable models, see the [Model
427-
Search](https://alan-turing-institute.github.io/MLJ.jl/dev/model_search/#model_search)
427+
Search](https://juliaai.github.io/MLJ.jl/dev/model_search/#model_search)
428428
section of the manual. We will build a gradient tree-boosting model,
429429
a popular first choice for structured data like we have here. Model
430430
code is contained in a third-party package called
@@ -497,7 +497,7 @@ pipe = ContinuousEncoder() |> booster
497497
md"""
498498
Note that the component models appear as hyperparameters of
499499
`pipe`. Pipelines are an implementation of a more general [model
500-
composition](https://alan-turing-institute.github.io/MLJ.jl/dev/composing_models/#Composing-Models)
500+
composition](https://juliaai.github.io/MLJ.jl/dev/composing_models/#Composing-Models)
501501
interface provided by MLJ that advanced users may want to learn about.
502502
"""
503503

@@ -693,7 +693,7 @@ observation space, for a total of 18 folds) and set
693693
# ╔═╡ 562887bb-b7fb-430f-b61c-748aec38e674
694694
md"""
695695
We choose a `StratifiedCV` resampling strategy; the complete list of options is
696-
[here](https://alan-turing-institute.github.io/MLJ.jl/dev/evaluating_model_performance/#Built-in-resampling-strategies).
696+
[here](https://juliaai.github.io/MLJ.jl/dev/evaluating_model_performance/#Built-in-resampling-strategies).
697697
"""
698698

699699
# ╔═╡ f9be989e-2604-44c2-9727-ed822e4fd85d
@@ -734,7 +734,7 @@ begin
734734
table = (measure=measure, measurement=measurement)
735735
return DataFrames.DataFrame(table)
736736
end
737-
737+
738738
const confidence_intervals_basic_model = confidence_intervals(e_pipe)
739739
end
740740

@@ -753,7 +753,7 @@ with low feature importance, to speed up later optimization:
753753
# ╔═╡ cdfe840d-4e87-467f-b582-dfcbeb05bcc5
754754
begin
755755
unimportant_features = filter(:importance => <(0.005), feature_importance_table).feature
756-
756+
757757
pipe2 = ContinuousEncoder() |>
758758
FeatureSelector(features=unimportant_features, ignore=true) |> booster
759759
end
@@ -790,7 +790,7 @@ eg, the neural network models provided by
790790
# ╔═╡ 8fc99d35-d8cc-455f-806e-1bc580dc349d
791791
md"""
792792
First, we select appropriate controls from [this
793-
list](https://alan-turing-institute.github.io/MLJ.jl/dev/controlling_iterative_models/#Controls-provided):
793+
list](https://juliaai.github.io/MLJ.jl/dev/controlling_iterative_models/#Controls-provided):
794794
"""
795795

796796
# ╔═╡ 29f33708-4a82-4acc-9703-288eae064e2a
@@ -857,7 +857,7 @@ here is the `learning_curve` function, which can be useful when
857857
wanting to visualize the effect of changes to a *single*
858858
hyperparameter (which could be an iteration parameter). See, for
859859
example, [this section of the
860-
manual](https://alan-turing-institute.github.io/MLJ.jl/dev/learning_curves/)
860+
manual](https://juliaai.github.io/MLJ.jl/dev/learning_curves/)
861861
or [this
862862
tutorial](https://github.com/ablaom/MLJTutorial.jl/blob/dev/notebooks/04_tuning/notebook.ipynb).
863863
"""
@@ -898,7 +898,7 @@ show(iterated_pipe, 2)
898898
begin
899899
p1 = :(model.evo_tree_classifier.η)
900900
p2 = :(model.evo_tree_classifier.max_depth)
901-
901+
902902
r1 = range(iterated_pipe, p1, lower=-2, upper=-0.5, scale=x->10^x)
903903
r2 = range(iterated_pipe, p2, lower=2, upper=6)
904904
end
@@ -912,7 +912,7 @@ and `upper`.
912912
# ╔═╡ af3023e6-920f-478d-af76-60dddeecbe6c
913913
md"""
914914
Next, we choose an optimization strategy from [this
915-
list](https://alan-turing-institute.github.io/MLJ.jl/dev/tuning_models/#Tuning-Models):
915+
list](https://juliaai.github.io/MLJ.jl/dev/tuning_models/#Tuning-Models):
916916
"""
917917

918918
# ╔═╡ 93c17a9b-b49c-4780-9074-c069a0e97d7e
@@ -1105,9 +1105,9 @@ md"For comparison, here's the performance for the basic pipeline model"
11051105
begin
11061106
mach_basic = machine(pipe, X, y)
11071107
fit!(mach_basic, verbosity=0)
1108-
1108+
11091109
ŷ_basic = predict(mach_basic, Xtest);
1110-
1110+
11111111
@info("Basic model measurements on test set:",
11121112
brier_loss(ŷ_basic, ytest) |> mean,
11131113
auc(ŷ_basic, ytest),

0 commit comments

Comments
 (0)