Skip to content

Latest commit

 

History

History
65 lines (65 loc) · 5.63 KB

File metadata and controls

65 lines (65 loc) · 5.63 KB

#TODO:

  • Prioritised changes
    • Overload for gradient compat: to_vec(), from_vec_transform(), to_linked_vec_transform(), from_linked_vec_transform()
    • Optimise RegressionPrior
      • Minimise use of DimensionalData where not needed
    • add initialised flag for terms in RegressionPredictors, which stores which terms have been initialised. Interactions with unitialised dependencies are not updated. linear_combination does not work if there are uninitialised terms. get_term_values does not work if used on uninitialised terms.
    • Ensure that DualNumbers can be used throughout
  • Planned features?
    • Ordinal predictors (more complicated - similar to monotonic effects in brms. Seems doable, but needs to be able to parameterise basis term expansions)
    • Ordinal outcomes (just a different likelihood)
    • Decompositions of the predictors (QR decomposition, Orthogonal polar decomposition)
    • Allow sharing parameters across regressions (e.g., fixed effects being identical in multiple regressions)
  • Optimisation
    • Ensure type stability
    • Pre-allocate random effect block assignments
    • Set full, concrete type requirements everywhere possible
  • Utilities
    • Make getter functions for random effect hyperparameters
    • Make RegressionPrior modular, so that differnet components can be sampled one at a time
    • Constructor for RegressionPrior which
      • construct multivariate distributions from individual priors_f
      • creates default priors or extrapolates single priors to full structure
      • checks that the inputs are all properly structured and matching
      • allows for using symbols to define the levels assignments (these are then transformed into integers)
    • Constructor for RegressionPredictors which
      • initialises the RegressionPredictors by using update_variables
    • Constructor for DistributionLikelihood
    • Custom summary and plotting functionalities (FlexiChains & MCMCChains)
    • Make Turing submodel alternative to rand and logpdf (and benchmark)
    • Make constructor for combining multivariate distributions so that they sample vectors
  • Fixes
    • Add comments with canonical mathematical notation
    • Change comments to docstrings throughout
    • Remove where{} from function type signatures throughout
  • Preconstructed functionalities
    • Spike-and-slab prior distribtution
    • Horseshoe prior distribution
    • Variance Component Analysis prior distribtution (letting random effect sd priors come from a multivariate distribution which can weigh between them).
    • Standard spline expansion (i.e., an extensions for the spline package)
    • Standard Gaussian process submodel
    • Standard autporegressive submodel
  • Usage examples
    • Make example with Horseshoe priors
    • Make example with Spike-and-slab priors
    • Make example with a latent mixture model
    • Make example with multi-step Turing model
    • Make example with splines / polynomial terms
    • Make example with sequential sampling model as likelihood
    • Make example with custom likelihoods, interaction operators and expansion functions
  • Long-future and difficult features
    • Non-parametric, infinite mixture, Dirichlet process models etc (i.e., where not just the level assignments, but also the number of levels, is created inside the Turing model)
    • Allow for estimating group memberships of random effect levels inside the Turing model
  • Not planned features
    • "Category-specific random effects", where there can be random effects for only some levels of a categorical predictor (e.g., Treatment_High)
  • Things to consider
    • Use SparseArrays? LazyArrays?
    • Change naming: fixed/random to population/group ?
    • brms feature: Multi-membership (i.e., an observation can be two random effect levels, and the random effect for that observationis the average or weighted sum of the two levels it belongs to)
    • brms feature: Meta-analysis (This needs to able to take standard errors and stuff and go from there)
    • brms feature: Weighted regression (different weights on different observations, I think by multiplying the logprobs actually)
    • brms feature: Mixture models (i.e., where multiple distributions are combined in the likelihood, I think)
    • brms feature: Re-parameterise the intercept: (brms documentation): By default, the population-level intercept (if incorporated) is estimated separately and not as part of population-level parameter vector b As a result, priors on the intercept also have to be specified separately. Furthermore, to increase sampling efficiency, the population-level design matrix X is centered around its column means X_means if the intercept is incorporated. This leads to a temporary bias in the intercept equal to <X_means, b>, where <,> is the scalar product. The bias is corrected after fitting the model, but be aware that you are effectively defining a prior on the intercept of the centered design matrix not on the real intercept. You can turn off this special handling of the intercept by setting argument center to FALSE. For more details on setting priors on population-level intercepts, see set_prior.This behavior can be avoided by using the reserved (and internally generated) variable Intercept. Instead of y ~ x, you may write y ~ 0 + Intercept + x. This way, priors can be defined on the real intercept, directly. In addition, the intercept is just treated as an ordinary population-level effect and thus priors defined on b will also apply to it. Note that this parameterization may be less efficient than the default parameterization discussed above.
    • What should be the value in matrices with un-initialised values? 0, undef or missing?
    • What do we do with missing values in the predictors? Set them to undef, 0, drop them, or return an error? How about NaN?