Learn R Programming

fpmoutliers (version 0.1.0)

visualizeInstance: Visualization of a data instance using a set of barplots

Description

Visualization of a data instance using a set of barplots

Usage

visualizeInstance(data, instanceIndex, bars = 10)

Arguments

data

data.frame with data describing all instances

instanceIndex

index of the instance to visualize

bars

max number of bars to plot, only top lowest and top highest frequencies will be presented

Examples

Run this code
# NOT RUN {
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),]
visualizeInstance(dataFrame, 1) # instance with the highest anomaly score
visualizeInstance(dataFrame, nrow(dataFrame)) # instance with the lowest anomaly score
# }

Run the code above in your browser using DataLab