public class UnsupervisedAnomalyDetectionGraphWiseModel extends UnsupervisedGraphWiseModel implements VertexAnomalyDetectionModel
VertexAnomalyDetectionModel
using UnsupervisedGraphWiseModel
See UnsupervisedAnomalyDetectionGraphWiseModelBuilder
for documentation of the hyperparameters.UnsupervisedGraphWiseModel.UnsupervisedGraphWiseInferenceType
VertexAnomalyDetectionModel.AnomalyDetectionInferenceType
ALGORITHM_NAME
Constructor and Description |
---|
UnsupervisedAnomalyDetectionGraphWiseModel(PgxSession session,
oracle.pgx.api.internal.Core core,
java.util.function.Supplier<java.lang.String> keystorePathSupplier,
java.util.function.Supplier<char[]> keystorePasswordSupplier,
oracle.pgx.api.internal.mllib.UnsupervisedGraphWiseModelMetadata modelMetadata,
java.util.function.BiFunction<PgxSession,oracle.pgx.api.internal.Graph,PgxGraph> graphConstructor)
This constructor should never be used to get a model.
|
UnsupervisedAnomalyDetectionGraphWiseModel(UnsupervisedGraphWiseModel model) |
Modifier and Type | Method and Description |
---|---|
<ID> PgxFrame |
evaluateAnomalyLabels(PgxGraph graph,
java.lang.Iterable<PgxVertex<ID>> vertices,
java.lang.String vertexAnomalyPropertyName,
java.lang.Object anomalyPropertyValue,
float threshold)
|
<ID> PgxFuture<PgxFrame> |
evaluateAnomalyLabelsAsync(PgxGraph graph,
java.lang.Iterable<PgxVertex<ID>> vertices,
java.lang.String vertexAnomalyPropertyName,
java.lang.Object anomalyPropertyValue,
float threshold)
Evaluates anomaly detection performance statistics for the specified vertices.
|
<ID> java.lang.Double |
findAnomalyThreshold(PgxGraph graph,
java.lang.Iterable<PgxVertex<ID>> vertices,
float contaminationFactor)
Blocking version of
VertexAnomalyDetectionModel.findAnomalyThresholdAsync(PgxGraph, Iterable, float) . |
<ID> PgxFuture<java.lang.Double> |
findAnomalyThresholdAsync(PgxGraph graph,
java.lang.Iterable<PgxVertex<ID>> vertices,
float contaminationFactor)
Finds an appropriate anomaly threshold for labeling the input vertices as anomalies,
respecting the proportion given by the contamination factor
|
<ID> PgxFrame |
inferAnomalyLabels(PgxGraph graph,
java.lang.Iterable<PgxVertex<ID>> vertices,
float threshold)
Blocking version of
VertexAnomalyDetectionModel.inferAnomalyLabelsAsync(PgxGraph, Iterable, float) . |
<ID> PgxFuture<PgxFrame> |
inferAnomalyLabelsAsync(PgxGraph graph,
java.lang.Iterable<PgxVertex<ID>> vertices,
float threshold)
Infers the anomaly labels for the specified vertices.
|
<ID> PgxFrame |
inferAnomalyScores(PgxGraph graph,
java.lang.Iterable<PgxVertex<ID>> vertices)
Blocking version of
VertexAnomalyDetectionModel.inferAnomalyScoresAsync(PgxGraph, Iterable) . |
<ID> PgxFuture<PgxFrame> |
inferAnomalyScoresAsync(PgxGraph graph,
java.lang.Iterable<PgxVertex<ID>> vertices)
Infers the anomaly scores for the specified vertices.
|
fitAsync, getEmbeddingConfig, getLossFunction, gnnExplainer, inferEmbeddingsAsync, store, store, storeAsync, storeAsync
destroy, destroyAsync, fit, getBatchSize, getConfig, getConvLayerConfigs, getEdgeInputFeatureDim, getEdgeInputPropertyNames, getEmbeddingDim, getInputFeatureDim, getLearningRate, getNumEpochs, getSeed, getTrainingLoss, getVertexInputPropertyNames, inferEmbeddings, isFitted
public UnsupervisedAnomalyDetectionGraphWiseModel(PgxSession session, oracle.pgx.api.internal.Core core, java.util.function.Supplier<java.lang.String> keystorePathSupplier, java.util.function.Supplier<char[]> keystorePasswordSupplier, oracle.pgx.api.internal.mllib.UnsupervisedGraphWiseModelMetadata modelMetadata, java.util.function.BiFunction<PgxSession,oracle.pgx.api.internal.Graph,PgxGraph> graphConstructor)
UnsupervisedAnomalyDetectionGraphWiseModelBuilder
instead.session
- PgxSession to which the model is connectedcore
- Core to which the model is connectedmodelMetadata
- Metadata concerning the different hyper-parameters of the GraphWise Modelpublic UnsupervisedAnomalyDetectionGraphWiseModel(UnsupervisedGraphWiseModel model)
public <ID> PgxFrame evaluateAnomalyLabels(PgxGraph graph, java.lang.Iterable<PgxVertex<ID>> vertices, java.lang.String vertexAnomalyPropertyName, java.lang.Object anomalyPropertyValue, float threshold)
VertexAnomalyDetectionModel
VertexAnomalyDetectionModel.evaluateAnomalyLabelsAsync(PgxGraph, Iterable, String, Object, float)
.evaluateAnomalyLabels
in interface VertexAnomalyDetectionModel
public <ID> PgxFuture<PgxFrame> evaluateAnomalyLabelsAsync(PgxGraph graph, java.lang.Iterable<PgxVertex<ID>> vertices, java.lang.String vertexAnomalyPropertyName, java.lang.Object anomalyPropertyValue, float threshold)
VertexAnomalyDetectionModel
evaluateAnomalyLabelsAsync
in interface VertexAnomalyDetectionModel
graph
- the input graphvertices
- the vertices to produce labels tovertexAnomalyPropertyName
- the name of the vertex containing the ground truth anomaly labelsanomalyPropertyValue
- the value representing anomalies in vertexAnomalyPropertyName propertythreshold
- the decision thresholdpublic <ID> java.lang.Double findAnomalyThreshold(PgxGraph graph, java.lang.Iterable<PgxVertex<ID>> vertices, float contaminationFactor)
VertexAnomalyDetectionModel
VertexAnomalyDetectionModel.findAnomalyThresholdAsync(PgxGraph, Iterable, float)
.findAnomalyThreshold
in interface VertexAnomalyDetectionModel
public <ID> PgxFuture<java.lang.Double> findAnomalyThresholdAsync(PgxGraph graph, java.lang.Iterable<PgxVertex<ID>> vertices, float contaminationFactor)
VertexAnomalyDetectionModel
findAnomalyThresholdAsync
in interface VertexAnomalyDetectionModel
graph
- the input graphvertices
- the vertices used to find the thresholdcontaminationFactor
- the expected proportion of vertices that should be labeled as anomaliespublic <ID> PgxFrame inferAnomalyLabels(PgxGraph graph, java.lang.Iterable<PgxVertex<ID>> vertices, float threshold)
VertexAnomalyDetectionModel
VertexAnomalyDetectionModel.inferAnomalyLabelsAsync(PgxGraph, Iterable, float)
.inferAnomalyLabels
in interface VertexAnomalyDetectionModel
public <ID> PgxFuture<PgxFrame> inferAnomalyLabelsAsync(PgxGraph graph, java.lang.Iterable<PgxVertex<ID>> vertices, float threshold)
VertexAnomalyDetectionModel
inferAnomalyLabelsAsync
in interface VertexAnomalyDetectionModel
graph
- the input graphvertices
- the vertices to produce labels tothreshold
- the decision thresholdpublic <ID> PgxFrame inferAnomalyScores(PgxGraph graph, java.lang.Iterable<PgxVertex<ID>> vertices)
VertexAnomalyDetectionModel
VertexAnomalyDetectionModel.inferAnomalyScoresAsync(PgxGraph, Iterable)
.inferAnomalyScores
in interface VertexAnomalyDetectionModel
public <ID> PgxFuture<PgxFrame> inferAnomalyScoresAsync(PgxGraph graph, java.lang.Iterable<PgxVertex<ID>> vertices)
VertexAnomalyDetectionModel
inferAnomalyScoresAsync
in interface VertexAnomalyDetectionModel
graph
- the input graphvertices
- the vertices to find anomaly scores for