Package oracle.pgx.api.mllib
Class SupervisedGnnExplainer
- java.lang.Object
-
- oracle.pgx.api.mllib.GnnExplainer
-
- oracle.pgx.api.mllib.SupervisedGnnExplainer
-
public class SupervisedGnnExplainer extends GnnExplainer
GnnExplainer object forSupervisedGraphWiseModel
.- Since:
- 22.2
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <ID> SupervisedGnnExplanation<ID>
inferAndExplain(PgxGraph graph, PgxVertex<ID> vertex)
Blocking version ofinferAndExplainAsync(PgxGraph, PgxVertex)
.<ID> SupervisedGnnExplanation<ID>
inferAndExplain(PgxGraph graph, PgxVertex<ID> vertex, float threshold)
Blocking version ofinferAndExplainAsync(PgxGraph, PgxVertex, float)
.<ID> PgxFuture<SupervisedGnnExplanation<ID>>
inferAndExplainAsync(PgxGraph graph, PgxVertex<ID> vertex)
Performs inference on the specified vertex and generates an explanation that contains scores of how important each property and each vertex in the computation graph is for the prediction.<ID> PgxFuture<SupervisedGnnExplanation<ID>>
inferAndExplainAsync(PgxGraph graph, PgxVertex<ID> vertex, float threshold)
Performs inference on the specified vertex and generates an explanation that contains scores of how important each property and each vertex in the computation graph is for the prediction.SupervisedGnnExplainer
learningRate(double learningRate)
Set the learning rate for the explainer.SupervisedGnnExplainer
marginalize(boolean marginalize)
Set whether the explainer loss is marginalized over features.SupervisedGnnExplainer
numOptimizationSteps(int numOptimizationSteps)
Set the number of optimization steps for the explainer.-
Methods inherited from class oracle.pgx.api.mllib.GnnExplainer
learningRate, marginalize, numOptimizationSteps
-
-
-
-
Method Detail
-
inferAndExplainAsync
public <ID> PgxFuture<SupervisedGnnExplanation<ID>> inferAndExplainAsync(PgxGraph graph, PgxVertex<ID> vertex)
Performs inference on the specified vertex and generates an explanation that contains scores of how important each property and each vertex in the computation graph is for the prediction.- Parameters:
graph
- the input graphvertex
- the vertex- Returns:
- explanation containing feature importance and vertex importance.
- Since:
- 22.2
-
inferAndExplainAsync
public <ID> PgxFuture<SupervisedGnnExplanation<ID>> inferAndExplainAsync(PgxGraph graph, PgxVertex<ID> vertex, float threshold)
Performs inference on the specified vertex and generates an explanation that contains scores of how important each property and each vertex in the computation graph is for the prediction.- Parameters:
graph
- the input graphvertex
- the vertexthreshold
- decision threshold- Returns:
- explanation containing feature importance and vertex importance.
- Since:
- 22.2
-
inferAndExplain
public <ID> SupervisedGnnExplanation<ID> inferAndExplain(PgxGraph graph, PgxVertex<ID> vertex)
Blocking version ofinferAndExplainAsync(PgxGraph, PgxVertex)
. Performs inference on the specified vertex and generates an explanation that contains scores of how important each property and each vertex in the computation graph is for the prediction.- Parameters:
graph
- the input graphvertex
- the vertex- Returns:
- explanation containing feature importance and vertex importance.
- Since:
- 22.2
-
inferAndExplain
public <ID> SupervisedGnnExplanation<ID> inferAndExplain(PgxGraph graph, PgxVertex<ID> vertex, float threshold)
Blocking version ofinferAndExplainAsync(PgxGraph, PgxVertex, float)
. Performs inference on the specified vertex and generates an explanation that contains scores of how important each property and each vertex in the computation graph is for the prediction.- Parameters:
graph
- the input graphvertex
- the vertexthreshold
- threshold- Returns:
- explanation containing feature importance and vertex importance.
- Since:
- 22.2
-
numOptimizationSteps
public SupervisedGnnExplainer numOptimizationSteps(int numOptimizationSteps)
Set the number of optimization steps for the explainer.- Parameters:
numOptimizationSteps
- number of optimization steps- Since:
- 22.2
-
learningRate
public SupervisedGnnExplainer learningRate(double learningRate)
Set the learning rate for the explainer.- Parameters:
learningRate
- learning rate- Since:
- 22.2
-
marginalize
public SupervisedGnnExplainer marginalize(boolean marginalize)
Set whether the explainer loss is marginalized over features. This can help in cases where there are important features that take values close to zero. Without marginalization the explainer can learn to mask such features out even if they are important, marginalization solves this by instead learning a mask for the deviation from the estimated input distribution.- Parameters:
marginalize
- true if loss should be marginalized, false otherwise- Since:
- 22.2
-
-