tspy.data_structures.observations.Segment module¶
- 
class tspy.data_structures.observations.Segment.Segment(tsc, j_observations, start=None, end=None)¶
- Bases: - tspy.data_structures.observations.ObservationCollection.ObservationCollection- A special form of observation-collection which holds additional information as to how the segment was created. Segments are usually created through the use of a segmentation transform. - Notes - a segments start/end need not equal its first/last time-tick - Methods - Java()- mapping to a compatible class in Java via Py4J - ceiling(time_tick)- get the ceiling observation for the given time-tick. - contains(time_tick)- Checks for containment of time-tick within the collection - first()- get the first observation in this collection. - floor(time_tick)- get the floor observation for the given time-tick. - higher(time_tick)- get the higher observation for the given time-tick. - is_empty()- checks if there is any observation - last()- get the last observation in this collection. - lower(time_tick)- get the lower observation for the given time-tick. - to_time_series([granularity, start_time])- convert this collection to a time-series - toString - 
property end¶
- Returns
- int
- end time-tick of window at instantiation time 
 
 
 - 
property observations¶
- Returns
- ObservationCollection
- the underlying collection of observations in this segment 
 
 
 - 
property start¶
- Returns
- int
- start time-tick of window at instantiation time 
 
 
 - 
toString()¶
 
- 
property