public abstract class GraphWiseModelBuilder<Model extends GraphWiseModel,Config extends GraphWiseModelConfig,Self extends GraphWiseModelBuilder>
extends java.lang.Object
SupervisedGraphWiseModelBuilder
instead of this.Constructor and Description |
---|
GraphWiseModelBuilder() |
Modifier and Type | Method and Description |
---|---|
abstract Model |
build()
Builds the GraphWise model with the specified parameters.
|
Self |
setBatchSize(int batchSize)
Set the batch size.
|
Self |
setConvLayerConfigs(GraphWiseConvLayerConfig... layerConfigs)
Set the convolutional layer configurations (See
GraphWiseConvLayerConfig ). |
Self |
setEdgeInputPropertyNames(java.util.List<java.lang.String> edgeInputPropertyNames)
Set the edge input features for the algorithm in the form of names of properties on the graph.
|
Self |
setEdgeInputPropertyNames(java.lang.String... edgeInputPropertyNames)
Set the edges input features for the algorithm in the form of names of properties on the graph.
|
Self |
setEmbeddingDim(int embeddingDim)
Set the embedding dimension of the model.
|
Self |
setLearningRate(double learningRate)
Set the learning rate used for the Adam optimizer
|
Self |
setNumEpochs(int numEpochs)
Set the number of training epochs.
|
Self |
setSeed(java.lang.Integer seed)
Sets the random seed used for fitting the model.
|
Self |
setShuffle(boolean shuffle)
If true, the model will shuffle the order of vertices before each epoch.
|
Self |
setStandardize(boolean standardize)
Whether to standardize the batch before passing them through a convolutional layer.
|
Self |
setTargetVertexLabels(java.util.List<java.lang.String> targetVertexLabels)
Set the target vertex labels for the algorithm.
|
Self |
setTargetVertexLabels(java.lang.String... targetVertexLabels)
Set the target vertex labels for the algorithm.
|
Self |
setVertexInputPropertyNames(java.util.List<java.lang.String> vertexInputPropertyNames)
Set the input features for the algorithm in the form of names of properties on the graph.
|
Self |
setVertexInputPropertyNames(java.lang.String... vertexInputPropertyNames)
Set the input features for the algorithm in the form of names of properties on the graph.
|
Self |
setWeightDecay(double weightDecay)
Set the weight decay used for the Adam optimizer
|
public abstract Model build() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public Self setBatchSize(int batchSize)
batchSize
- batch sizepublic Self setConvLayerConfigs(GraphWiseConvLayerConfig... layerConfigs)
GraphWiseConvLayerConfig
).
layerConfigs
- layer configurationspublic Self setEdgeInputPropertyNames(java.util.List<java.lang.String> edgeInputPropertyNames)
Supported property types are given by GraphWiseModelConfig.SUPPORTED_INPUT_TYPES
. Additionally, float and double vector properties are supported.
edgeInputPropertyNames
- list of property namespublic Self setEdgeInputPropertyNames(java.lang.String... edgeInputPropertyNames)
Supported graph property types are:
edgeInputPropertyNames
- property namespublic Self setEmbeddingDim(int embeddingDim)
embeddingDim
- embedding dimensionpublic Self setLearningRate(double learningRate)
learningRate
- learning ratepublic Self setNumEpochs(int numEpochs)
numEpochs
- number of epochspublic Self setSeed(java.lang.Integer seed)
default: GraphWiseModelConfig.DEFAULT_SEED
seed
- random seedpublic Self setShuffle(boolean shuffle)
default: GraphWiseModelConfig.DEFAULT_SHUFFLE
shuffle
- whether to shufflepublic Self setStandardize(boolean standardize)
standardize
- whether to standardizepublic Self setTargetVertexLabels(java.util.List<java.lang.String> targetVertexLabels)
targetVertexLabels
- list of label namespublic Self setTargetVertexLabels(java.lang.String... targetVertexLabels)
targetVertexLabels
- label namespublic Self setVertexInputPropertyNames(java.util.List<java.lang.String> vertexInputPropertyNames)
Supported property types are given by GraphWiseModelConfig.SUPPORTED_INPUT_TYPES
. Additionally, float and double vector properties are supported.
vertexInputPropertyNames
- list of property namespublic Self setVertexInputPropertyNames(java.lang.String... vertexInputPropertyNames)
Supported graph property types are:
vertexInputPropertyNames
- property namespublic Self setWeightDecay(double weightDecay)
weightDecay
- weight decay