Learn R Programming

dataprep (version 0.1.8)

optisolu: Find optimal combination of interval and times for condextr

Description

Searches over a grid of interval and times values to find the combination that yields better outlier removal than the traditional percentile method, based on sample deletion ratio (SDR), outlier removal ratio (ORR), and signal-to-noise ratio (SNR).

Usage

optisolu(data, cols = NULL, group = NULL, interval = 35, times = 10,
top = 0.995, top.error = 0.1, top.magnitude = 0.2,
bottom = 0.0025, bottom.error = 0.2, bottom.magnitude = 0.4,
by = "min", half = 30, date_col = NULL, cores = NULL,
verbose = FALSE)

Value

A data frame with columns: case, interval, times, sdr, orr, snr, index, relaindex, and optimal (logical).

Arguments

data

A data frame containing numeric columns and optionally a grouping column.

cols

Column indices or names of numeric variables.

group

Grouping column index or name.

interval

Maximum interval value to test (from 1 to interval).

times

Maximum times value to test (from 1 to times).

top

Top percentile threshold.

top.error

Error margin for the top threshold.

top.magnitude

Magnitude margin for the top threshold.

bottom

Bottom percentile threshold.

bottom.error

Error margin for the bottom threshold.

bottom.magnitude

Magnitude margin for the bottom threshold.

by

Time unit used when computing observation deletion.

half

Half window size in minutes for observation deletion.

date_col

Time column index or name.

cores

Number of CPU cores.

verbose

Logical; if TRUE, prints progress message.

Author

Chun-Sheng Liang <[email protected]>

Details

This function can be computationally intensive. It compares condextr results with percoutl results.

References

1. Example data is from https://smear.avaa.csc.fi/download. It includes particle number concentrations in SMEAR I Varrio forest.

Examples

Run this code
# \donttest{
optisolu(data[1:50, c(1, 4, 18:19)], cols = 3:4, group = 2,
         interval = 2, times = 1)
# }

Run the code above in your browser using DataLab