The linear_segment API reference#

bcpseg.bcpseg#

linear_segment.segment(values, labels=None, truncate=-100, cutoff=0.75, method='online_both', hazard=100, offset=10, shuffles=1000, p=0.05)[source]#

Implementation of a Bayesian Change Point Detection algorithm to segment values into Intervals

Parameters:
values : numpy.ndarray

Floats to segment

labels : numpy.ndarray

Labels for breakup segmentation

truncate : float

Tolerance during offline segmentation [default=-100]

cutoff : float

Probability threshold for determining segment bounds [default=0.75]

method : str

Method to use: offline, online, online_both [default:’online’]

hazard : float

Expected typical segment length [default:100]

offset : int

Number to skip before calculating probability [default:10]

shuffles : int

Number of shuffles conduct

p : double

Pvalue cutoff

Return type:

LabeledIntervalArray

Returns:

segmentsLabeledIntervalArray

Segment intervals