Skip to content

Commit 4d23c37

Browse files
gd1989gd1989tlienart
authored
Tuning strategy components (#73)
* Tuning strategy components I think it what a tuning strategy entails could be stated explicitly * Update A-model-tuning.jl Incorporating @abloam's suggestion for the description of the tuning strategy. * Update A-model-tuning.jl * Update A-model-tuning.jl Co-authored-by: gd1989 <[email protected]> Co-authored-by: Thibaut Lienart <[email protected]>
1 parent 98555ba commit 4d23c37

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

_literate/A-model-tuning.jl

+9-1
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,18 @@ r = range(dtc, :max_depth, lower=1, upper=5)
2727
# For hyperparameters of type `<:Real`, you should specify a range of values as done above.
2828
# For hyperparameters of other type (e.g. `Symbol`), you should use the `values=...` keyword.
2929
#
30-
# Once a range of values has been defined, you can then wrap the model in a `TunedModel` specifying the tuning strategy:
30+
# Once a range of values has been defined, you can then wrap the model in a `TunedModel` specifying the tuning strategy.
3131

3232
tm = TunedModel(model=dtc, ranges=[r, ], measure=cross_entropy)
3333

34+
# Note that "wrapping a model in a tuning strategy" as above means creating a new "self-tuning" version of the model, `tuned_model = TunedModel(model=...)`, in which further key-word arguments specify:
35+
# 1. the algorithm (a.k.a., tuning strategy) for searching the hyper-parameter space of the model (e.g., `tuning = Random(rng=123)` or `tuning = Grid(goal=100)`).
36+
# 2. the resampling strategy, used to evaluate performance for each value of the hyper-parameters (e.g., `resampling=CV(nfolds=9, rng=123)` or `resampling=Holdout(fraction_train=0.7)`).
37+
# 3. the measure (or measures) on which to base performance evaluations (and for reporting purposes) (e.g., `measure = rms` or `measures = [rms, mae]`).
38+
# 4. the range, usually describing the "space" of hyperparameters to be searched (but more generally whatever extra information is required to complete the search specification, e.g., initial values in gradient-descent optimization).
39+
40+
# For more options do `?TunedModel`.
41+
3442
# ### Fitting and inspecting a tuned model
3543
#
3644
# To fit a tuned model, you can use the usual syntax:

0 commit comments

Comments
 (0)