describeInstance: Explain the instance/outlier by a brief textual summary

Description Usage Arguments Examples

Description

Explain the instance/outlier by a brief textual summary

Usage

1
describeInstance(data, model, instanceIndex, topN = 10)

Arguments

data

data.frame with data describing all instances

model

outlier detection model

instanceIndex

index of the instance to visualize

topN

limit for a print of top matching frequent itemsets

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library("fpmoutliers")
dataFrame <- read.csv(
     system.file("extdata", "fp-outlier-customer-data.csv", package = "fpmoutliers"))
model <- FPI(dataFrame, minSupport = 0.001)
# sort data by the anomaly score
dataFrame <- dataFrame[order(model$scores, decreasing = TRUE),]
# instance with the highest anomaly score
describeInstance(dataFrame, model, 1)
# instance with the lowest anomaly score
describeInstance(dataFrame, model, nrow(dataFrame))

fpmoutliers documentation built on May 2, 2019, 8:53 a.m.