Key aim is to add new classes so that things can get done a bit more elegantly.
Add a new Stochastic variable class
This will be similar to the mcmc.univariate, but streamlined a bit
[x] add Stochastic class
Deterministic Function class
This will embody our important functions, such as magnitude effect, psychometric functions. But it's parameters will consist of stochastic variables, and have plotting functions.
[x] Make DeterministicFunction's easier to instantiate, by passing a structure of samples in upon construction
Update the plotting code
These new classes should make plotting much easier. We can hopefully get rid of a bunch of code, such as the packaging up of intermediate data structures for plotting purposes.
[x] Experiment plotting code now goes in the Hyperbolic1 / HyperbolicME abstract classes which define things to do with the discount function
New abstract subclasses of Model to deal with different discount function types
These new abstract subclasses will take the abstract base class (Model) and make it specialised for a new discount function type.
[x] Add Hyperbolic1
[x] Add Hyperbolic1MagEffect
[x] Add Exponential1
[x] Get Exponential models working
[x] cover exponential models in the tests
This should allow for very easy creation of new models
Should be able to create new abstract subclasses of Model which deal with different discount functions.
Will need a concrete model subclass of this.
Will need a JAGS model
But that should be about it.
Remaining tasks
[x] Plotting of discount surface in DFHyperbolicMagnitideEffect
[x] Get quality of plots back up to speed to where they were
[x] Don't evaluate/plot ALL samples
[x] Make sure I've implemented encapsulation for the new classes
Plotting data on discount functions
Get data points plotting on discount functions again. This has temporarily disappeared under the new arrangement. A good way to do it would be to have the DiscountFunction class have a data property, which itself will be an object of trial data which knows how to plot itself appropriately.
[x] plotting of data on 1D discount functions (hyperbolic / exponential)
[x] plotting of data on 1D discount functions (non-parametric)
[x] plotting of data on 2D discount functions (i.e. magnitude effect)
Changes to plotting of deterministic functions?
[x] Plot point estimates in the DeterministicFunctions
Key aim is to add new classes so that things can get done a bit more elegantly.
Add a new Stochastic variable class
This will be similar to the mcmc.univariate, but streamlined a bit
Deterministic Function class
This will embody our important functions, such as magnitude effect, psychometric functions. But it's parameters will consist of stochastic variables, and have plotting functions.
Update the plotting code
These new classes should make plotting much easier. We can hopefully get rid of a bunch of code, such as the packaging up of intermediate data structures for plotting purposes.
New abstract subclasses of Model to deal with different discount function types
These new abstract subclasses will take the abstract base class (Model) and make it specialised for a new discount function type.
This should allow for very easy creation of new models Should be able to create new abstract subclasses of Model which deal with different discount functions. Will need a concrete model subclass of this. Will need a JAGS model But that should be about it.
Remaining tasks
DFHyperbolicMagnitideEffect
Plotting data on discount functions Get data points plotting on discount functions again. This has temporarily disappeared under the new arrangement. A good way to do it would be to have the
DiscountFunction
class have a data property, which itself will be an object of trial data which knows how to plot itself appropriately.Changes to plotting of deterministic functions?