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)
- SymbolicRegression.jl — registry update HOT 2
- Is the Averager documentation deprecated? HOT 2
- Update deprecated document example in "Transformers ..." section of manual
- `fit!` not exported in 0.19.3/0.19.4? HOT 2
- is there support for segmented or nested models? HOT 1
- Doc generation is failing silently HOT 2
- A de-correlation model for feature exclusion HOT 1
- [Tracking] Migration of measures MLJBase.jl -> StatisticalMeasures.jl HOT 1
- Add more examples of exported learning networks
- Confusing Julia code in adding_models_for_general_use.md HOT 1
- Include MLJBalancing.jl in MLJ and re-export it's names.
- Update docs for new class imbalance support
- 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
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.