public class SupervisedGraphWiseModelBuilder extends GraphWiseModelBuilder<SupervisedGraphWiseModel,SupervisedGraphWiseModelConfig,SupervisedGraphWiseModelBuilder>
SupervisedGraphWiseModel
The builder can be used to set the configuration of the model and create the model object.Constructor and Description |
---|
SupervisedGraphWiseModelBuilder(PgxSession session, oracle.pgx.api.internal.Core core, java.util.function.Supplier<java.lang.String> keystorePathSupplier, java.util.function.Supplier<char[]> keystorePasswordSupplier, java.util.function.BiFunction<PgxSession,oracle.pgx.api.internal.Graph,PgxGraph> graphConstructor) |
Modifier and Type | Method and Description |
---|---|
SupervisedGraphWiseModel |
build()
Builds the SupervisedGraphWise model with the specified parameters.
|
SupervisedGraphWiseModelBuilder |
setBatchGenerator(BatchGenerator batchGenerator)
Sets the batch generator.
|
SupervisedGraphWiseModelBuilder |
setClassWeights(java.util.Map<?,java.lang.Float> classWeights)
Set the class weights to be used in the loss function.
|
SupervisedGraphWiseModelBuilder |
setLossFunction(LossFunction lossFunction)
Sets the loss function for the algorithm.
|
SupervisedGraphWiseModelBuilder |
setLossFunction(oracle.pgx.config.mllib.SupervisedGraphWiseModelConfig.LossFunction lossFunction)
Deprecated.
|
SupervisedGraphWiseModelBuilder |
setNormalize(boolean normalize)
Whether to l2 normalize the output of the convolutional layers.
|
SupervisedGraphWiseModelBuilder |
setPredictionLayerConfigs(GraphWisePredictionLayerConfig... layerConfigs)
Set the prediction layer configurations (See
GraphWisePredictionLayerConfig . |
SupervisedGraphWiseModelBuilder |
setVertexTargetPropertyName(java.lang.String propertyName)
Set the target (labels) for the algorithm in the form of a property name of the graph.
|
setBatchSize, setConvLayerConfigs, setEdgeInputPropertyNames, setEdgeInputPropertyNames, setEmbeddingDim, setLearningRate, setNumEpochs, setSeed, setShuffle, setStandardize, setTargetVertexLabels, setTargetVertexLabels, setVertexInputPropertyNames, setVertexInputPropertyNames, setWeightDecay
public SupervisedGraphWiseModelBuilder(PgxSession session, oracle.pgx.api.internal.Core core, java.util.function.Supplier<java.lang.String> keystorePathSupplier, java.util.function.Supplier<char[]> keystorePasswordSupplier, java.util.function.BiFunction<PgxSession,oracle.pgx.api.internal.Graph,PgxGraph> graphConstructor)
public SupervisedGraphWiseModel build() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
build
in class GraphWiseModelBuilder<SupervisedGraphWiseModel,SupervisedGraphWiseModelConfig,SupervisedGraphWiseModelBuilder>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public SupervisedGraphWiseModelBuilder setBatchGenerator(BatchGenerator batchGenerator)
BatchGenerator
default: StandardBatchGenerator
batchGenerator
- batch generatorpublic SupervisedGraphWiseModelBuilder setClassWeights(java.util.Map<?,java.lang.Float> classWeights)
classWeights
- map from classes to weightspublic SupervisedGraphWiseModelBuilder setLossFunction(LossFunction lossFunction)
LossFunction
default: SoftmaxCrossEntropyLoss
lossFunction
- loss function@Deprecated public SupervisedGraphWiseModelBuilder setLossFunction(oracle.pgx.config.mllib.SupervisedGraphWiseModelConfig.LossFunction lossFunction)
SupervisedGraphWiseModelConfig.LossFunction
default: SupervisedGraphWiseModelConfig.LossFunction#SOFTMAX_CROSS_ENTROPY
lossFunction
- loss functionpublic SupervisedGraphWiseModelBuilder setNormalize(boolean normalize)
normalize
- whether to normalizepublic SupervisedGraphWiseModelBuilder setPredictionLayerConfigs(GraphWisePredictionLayerConfig... layerConfigs)
GraphWisePredictionLayerConfig
. You must pass at least one prediction layer config (or leave it as default).
Note that an additional layer will be inserted in the end for which:
default: SupervisedGraphWiseModelConfig.DEFAULT_PREDICTION_LAYER_CONFIGS
layerConfigs
- layer configspublic SupervisedGraphWiseModelBuilder setVertexTargetPropertyName(java.lang.String propertyName)
Supported property types are given by SupervisedGraphWiseModelConfig.SUPPORTED_LABEL_TYPES
.
propertyName
- property name