Removed the minimum number of iterations as this would force the EM to continue despite bad starting points, lead to dubious results
The previous threshold argument has been replaced by two arguments: maximization and tolerance: The former controls whether the maximization phase is done (bool) the later controls the criteria at which the EM is stopped in terms of log likelihood (defaults to 1e-4 as seen in other HMM applications).
Related to the previous point, the EM has now a max_iteration parameter to control how much iteration to do before stopping if the previous stopping rule was not met
The fitted xarray object now contains the traces of the EM algorithm (fit.traces) also to inspect how the fit went
Added the possibility of estimating several models based on several provided parameters or magnitudes. If one of them is 3D (e.g. in the case of magnitudes iteration X events X channel), the single_fit function estimates one model per iteration. An additional parameter return_max controls whether only the highest likelihood model should be returned (True) or whether all should be returned (False). In the latter case the fitted object also contains an iteration dimension
compute_max_events() is now computed based on the provided location not on the expected event duration. This increases the number of events that can be estimated when calling the default backward_estimation
added a function to generate magnitudes randomly or through grid search
sliding_event() and fit() functions are still WIP
Minor:
Moved import pandas as pd outside of the single_fit function. Also replaced it with a call to the specific function needed
cpus is passed to fit_single to account for the fact that fit_single can also be paralellized f
Changed the ordering of parameters to EM and single_fit
corrected index on the max EM method
adapted location parameter based on simulations
Added the possibility to pass an average position for the event to scale_parameters() to estimate parameters from average positions, not in use yet
Major changes:
threshold
argument has been replaced by two arguments:maximization
andtolerance
: The former controls whether the maximization phase is done (bool) the later controls the criteria at which the EM is stopped in terms of log likelihood (defaults to1e-4
as seen in other HMM applications).max_iteration
parameter to control how much iteration to do before stopping if the previous stopping rule was not metfit.traces
) also to inspect how the fit wentiteration X events X channel
), thesingle_fit
function estimates one model per iteration. An additional parameterreturn_max
controls whether only the highest likelihood model should be returned (True) or whether all should be returned (False). In the latter case the fitted object also contains aniteration
dimensioncompute_max_events()
is now computed based on the provided location not on the expected event duration. This increases the number of events that can be estimated when calling the defaultbackward_estimation
Minor:
single_fit
function. Also replaced it with a call to the specific function neededfit_single
to account for the fact that fit_single can also be paralellized fEM
andsingle_fit
scale_parameters()
to estimate parameters from average positions, not in use yet