Comments (2)
This is how I would handle nested parameters:
Nested lists of pairs, constructed using a new Pairs
type, are used
to represent both fully expanded "values" of some (possibly composite)
model, as well as the iterators generating values to be resampled.
So, suppose we have a composite model with declaration
mutatable struct SomeComposite <: Supervised
outer1
outer2
model::SomeModel
end
where outer1
and outer2
are numerical and SomeModel
has declaration
mutable struct SomeModel <: Supervised
inner1
inner2
end
Then for some composite::SomeComposite
the call get_params(composite)
returns
Pairs(:outer1 => 2.3, :outer2 => 42, :model => Pairs(:inner1 => 1, :inner2 => -1))
There will be a corresponding set_params!
method which mutates a given model according to the nested sequence passed (which need not be "fully populated" - we can just change some of the parameters of our model).
To specify ranges of parameter values we specify iterators (either deterministic or
stochastic) instead of values. Supposing we only want to tune some parameters, we might set
grid = Pairs(:outer2 => iter_out2, :model => Pairs(:inner1 => iter_in1))
In place of iterators we could use the existing
makeNumericalParam()
, etc, constructs, from which iterators of the right kind could then generated.
To carry out tuning, all we need are two other methods I can write
out: (i) one to flatten out values (without the symbolic keys) in a
nested sequence of pairs (returns a tuple of values); and (ii) one to
insert flat values into (a copy of) some compatible nested sequence (which can then be used to mutate a model object with set_params!
)
The reason we need the Pairs
type instead of just using nested
tuples is that we need distinguish bewteen tuples describing our nested
structure from tuples that are actually parameters of some kind.
(I'm not stuck on the name Pairs
. It's just that a => b
has type Pair
in Julia.)
from mlj.jl.
Closing as no objections raised and now implemented.
from mlj.jl.
Related Issues (20)
- Add new sk-learn models to the docs
- Export the name `MLJFlow` HOT 1
- `evaluate` errors HOT 3
- Add AutoEncoderMLJ model (part of BetaML) HOT 10
- need a tutorial for using logger with dagshub and mlflow HOT 4
- Document how to add plot recipes in a new model implementation HOT 4
- Add new model descriptors to fix doc-generation fail HOT 1
- Two models fail integration tests but defy isolation
- Update list of BetaML models HOT 1
- Reinstate CatBoost integraton test
- Upate ROADMAP.md HOT 1
- Improve documentation by additional hierarchy HOT 5
- Include support for MixedModels.jl HOT 2
- Deserialisation fails for wrappers like `TunedModel` when atomic model overloads `save/restore` HOT 2
- feature_importances for Pipeline including XGBoost don't work HOT 2
- Current performance evaluation objects, recently added to TunedModel histories, are too big HOT 2
- Update cheat sheet instance of depracated `@from_network` code
- Requesting better exposure to MLJFlux in the model browser HOT 2
- Reexport `CompactPerformanceEvaluation` and `InSample`
- Remove `info(rms)` from the cheatsheet HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlj.jl.