-
Notifications
You must be signed in to change notification settings - Fork 4
added the controlsClass #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good and should do the job well. I think though that we should look to implement the procedure classes in pydantic - we will get all of the same functionality and save a LOT of lines of code. You can see how it works in "RAT/models.py"
edf088d
to
01d29de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've done a great job of using pydantic here, and it definitely makes for some cleaner code. Have a look at the comments here, and one they're sorted I'll have a closer look at the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, well done. Just a couple of minor points to address and then we're there!
This reverts commit 6f329ed.
Task List
ParallelOptions
Procedures
DisplayOptions
BoundHandlingOptions
StrategyOptions
BaseProcedure
with following properties:- parallel
- calcSldDuringFit
- resamPars
- display
Calculate
with following properties:- procedure
Simplex
with following properties:- procedure
- tolX
- tolFun
- maxFunEvals
- maxIter
- updateFreq
- updatePlotFreq
DE
with following properties:- procedure
- populationSize
- fWeight
- crossoverProbability
- strategy
- targetValue
- numGenerations
NS
with following properties:- procedure
- Nlive
- Nmcmc
- propScale
- nsTolerance
Dream
with following properties:- procedure
- nSamples
- nChains
- jumpProb originally named
lambda
in MATLAB- pUnitGamma
- boundHandling
ControlsClass
.__repr__
method.What kind of change does this PR introduce ?
What is the current behaviour ?
python
version of RAT lacked thecontrolClass
. Closes Add thecontrolsClass
#7What is the new behaviour ?
ControlsClass
in the python version of RAT which allows users to define the calculation settings.Does this PR introduce a breaking change ?
lambda
variable from MATLAB class is renamed in python version tojumpProb
.None
inboundHandlingOptions
enum from MATLAB is renamed in python version tooff
.Other Information
setProcedure
method from the MATLAB class is dropped in the python version.Usage
Create
ControlsClass
by passing procedure. If no procedure is provided then it is set toProcedures.Calculate
.Properties can be updated individually after
ControlsClass
is created.Properties can also be set when
ControlsClass
is created by passing**kwargs
.