1. A method for automating or partially automating a process in the hydrocarbon industry, where the hydrocarbon-industry-process is subject to a change in one or more operating conditions, can be controlled by at least one parameter and is monitored by at least one sensor providing an input data stream, comprising: receiving the stream of input data from the at least one sensor; upon receiving a new data item in the input data stream, using a processor to postulate that the input data stream is segmented according to a plurality of possible segmentations, wherein each of the plurality of possible segmentations comprises a plurality of segments divided by one or more changepoints, and wherein the changepoints are indicative of a change in at least one of the one or more operating conditions; evaluating each of the plurality of possible segmentations by: fitting portions of the input data corresponding to each segment in the segmentation being evaluated to a model corresponding to the each segment in the segmentation being evaluated; and determining how well the models for the segments of the segmentation being evaluated fit the portions of the input data corresponding to each segment of the segmentation being evaluated; generating an output from at least one of the plurality of possible segmentations and the models corresponding to the segments of the at least one of the plurality of possible segmentations; and using the output to control at least one parameter of the hydrocarbon industry process.