Costs and savings#

Costs#

cost_factory(cost)

Return cost function and its initializer.

init_mean_cost(X)

Precompute sums and weights for mean_cost.

mean_cost(precomputed_params, starts, ends)

Calculate the Gaussian mean likelihood cost for each segment.

Savings#

saving_factory(saving)

Return saving function and its initializer.

init_mean_saving(X)

Precompute sums and weights for mean_saving.

mean_saving(precomputed_params, starts, ends)

Calculate the Gaussian mean likelihood saving for each segment.