Skip to content

Commit

Permalink
Merge pull request #20 from alan-turing-institute/dev
Browse files Browse the repository at this point in the history
For 0.2.0 release
  • Loading branch information
ablaom authored Mar 11, 2020
2 parents 853b394 + b02d06a commit c64bff7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MLJTuning"
uuid = "03970b2e-30c4-11ea-3135-d1576263f10f"
authors = ["Anthony D. Blaom <[email protected]>"]
version = "0.1.4"
version = "0.2.0"

[deps]
ComputationalResources = "ed09eef8-17a6-5b46-8889-db040fac31e3"
Expand All @@ -12,7 +12,7 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"

[compat]
ComputationalResources = "^0.3"
MLJBase = "^0.11"
MLJBase = "^0.12"
RecipesBase = "^0.8"
julia = "^1"

Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ tuning strategy should like to handle, and the tuning strategy
functions to be implemented are dispatched on these types. Here are
the range objects supported by `Grid`:

- one-dimensional `NumericRange` or `NominalRange` objects (these
types are provided by MLJBase)
- one-dimensional `NumericRange` or `NominalRange` objects (of
abstract type `ParamRange`) provided by MLJBase.

- a tuple `(p, r)` where `p` is one of the above range objects, and
`r` a resolution to override the default `resolution` of the
Expand All @@ -296,15 +296,19 @@ the range objects supported by `Grid`:
where `r1` and `r2` are `NumericRange` objects and `r3` a
`NominalRange` object.

Both `NumericRange` and `NominalRange` are constructed with the
`MLJBase` extension to the `range` function. Use the `iterator` and
`sampler` methods to convert ranges into one-dimensional grids or for
random sampling, respectively. See the docstrings for details.

Recall that `NominalRange` has a `values` field, while `NumericRange`
has the fields `upper`, `lower`, `scale`, `unit` and `origin`. The
`unit` field specifies a preferred length scale, while `origin` a
preferred "central value". These default to `(upper - lower)/2` and
`(upper + lower)/2`, respectively, in the bounded case (neither `upper
= Inf` nor `lower = -Inf`). The fields `origin` and `unit` are used in
generating grids for unbounded ranges (and could be used in other
strategies - for fitting two-parameter probability distributions, for
example).
generating grids or fitting probability distributions to unbounded
ranges.

A `ParamRange` object is always associated with the name of a
hyperparameter (a field of the prototype in the context of tuning)
Expand Down
3 changes: 0 additions & 3 deletions src/ranges.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# TODO: move this next line to MLJBase:
MLJBase.iterator(r::NominalRange, ::Nothing) = iterator(r)

"""
MLJTuning.grid([rng, ] prototype, ranges, resolutions)
Expand Down

0 comments on commit c64bff7

Please sign in to comment.