public class UnsupervisedGraphWiseModel extends GraphWiseModel<UnsupervisedGraphWiseModelConfig,oracle.pgx.api.internal.mllib.UnsupervisedGraphWiseModelMetadata,UnsupervisedGraphWiseModel>
UnsupervisedGraphWiseModelBuilder
for documentation of the hyperparameters.Modifier and Type | Class and Description |
---|---|
static class |
UnsupervisedGraphWiseModel.UnsupervisedGraphWiseInferenceType |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALGORITHM_NAME |
Constructor and Description |
---|
UnsupervisedGraphWiseModel(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.ModelMetadata modelMetadata, java.util.function.BiFunction<PgxSession,oracle.pgx.api.internal.Graph,PgxGraph> graphConstructor) |
UnsupervisedGraphWiseModel(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.
|
Modifier and Type | Method and Description |
---|---|
PgxFuture<java.lang.Double> |
fitAsync(PgxGraph graph)
Trains the GraphWise model on the input graph.
|
GraphWiseDgiLayerConfig |
getDgiLayerConfigs()
Gets the configuration object for the dgi layer
|
UnsupervisedGraphWiseModelConfig.LossFunction |
getLossFunction()
Gets the loss function
|
<ID> UnsupervisedGnnExplanation<ID> |
inferAndGetExplanation(PgxGraph graph, PgxVertex<ID> vertex)
Blocking version of
inferAndGetExplanationAsync(PgxGraph, PgxVertex) . |
<ID> UnsupervisedGnnExplanation<ID> |
inferAndGetExplanation(PgxGraph graph, PgxVertex<ID> vertex, int numClusters)
Blocking version of
inferAndGetExplanationAsync(PgxGraph, PgxVertex, int) . |
<ID> PgxFuture<UnsupervisedGnnExplanation<ID>> |
inferAndGetExplanationAsync(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<UnsupervisedGnnExplanation<ID>> |
inferAndGetExplanationAsync(PgxGraph graph, PgxVertex<ID> vertex, int numClusters)
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<PgxFrame> |
inferEmbeddingsAsync(PgxGraph graph, java.lang.Iterable<PgxVertex<ID>> vertices)
Infers the embeddings for the specified vertices.
|
void |
store(java.lang.String path, java.lang.String key)
Blocking version of
storeAsync(String, String) . |
void |
store(java.lang.String path, java.lang.String key, boolean overwrite)
Blocking version of
storeAsync(String, String) . |
PgxFuture<java.lang.Void> |
storeAsync(java.lang.String path, java.lang.String key)
Stores the GraphWise model in the specified path, with encryption.
|
PgxFuture<java.lang.Void> |
storeAsync(java.lang.String path, java.lang.String key, boolean overwrite)
Stores the GraphWise model in the specified path, with encryption.
|
destroy, destroyAsync, fit, getBatchSize, getConfig, getConvLayerConfigs, getEdgeInputFeatureDim, getEdgeInputPropertyNames, getEmbeddingDim, getInputFeatureDim, getLearningRate, getNumEpochs, getSeed, getTrainingLoss, getVertexInputPropertyNames, inferEmbeddings, isFitted
public static final java.lang.String ALGORITHM_NAME
public UnsupervisedGraphWiseModel(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.ModelMetadata modelMetadata, java.util.function.BiFunction<PgxSession,oracle.pgx.api.internal.Graph,PgxGraph> graphConstructor)
public UnsupervisedGraphWiseModel(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)
UnsupervisedGraphWiseModelBuilder
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 PgxFuture<java.lang.Double> fitAsync(PgxGraph graph)
fitAsync
in class GraphWiseModel<UnsupervisedGraphWiseModelConfig,oracle.pgx.api.internal.mllib.UnsupervisedGraphWiseModelMetadata,UnsupervisedGraphWiseModel>
graph
- input graph to fit on.public GraphWiseDgiLayerConfig getDgiLayerConfigs()
public UnsupervisedGraphWiseModelConfig.LossFunction getLossFunction()
public <ID> UnsupervisedGnnExplanation<ID> inferAndGetExplanation(PgxGraph graph, PgxVertex<ID> vertex)
inferAndGetExplanationAsync(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.graph
- the input graphvertex
- the vertexpublic <ID> UnsupervisedGnnExplanation<ID> inferAndGetExplanation(PgxGraph graph, PgxVertex<ID> vertex, int numClusters)
inferAndGetExplanationAsync(PgxGraph, PgxVertex, int)
. 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.graph
- the input graphvertex
- the vertexnumClusters
- the number of semantic vertex clusters expected in the graph, must be greater than 1public <ID> PgxFuture<UnsupervisedGnnExplanation<ID>> inferAndGetExplanationAsync(PgxGraph graph, PgxVertex<ID> vertex)
graph
- the input graphvertex
- the vertexpublic <ID> PgxFuture<UnsupervisedGnnExplanation<ID>> inferAndGetExplanationAsync(PgxGraph graph, PgxVertex<ID> vertex, int numClusters)
graph
- the input graphvertex
- the vertexnumClusters
- the number of semantic vertex clusters expected in the graph, must be greater than 1public <ID> PgxFuture<PgxFrame> inferEmbeddingsAsync(PgxGraph graph, java.lang.Iterable<PgxVertex<ID>> vertices)
inferEmbeddingsAsync
in class GraphWiseModel<UnsupervisedGraphWiseModelConfig,oracle.pgx.api.internal.mllib.UnsupervisedGraphWiseModelMetadata,UnsupervisedGraphWiseModel>
public void store(java.lang.String path, java.lang.String key) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
storeAsync(String, String)
. Calls storeAsync(String, String)
and waits for the returned PgxFuture
to complete.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public void store(java.lang.String path, java.lang.String key, boolean overwrite) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
storeAsync(String, String)
. Calls storeAsync(String, String)
and waits for the returned PgxFuture
to complete.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<java.lang.Void> storeAsync(java.lang.String path, java.lang.String key) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
path
- path to store the modelkey
- the encryption key, or null if no encryption should be used.java.util.concurrent.ExecutionException
java.lang.InterruptedException
public PgxFuture<java.lang.Void> storeAsync(java.lang.String path, java.lang.String key, boolean overwrite)
path
- path to store the modelkey
- the encryption key, or null if no encryption should be used.