HSC_PC_Binning: Binning pre-classifier

Description Usage Arguments Details Examples

View source: R/HSC_PC_Binning.R

Description

Extends the HSC_PC abstract class.

Usage

1
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

1
2
3
4
5
6
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*

SeqDetect documentation built on March 2, 2020, 5:08 p.m.