Interface VertexAnomalyDetectionModel

  • All Known Implementing Classes:
    UnsupervisedAnomalyDetectionGraphWiseModel

    public interface VertexAnomalyDetectionModel
    This interface specifies which methods an object should implement in order to perform vertex anomaly detection.
    Since:
    23.2
    • Method Detail

      • inferAnomalyScoresAsync

        <ID> PgxFuture<PgxFrame> inferAnomalyScoresAsync​(PgxGraph graph,
                                                         java.lang.Iterable<PgxVertex<ID>> vertices)
        Infers the anomaly scores for the specified vertices.
        Parameters:
        graph - the input graph
        vertices - the vertices to find anomaly scores for
        Returns:
        PgxFrame containing the scores for each vertex.
        Since:
        23.2
      • findAnomalyThresholdAsync

        <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
        Parameters:
        graph - the input graph
        vertices - the vertices used to find the threshold
        contaminationFactor - the expected proportion of vertices that should be labeled as anomalies
        Returns:
        the threshold
        Since:
        23.2
      • inferAnomalyLabelsAsync

        <ID> PgxFuture<PgxFrame> inferAnomalyLabelsAsync​(PgxGraph graph,
                                                         java.lang.Iterable<PgxVertex<ID>> vertices,
                                                         float threshold)
        Infers the anomaly labels for the specified vertices.
        Parameters:
        graph - the input graph
        vertices - the vertices to produce labels to
        threshold - the decision threshold
        Returns:
        PgxFrame containing the labels for each vertex.
        Since:
        23.2
      • evaluateAnomalyLabelsAsync

        <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.
        Parameters:
        graph - the input graph
        vertices - the vertices to produce labels to
        vertexAnomalyPropertyName - the name of the vertex containing the ground truth anomaly labels
        anomalyPropertyValue - the value representing anomalies in vertexAnomalyPropertyName property
        threshold - the decision threshold
        Returns:
        PgxFrame containing the evaluation results.
        Since:
        23.2