---
title: An Optimal Linear Time Algorithm for Quasi-Monotonic Segmentation
url: https://www.emergentmind.com/papers/0702142
type: paper
arxiv_id: '0702142'
arxiv_url: https://arxiv.org/abs/0702142
published: '2007-02-24'
categories:
- cs.DS
- cs.DB
---

# An Optimal Linear Time Algorithm for Quasi-Monotonic Segmentation

## Abstract

Monotonicity is a simple yet significant qualitative characteristic. We consider the problem of segmenting an array in up to K segments. We want segments to be as monotonic as possible and to alternate signs. We propose a quality metric for this problem, present an optimal linear time algorithm based on novel formalism, and compare experimentally its performance to a linear time top-down regression algorithm. We show that our algorithm is faster and more accurate. Applications include pattern recognition and qualitative modeling.