# idTreePartition

Tree-partitioned nonlinear function for nonlinear ARX models

## Description

An `idTreePartition`

object implements a tree-partitioned
nonlinear function, and is a nonlinear mapping function for estimating nonlinear ARX models.
The mapping function, which is also referred to as a *nonlinearity*, uses
a combination of linear weights, an offset and a nonlinear function to compute its output. The
nonlinear function contains `idTreePartition`

unit functions
that operate on a radial combination of inputs.

Mathematically, `idTreePartition`

is a nonlinear function $$y=F(x)$$ that maps *m* inputs
*X*(*t*) =
[*x*(*t*_{1}),*x*_{2}(*t*),…,*x _{m}*(

*t*)]

^{T}to a scalar output

*y*(

*t*).

*F*is a piecewise-linear (affine) function of

*x*:

$$F(x)=xL+[1,x]{C}_{k}+d$$

Here, *x* belongs to the partition
*P _{k}*.

*L*is a 1-by-

*m*vector,

*C*is a 1-

_{k}*by*-

`m`

+1 vector, and
*P*is a partition of the

_{k}*x*-space.

For more information about the mapping function *F*(*x*)
see Algorithms.

Use `idTreePartition`

as the value of the `OutputFcn`

property of an `idnlarx`

model. For example, specify
`idTreePartition`

when you estimate an `idnlarx`

model with
the following
command.

sys = nlarx(data,regressors,idTreePartition)

`nlarx`

estimates the model, it essentially estimates the parameters
of the `idTreePartition`

function.
You can configure the `idTreePartition`

function to fix parameters. To omit
the linear component, set `LinearFcn.Use`

to `false`

. Use
`evaluate`

to compute the output of the function for a given vector of
inputs.

## Creation

### Description

creates a
`T`

= idTreePartition`idTreePartition`

object `t`

that is a binary tree
nonlinear mapping object. The function computes the number of tree nodes
*J*, represented by the property `NumberOfUnits`

,
automatically during estimation. The tree has the number of leaves equal to
`2^(J+1)-1`

.

specifies the number of `T`

= idTreePartition(`numUnits`

)`idTreePartition`

nodes
`numUnits`

.

### Input Arguments

## Properties

## Examples

## Algorithms

The mapping *F* is defined by a dyadic partition *P* of
the *x*-space, such that on each partition element
*P _{k}*,

*F*is a linear mapping. When

*x*belongs to

*P*,

_{k}*F*(

*x*) is given by:

$$F(x)=xL+[1,x]{C}_{k}+d$$

where *L* is 1-by-*m* vector and
*d* is a scalar common for all elements of partition.
*C*_{k} is a 1-by-(*m*+1)
vector.

The mapping *F* and associated partition *P* of the
*x*-space are computed as follows:

Given the value of

*J*, a dyadic tree with*J*levels and*N*= 2^{J–1}nodes is initialized.Each node at level 1 <

*j*<*J*has two descendants at level*j*+ 1 and one parent at level*j*– 1.The root node at level 1 has two descendants.

Nodes at level

*J*are terminating leaves of the tree and have one parent.

One partition element is associated to each node

*k*of the tree.The vector of coefficients

*C*is computed using the observations on the corresponding partition element_{k}*P*by the penalized least-squares algorithm._{k}When the node

*k*is not a terminating leaf, the partition element*P*_{k}is cut into two to obtain the partition elements of descendant nodes. The cut is defined by the half-spaces (1,*x*)*B*> 0 or <=0 (move to left or right descendant), where_{k}*B*is chosen to improve the stability of least-square computation on the partitions at the descendant nodes._{k}

When the value of the mapping

*F*, defined by the`idTreePartition`

object, is computed at*x*, an adaptive algorithm selects the*active node**k*of the tree on the branch of partitions that contain*x*.

When the `Focus`

option in `nlarxOptions`

is `'prediction'`

,
`idTreePartition`

uses a noniterative technique for estimating
parameters. Iterative refinements are not possible for models containing this nonlinearity
estimator.

You cannot use `idTreePartition`

when `Focus`

is
`'simulation'`

because this nonlinear mapping object is not differentiable.
Minimization of simulation error requires differentiable nonlinear functions.

## Version History

**Introduced in R2007a**