This is the documentation of the Python Module of TreeLas. For the Julia documentation see here.

TreeLas: a Fused Lasso Solver for Trees

The software herein aims to minimize the following objective function

\[f(x) = \frac{1}{2} \sum_{i=1}^n \mu_i (x_i - y_i)^2 + \sum_{(i,j) \in E} \lambda_{ij} |x_i - x_j|\]
Hereby is
  • \(y_i\) the input signal for node \(i\),
  • \(\mu_i \geq 0\) is the node weight for node \(i\),
  • \(E\) the edges, usually from a tree, and
  • \(\lambda_{ij} > 0\) is the edge weight for \((i,j)\).

Tree Edges

Information on tree edges (e.g. lambda) are encoded as vector of length n (albeit there are only n-1 edges). We do so because than the root node can be arbitrary and the i-th element lam[i] contains the information for edge (i, parent[i]).