Class ClassLabelFromPatternFilter
- java.lang.Object
-
- elki.datasource.filter.AbstractStreamFilter
-
- elki.datasource.filter.typeconversions.ClassLabelFromPatternFilter
-
- All Implemented Interfaces:
BundleStreamSource,ObjectFilter,StreamFilter
public class ClassLabelFromPatternFilter extends AbstractStreamFilter
Streaming filter to derive an outlier class label.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClassLabelFromPatternFilter.ParParameterization class.-
Nested classes/interfaces inherited from interface elki.datasource.bundle.BundleStreamSource
BundleStreamSource.Event
-
-
Field Summary
Fields Modifier and Type Field Description (package private) it.unimi.dsi.fastutil.ints.IntArrayListlabelcolsBitset of label columns(package private) BundleMetametaCurrent meta data(package private) SimpleClassLabelnegativeLabel to return for negative matches.(package private) java.util.regex.PatternpatternMatching pattern.(package private) SimpleClassLabelpositiveLabel to return for positive matches.-
Fields inherited from class elki.datasource.filter.AbstractStreamFilter
source
-
-
Constructor Summary
Constructors Constructor Description ClassLabelFromPatternFilter(java.util.regex.Pattern pattern, SimpleClassLabel positive, SimpleClassLabel negative)Constructor.ClassLabelFromPatternFilter(java.util.regex.Pattern pattern, java.lang.String positive, java.lang.String negative)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectdata(int rnum)Access a particular object and representation.BundleMetagetMeta()Get the current meta data.BundleStreamSource.EventnextEvent()Get the next event-
Methods inherited from class elki.datasource.filter.AbstractStreamFilter
asMultipleObjectsBundle, assignDBID, filter, hasDBIDs, init, toString
-
-
-
-
Field Detail
-
meta
BundleMeta meta
Current meta data
-
labelcols
it.unimi.dsi.fastutil.ints.IntArrayList labelcols
Bitset of label columns
-
positive
SimpleClassLabel positive
Label to return for positive matches.
-
negative
SimpleClassLabel negative
Label to return for negative matches.
-
pattern
java.util.regex.Pattern pattern
Matching pattern.
-
-
Constructor Detail
-
ClassLabelFromPatternFilter
public ClassLabelFromPatternFilter(java.util.regex.Pattern pattern, java.lang.String positive, java.lang.String negative)Constructor.- Parameters:
pattern- Pattern for matchingpositive- Positive labelnegative- Negative label
-
ClassLabelFromPatternFilter
public ClassLabelFromPatternFilter(java.util.regex.Pattern pattern, SimpleClassLabel positive, SimpleClassLabel negative)Constructor.- Parameters:
pattern- Pattern for matchingpositive- Positive labelnegative- Negative label
-
-
Method Detail
-
getMeta
public BundleMeta getMeta()
Description copied from interface:BundleStreamSourceGet the current meta data.- Returns:
- Metadata
-
data
public java.lang.Object data(int rnum)
Description copied from interface:BundleStreamSourceAccess a particular object and representation.- Parameters:
rnum- Representation number- Returns:
- Contained data
-
nextEvent
public BundleStreamSource.Event nextEvent()
Description copied from interface:BundleStreamSourceGet the next event- Returns:
- Event type
-
-