8.2.6 Inferring the Vertex Labels for a Supervised GraphWise Model
You can infer the labels for vertices on any graph (including vertices or graphs that were not seen during training) as described in the following code:
Inferring the Vertex Labels Using
            JShell
               opg4j> var labels = model.inferLabels(fullGraph, testVertices);
opg4j> labels.head().print()Inferring the Vertex Labels Using
            Java
               PgxFrame labels = model.inferLabels(fullGraph,testVertices);
labels.head().print();Inferring the Vertex Labels Using
            Python
               labels = model.infer_labels(full_graph, full_graph.get_vertices())
labels.print()The output will be similar to the following example output:
               
+----------------------------------+
| vertexId | label                 |
+----------------------------------+
| 2        | Neural Networks       |
| 6        | Theory                |
| 7        | Case Based            |
| 22       | Rule Learning         |
| 30       | Theory                |
| 34       | Neural Networks       |
| 47       | Case Based            |
| 48       | Probabalistic Methods |
| 50       | Theory                |
| 52       | Theory                |
+----------------------------------+Similarly, you can also get the model confidence for each class by inferring the prediction logits as described in the following code:
Getting the Model Confidence Using
            JShell
               opg4j> var logits = model.inferLogits(fullGraph, testVertices);
opg4j> labels.head().print();Getting the Model Confidence Using
            Java
               PgxFrame logits = model.inferLogits(fullGraph,testVertices);
logits.head().print();Getting the Model Confidence Using
            Python
            logits = model.infer_logits(full_graph, test_vertices)
logits.print()Parent topic: Using the Supervised GraphWise Algorithm