generate_sums

Module to calculates, stores and provides access to the sums that are used for the change point detection algorithm in the change_point module.

Written by Joshua Botha, University of Pretoria, Physics department.

Module Contents

Classes

CPSums

Calculates, stores and get's sum values.

Functions

calc_and_store_sums(n_min, n_max[, prog_fb])

main()

Just a test.

Attributes

__docformat__

logger

SUMS_VERSION

generate_sums.__docformat__ = "'NumPy'"[source]
generate_sums.logger = "'generate_sums'"[source]
generate_sums.SUMS_VERSION = '1.4'[source]
generate_sums.calc_and_store_sums(n_min: int, n_max: int, prog_fb: processes.ProcessProgFeedback = None)[source]
class generate_sums.CPSums(n_max: int = None, n_min: int = None, only_pickle: bool = False, prog_fb: processes.ProcessProgFeedback = None)[source]

Calculates, stores and get’s sum values.

_version = '1.4'[source]
prog_fb = 'None'[source]
_sums_u_k[source]
_sums_u_n_k[source]
_sums_v2_k[source]
_sums_v2_n_k[source]
_sums_sig_e[source]
_calc_sums() None[source]

Calculates the all the possible sums that might be used in the change_point module to detect change points.

_calc_and_store()[source]
get_u_k(n, k) numpy.float64[source]

Used to get the sum value for u_k.

Parameters:
  • n (int) – The number of points in segment.

  • k (int) – The number of the point in the segment being considered.

Returns:

sum_u_k – As defined just after eq. 6

Return type:

np.float64

get_u_k_n(n, k) numpy.float64[source]

Used to get the sum value for u_k_n.

Parameters:
  • n (int) – The number of points in segment.

  • k (int) – The number of the point in the segment being considered.

Returns:

sum_u_k – As defined just after eq. 6

Return type:

np.float64

get_v2_k(n, k) numpy.float64[source]

Used to get the sum value for v2_k.

Parameters:
  • n (int) – The number of points in segment.

  • k (int) – The number of the point in the segment being considered.

Returns:

sum_u_k – AAs defined just before eq. 7

Return type:

np.float64

get_v2_k_n(n, k) numpy.float64[source]

Used to get the sum value for v2_k_n.

Parameters:
  • n (int) – The number of points in segment.

  • k (int) – The number of the point in the segment being considered.

Returns:

sum_u_k – As defined just before eq. 7

Return type:

np.float64

get_sig_e(n) numpy.float64[source]

Used to get the sum value for sig_e.

Parameters:

n (int) – The number of points in segment.

Returns:

sum_u_k – As defined just before eq. 7

Return type:

np.float64

get_set(n, k)[source]

Returns a dict with all the sums, except for sig_e.

Parameters:
  • n (int) – The number of points in segment.

  • k (int) – The number of the point in the segment being considered.

Returns:

set_sums – Dict of sums

Return type:

dict

generate_sums.main()[source]

Just a test.