HSC_PC_Binning {SeqDetect}R Documentation

Binning pre-classifier

Description

Extends the HSC_PC abstract class.

Usage

HSC_PC_Binning(min_value, max_value, bins, value_field)

Arguments

min_value

(numeric) - Minimal value.

max_value

(numeric) - Maximal value:

bins

(integer) - A number of bins that needs to be created.

value_field

(character) - The name of the value field in the input event stream.

Details

A pre-classifier takes performs binning on a value field of the input event stream.

Examples

event_stream <- data.frame(product=c("P45","P134","P45","P134","P134","P45","P134"),
                           sales=c(2,12,18,16,18,24,8),
                           alert=c(NA,NA,NA,NA,NA,"Alert P45","Alert P134"))
pc <- HSC_PC_Binning(0,100,40,"sales")
cons_stream <- classify(pc,event_stream)
# Minimal value = 0, Maximal value = 100, 40 bins, values taken from the field named *sales*

[Package SeqDetect version 1.0.7 Index]