Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 1.34 KB

CONTRIBUTE.md

File metadata and controls

20 lines (12 loc) · 1.34 KB

Contributions

If you have a method that fits within this framework it is quite simple to add to the current codebase, which takes care of some convenience issues like output form, dealing with labels, etc. The basic structure of the code is to have a parent class that defines the expectation step while a child class defines the dataset-specific optimization.

MT_baseclass

This class implements a parent class that has methods which define update operations for a Gaussian distribution given samples as explained in the paper. It needs to be called from an inheriting class that has the fit_model method. To extend this class simply inherit and alter the fit_prior function.

MT_linear

This class implements the likelihood computation and is used as the external interface to the code (for usage, see testscript.m). It passes on the appropriate arguments to its parent class and performs all data safety steps as well as pre-processing. In order to access the output of the parent function it accesses the property obj.prior. To extend the functionality it is sufficient to re-implement the following functions:

  1. fit_model
  2. fit_new_task
  3. loss
  4. predict

MT_logistic

This is an example of an extension of MT_linear (see Fiebig et al. 2016) which shows how new algorithms can be implemented with relatively little code.