public class SupervisedEdgeWiseModelBuilder extends EdgeWiseModelBuilder<SupervisedEdgeWiseModel,SupervisedEdgeWiseModelConfig,SupervisedEdgeWiseModelBuilder>
SupervisedEdgeWiseModel
The builder can be used to set the configuration of the model and create the model object.Constructor and Description |
---|
SupervisedEdgeWiseModelBuilder(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 |
---|---|
SupervisedEdgeWiseModel |
build()
Builds the SupervisedEdgeWise model with the specified parameters.
|
SupervisedEdgeWiseModelBuilder |
setBatchGenerator(BatchGenerator batchGenerator)
Sets the batch generator.
|
SupervisedEdgeWiseModelBuilder |
setClassWeights(java.util.Map<?,java.lang.Float> classWeights)
Set the class weights to be used in the loss function.
|
SupervisedEdgeWiseModelBuilder |
setEdgeTargetPropertyName(java.lang.String propertyName)
Set the target (labels) for the algorithm in the form of a property name of the graph.
|
SupervisedEdgeWiseModelBuilder |
setLossFunction(LossFunction lossFunction)
Sets the loss function for the algorithm.
|
SupervisedEdgeWiseModelBuilder |
setPredictionLayerConfigs(GraphWisePredictionLayerConfig... layerConfigs)
Set the prediction layer configurations (See
GraphWisePredictionLayerConfig . |
setEdgeCombinationMethod, setTargetEdgeLabels, setTargetEdgeLabels
setBatchSize, setConvLayerConfigs, setEdgeInputPropertyConfigs, setEdgeInputPropertyNames, setEdgeInputPropertyNames, setEmbeddingDim, setLearningRate, setNormalize, setNumEpochs, setSeed, setShuffle, setStandardize, setVertexInputPropertyConfigs, setVertexInputPropertyNames, setVertexInputPropertyNames, setWeightDecay
public SupervisedEdgeWiseModelBuilder(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 SupervisedEdgeWiseModel build() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
build
in class EdgeWiseModelBuilder<SupervisedEdgeWiseModel,SupervisedEdgeWiseModelConfig,SupervisedEdgeWiseModelBuilder>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public SupervisedEdgeWiseModelBuilder setBatchGenerator(BatchGenerator batchGenerator)
BatchGenerator
default: StandardBatchGenerator
batchGenerator
- batch generatorpublic SupervisedEdgeWiseModelBuilder setClassWeights(java.util.Map<?,java.lang.Float> classWeights)
classWeights
- map from classes to weightspublic SupervisedEdgeWiseModelBuilder setEdgeTargetPropertyName(java.lang.String propertyName)
Supported property types are given by SupervisedEdgeWiseModelConfig.SUPPORTED_LABEL_TYPES
.
propertyName
- property namepublic SupervisedEdgeWiseModelBuilder setLossFunction(LossFunction lossFunction)
LossFunction
default: SoftmaxCrossEntropyLoss
lossFunction
- loss functionpublic SupervisedEdgeWiseModelBuilder setPredictionLayerConfigs(GraphWisePredictionLayerConfig... layerConfigs)
GraphWisePredictionLayerConfig
.
You must pass at least one prediction layer config (or leave it as default).
Note that for the last layer:
default: SupervisedEdgeWiseModelConfig.DEFAULT_PREDICTION_LAYER_CONFIGS
layerConfigs
- layer configs