% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ph_distances.R
\name{persistence_landscape}
\alias{persistence_landscape}
\title{Persistence Landscape}
\usage{
persistence_landscape(ph, k_max = 5L, dimension = 1L, t_grid = NULL)
}
\arguments{
\item{ph}{A \code{persistent_homology} object or a data.frame with
columns \code{dimension}, \code{birth}, \code{death}.}

\item{k_max}{Maximum landscape index to compute (default 5). Must be a
single positive integer.}

\item{dimension}{Integer scalar -- which homology dimension to compute
the landscape for. Default 1.}

\item{t_grid}{Numeric vector of evaluation points. \code{NULL} (default)
uses an even grid of 200 points covering the union of pair intervals.}
}
\value{
A \code{persistence_landscape} object with:
\describe{
\item{landscape}{Data frame: \code{k}, \code{t}, \code{value}.}
\item{dimension}{Integer scalar.}
\item{k_max}{Integer scalar.}
\item{t_grid}{Numeric vector.}
}
}
\description{
Computes the persistence landscape (Bubenik 2015) from a persistence
diagram. Each (birth, death) pair contributes a tent function
\deqn{\Lambda_{(b,d)}(t) = \max(0, \min(t - b, d - t)).}
The \eqn{k}-th landscape function \eqn{\lambda^{(k)}(t)} is the
\eqn{k}-th largest of \eqn{\{\Lambda_{(b_i,d_i)}(t)\}_i} at each
\eqn{t}. Landscapes are stable under bottleneck distance and form a
Banach-space embedding of persistence diagrams.
}
\examples{
mat <- matrix(c(0, .6, .5, .6, 0, .4, .5, .4, 0), 3, 3)
rownames(mat) <- colnames(mat) <- c("A","B","C")
ph <- persistent_homology(mat, n_steps = 5)
pl <- persistence_landscape(ph, k_max = 3, dimension = 0)

}
\references{
Bubenik, P. (2015). Statistical topological data analysis using
persistence landscapes. \emph{Journal of Machine Learning Research}
\strong{16}, 77-102.
}
