From 94b35816ba76a7885db61489fcf1c8258164dc4d Mon Sep 17 00:00:00 2001 From: dicook Date: Wed, 26 Jun 2024 00:23:45 +1000 Subject: [PATCH] only change to norm_bin docus --- man/anomaly_index.Rd | 12 +++++++ man/guided_anomaly_tour.Rd | 67 ++++++++++++++++++++++++++++++++++++++ man/mahal_dist.Rd | 18 ++++++++++ man/norm_bin.Rd | 4 +-- 4 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 man/anomaly_index.Rd create mode 100644 man/guided_anomaly_tour.Rd create mode 100644 man/mahal_dist.Rd diff --git a/man/anomaly_index.Rd b/man/anomaly_index.Rd new file mode 100644 index 00000000..299c5b01 --- /dev/null +++ b/man/anomaly_index.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/anomaly-pursuit.r +\name{anomaly_index} +\alias{anomaly_index} +\title{Anomaly index.} +\usage{ +anomaly_index() +} +\description{ +Calculates an index that looks for the best projection of +observations that are outside a pre-determined p-D ellipse. +} diff --git a/man/guided_anomaly_tour.Rd b/man/guided_anomaly_tour.Rd new file mode 100644 index 00000000..a9e81f27 --- /dev/null +++ b/man/guided_anomaly_tour.Rd @@ -0,0 +1,67 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/tour-guided-anomaly.r +\name{guided_anomaly_tour} +\alias{guided_anomaly_tour} +\title{A guided anomaly tour path.} +\usage{ +guided_anomaly_tour( + index_f, + d = 2, + alpha = 0.5, + cooling = 0.99, + max.tries = 25, + max.i = Inf, + ellipse, + ellc = NULL, + ellmu = NULL, + search_f = search_geodesic, + ... +) +} +\arguments{ +\item{index_f}{the section pursuit index function to optimise. The function +needs to take two arguments, the projected data, indexes of anomalies.} + +\item{d}{target dimensionality} + +\item{alpha}{the initial size of the search window, in radians} + +\item{cooling}{the amount the size of the search window should be adjusted +by after each step} + +\item{max.tries}{the maximum number of unsuccessful attempts to find +a better projection before giving up} + +\item{max.i}{the maximum index value, stop search if a larger value is found} + +\item{ellipse}{pxp variance-covariance matrix defining ellipse, default NULL. +Useful for comparing data with some hypothesized null.} + +\item{ellc}{This can be considered the equivalent of a critical value, used to +scale the ellipse larger or smaller to capture more or fewer anomalies. Default 3.} + +\item{ellmu}{This is the centre of the ellipse corresponding to the mean of the +normal population. Default vector of 0's} + +\item{search_f}{the search strategy to use} + +\item{...}{arguments sent to the search_f} +} +\description{ +The guided anomaly tour is a variation of the guided tour that is +using an ellipse to determine anomalies on which to select target planes. +} +\details{ +Usually, you will not call this function directly, but will pass it to +a method that works with tour paths like \code{\link{animate_slice}}, +\code{\link{save_history}} or \code{\link{render}}. +} +\examples{ +animate_xy(flea[, 1:6], guided_anomaly_tour(anomaly_index(), + ellipse=cov(flea[,1:6])), ellipse=cov(flea[,1:6]), axes="off") +} +\seealso{ +\code{\link{slice_index}} for an example of an index functions. +\code{\link{search_geodesic}}, \code{\link{search_better}}, + \code{\link{search_better_random}} for different search strategies +} diff --git a/man/mahal_dist.Rd b/man/mahal_dist.Rd new file mode 100644 index 00000000..7a67a42b --- /dev/null +++ b/man/mahal_dist.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/linear-algebra.r +\name{mahal_dist} +\alias{mahal_dist} +\title{Calculate the Mahalanobis distance between points and center.} +\usage{ +mahal_dist(x, vc) +} +\arguments{ +\item{x}{matrix of data} + +\item{vc}{pre-determined variance-covariance matrix} +} +\description{ +Computes the Mahalanobis distance using a provided variance-covariance +matrix of observations from 0. +} +\keyword{algebra} diff --git a/man/norm_bin.Rd b/man/norm_bin.Rd index 390c2045..1a7376f9 100644 --- a/man/norm_bin.Rd +++ b/man/norm_bin.Rd @@ -14,11 +14,11 @@ norm_kol(nr) } \description{ Compares the similarity between the projected distribution and a normal distribution. -\itemize{ +} +\details{ \item norm_bin: compares the count in 100 histogram bins \item norm_kol: compares the cdf based on the Kolmogorov–Smirnov test (KS test) } -} \examples{ # manually compute the norm_kol index # create the index function