public final class Event extends Object implements Output<Event>
Output
representing either an Event.EventType.ANOMALOUS
or an
Event.EventType.EXPECTED
event.
Event trainers are allowed to throw IllegalArgumentException if they are supplied
an Event.EventType.ANOMALOUS
at training time. It's noted in the documentation if they
do support training from anomalous and expected data.
Modifier and Type | Class and Description |
---|---|
static class |
Event.EventType
The type of event.
|
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_SCORE
The default score of events.
|
Constructor and Description |
---|
Event(Event.EventType type)
Constructs a new event of the specified type with the default score of
DEFAULT_SCORE . |
Event(Event.EventType type,
double score)
Constructs a new event of the specified type and score.
|
Modifier and Type | Method and Description |
---|---|
Event |
copy()
Deep copy of the output up to it's immutable state.
|
boolean |
equals(Object o) |
boolean |
fullEquals(Event o)
Compares other to this output.
|
double |
getScore()
Get a real valued score for this label.
|
String |
getSerializableForm(boolean includeConfidence)
Returns "EventType" or "EventType,score=eventScore".
|
Event.EventType |
getType()
Gets the event type.
|
int |
hashCode() |
String |
toString() |
public static final double DEFAULT_SCORE
public Event(Event.EventType type, double score)
type
- The event type.score
- The event score.public Event(Event.EventType type)
DEFAULT_SCORE
.type
- The event type.public double getScore()
If the score is not set then it returns DEFAULT_SCORE
.
public Event.EventType getType()
public boolean fullEquals(Event o)
Output
fullEquals
in interface Output<Event>
o
- Another output instance.public Event copy()
Output
public String getSerializableForm(boolean includeConfidence)
getSerializableForm
in interface Output<Event>
includeConfidence
- Include whatever confidence score the label contains, if known.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.