public abstract class AnomalyInfo extends Object implements OutputInfo<Event>
Modifier and Type | Field and Description |
---|---|
protected long |
anomalyCount
The number of anomalous events observed.
|
protected long |
expectedCount
The number of expected events observed.
|
protected int |
unknownCount
The number of unknown events observed (i.e., those without labels).
|
Modifier | Constructor and Description |
---|---|
protected |
AnomalyInfo()
Constructs a new empty anomaly info.
|
protected |
AnomalyInfo(AnomalyInfo other)
Copies the supplied anomaly info.
|
Modifier and Type | Method and Description |
---|---|
abstract AnomalyInfo |
copy()
Generates a copy of this OutputInfo, including it's mutability.
|
ImmutableOutputInfo<Event> |
generateImmutableOutputInfo()
Generates an
ImmutableOutputInfo which has a copy of the data
in this OutputInfo , but also has id values and is immutable. |
MutableOutputInfo<Event> |
generateMutableOutputInfo()
Generates a mutable copy of this
OutputInfo . |
long |
getAnomalyCount()
The number of anomalous events observed.
|
Set<Event> |
getDomain()
Returns the set of possible
Event s. |
long |
getEventCount(Event.EventType type)
Gets the count of the supplied EventType.
|
long |
getExpectedCount()
The number of expected events observed.
|
int |
getUnknownCount()
Returns the number of unknown
Output instances (generated by OutputFactory.getUnknownOutput() )
that this OutputInfo has seen. |
Iterable<com.oracle.labs.mlrg.olcut.util.Pair<String,Long>> |
outputCountsIterable()
An Iterable over the possible outputs and the number of times they were observed.
|
int |
size()
The number of possible event types (i.e., 2).
|
String |
toReadableString()
Generates a String form of this OutputInfo.
|
protected long expectedCount
protected long anomalyCount
protected int unknownCount
protected AnomalyInfo()
protected AnomalyInfo(AnomalyInfo other)
other
- The info to copy.public int getUnknownCount()
OutputInfo
Output
instances (generated by OutputFactory.getUnknownOutput()
)
that this OutputInfo has seen.getUnknownCount
in interface OutputInfo<Event>
public long getAnomalyCount()
public long getExpectedCount()
public Set<Event> getDomain()
Event
s.
Each event has the default score of Double.NaN.
getDomain
in interface OutputInfo<Event>
public long getEventCount(Event.EventType type)
type
- An EventType.public Iterable<com.oracle.labs.mlrg.olcut.util.Pair<String,Long>> outputCountsIterable()
OutputInfo
Provides similar functionality to an iterator over the entrySet of a Map, though this is a copy of the data and immutable.
outputCountsIterable
in interface OutputInfo<Event>
public int size()
size
in interface OutputInfo<Event>
public ImmutableOutputInfo<Event> generateImmutableOutputInfo()
OutputInfo
ImmutableOutputInfo
which has a copy of the data
in this OutputInfo
, but also has id values and is immutable.generateImmutableOutputInfo
in interface OutputInfo<Event>
public MutableOutputInfo<Event> generateMutableOutputInfo()
OutputInfo
OutputInfo
.generateMutableOutputInfo
in interface OutputInfo<Event>
public String toReadableString()
OutputInfo
This String can contain newlines, tabs and other formatting.
toReadableString
in interface OutputInfo<Event>
public abstract AnomalyInfo copy()
OutputInfo
copy
in interface OutputInfo<Event>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.