Table of Contents
Fetching ...

Template-Based Piecewise Affine Regression

Guillaume O. Berger, Sriram Sankaranarayanan

TL;DR

An overall approach is derived that provides optimal PWA models for a given error tolerance, where optimality refers to minimizing the number of pieces of the PWA model.

Abstract

We investigate the problem of fitting piecewise affine functions (PWA) to data. Our algorithm divides the input domain into finitely many polyhedral regions whose shapes are specified using a user-defined template such that the data points in each region are fit by an affine function within a desired error bound. We first prove that this problem is NP-hard. Next, we present a top-down algorithm that considers subsets of the overall data set in a systematic manner, trying to fit an affine function for each subset using linear regression. If regression fails on a subset, we extract a minimal set of points that led to a failure in order to split the original index set into smaller subsets. Using a combination of this top-down scheme and a set covering algorithm, we derive an overall approach that is optimal in terms of the number of pieces of the resulting PWA model. We demonstrate our approach on two numerical examples that include PWA approximations of a widely used nonlinear insulin--glucose regulation model and a double inverted pendulum with soft contacts.

Template-Based Piecewise Affine Regression

TL;DR

An overall approach is derived that provides optimal PWA models for a given error tolerance, where optimality refers to minimizing the number of pieces of the PWA model.

Abstract

We investigate the problem of fitting piecewise affine functions (PWA) to data. Our algorithm divides the input domain into finitely many polyhedral regions whose shapes are specified using a user-defined template such that the data points in each region are fit by an affine function within a desired error bound. We first prove that this problem is NP-hard. Next, we present a top-down algorithm that considers subsets of the overall data set in a systematic manner, trying to fit an affine function for each subset using linear regression. If regression fails on a subset, we extract a minimal set of points that led to a failure in order to split the original index set into smaller subsets. Using a combination of this top-down scheme and a set covering algorithm, we derive an overall approach that is optimal in terms of the number of pieces of the resulting PWA model. We demonstrate our approach on two numerical examples that include PWA approximations of a widely used nonlinear insulin--glucose regulation model and a double inverted pendulum with soft contacts.
Paper Structure (23 sections, 8 theorems, 8 equations, 8 figures)

This paper contains 23 sections, 8 theorems, 8 equations, 8 figures.

Key Result

theorem 4

The decision version of problem prob:PWAR is NP-hard, even for $q=2$ and rectangular templates.

Figures (8)

  • Figure 1: (a) Illustration of our algorithm on a simple data set with $11$ data points $(x_k, y_k) \in \mathbb{R} \times \mathbb{R}$ and (b) the index sets explored by our algorithm.
  • Figure 2: Template-based piecewise affine (TPWA) regression. (a), (c): Data points $(x_k,y_k)\in\mathbb{R}^2\times\mathbb{R}$. (b), (d): TPWA fit with rectangular domains and error tolerance $\epsilon$.
  • Figure 3: $\textsc{FindSubsets}$ implemented by Algorithm \ref{['algo:subdivision-cert']} with rectangular regions. The red dots represent the infeasibility certificate $C$. Each $I_s$ excludes at least one point from $C$ by moving one face of the box but keeping the others unchanged.
  • Figure 4: Glucose--insulin system. (a): $100$ sampled points (black dots) on the graph of $U_{\mathrm{id}}$ (surface). (b), (c), (d): Optimal TPWA regression for various error tolerances $\epsilon$. (e): Simulations using the nonlinear model versus the PWA approximations. (f): Error between nonlinear and PWA models averaged over $50$ simulations with different initial conditions.
  • Figure 5: Inverted double pendulum with soft contacts. (a): Elastic contact forces apply when $\theta$ is outside gray region, (b): Optimal TPWA regression of the data with rectangular domains. (c): Comparison with MILP approach for SA regression. Time limit is set to $1000$ secs.
  • ...and 3 more figures

Theorems & Definitions (18)

  • theorem 4: NP-hardness
  • theorem 5: Polynomial complexity in $K$
  • definition 1: Maximal compatible index set
  • definition 2: Consistency
  • theorem 6: Correctness of Algorithm \ref{['algo:top-down']}
  • definition 3: Infeasibility certificate
  • lemma 1
  • proof
  • theorem 7: Optimal TPWA regression
  • proof
  • ...and 8 more