Class WiseModelBuilder<Config extends GraphWiseBaseModelConfig,​Self extends WiseModelBuilder>

    • Constructor Detail

      • WiseModelBuilder

        public WiseModelBuilder()
    • Method Detail

      • setBatchSize

        public Self setBatchSize​(int batchSize)
        Set the batch size. This batch size will be used for both the training and inference.

        default: GraphWiseBaseModelConfig.DEFAULT_BATCH_SIZE

        Parameters:
        batchSize - batch size
        Returns:
        this
        Since:
        19.4
      • setEnableAccelerator

        public Self setEnableAccelerator​(boolean enableAccelerator)
        If true, use the accelerator (GPU) if available as the machine learning backend.

        default: {true}

        Parameters:
        enableAccelerator - whether to use the accelerator if available
        Returns:
        this
        Since:
        24.1
      • setEmbeddingDim

        public Self setEmbeddingDim​(int embeddingDim)
        Set the embedding dimension of the model. This is the dimension of the embeddings produced by each of the convolutional layers.

        default: GraphWiseBaseModelConfig.DEFAULT_EMBEDDING_DIM

        Parameters:
        embeddingDim - embedding dimension
        Returns:
        this
        Since:
        19.4
      • setShuffle

        public Self setShuffle​(boolean shuffle)
        If true, the model will shuffle the order of vertices before each epoch.

        default: GraphWiseBaseModelConfig.DEFAULT_SHUFFLE

        Parameters:
        shuffle - whether to shuffle
        Returns:
        this
        Since:
        19.4
      • setSeed

        public Self setSeed​(java.lang.Integer seed)
        Sets the random seed used for fitting the model. If null, the random seed will be chosen randomly.

        default: GraphWiseBaseModelConfig.DEFAULT_SEED

        Parameters:
        seed - random seed
        Returns:
        this
        Since:
        19.4
      • setValidationConfig

        public Self setValidationConfig​(GraphWiseValidationConfig validationConfig)
        Set the validation configuration (See GraphWiseValidationConfig). Setting this will allow users to run validation during training.
        Parameters:
        validationConfig - validation configuration
        Returns:
        this
        Since:
        24.2
      • setVertexInputPropertyNames

        public 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. You can set multiple input properties.

        Supported property types are given by GraphWiseBaseModelConfig.SUPPORTED_INPUT_TYPES. Additionally, float and double vector properties are supported.

        Parameters:
        vertexInputPropertyNames - list of property names
        Returns:
        this
        Since:
        19.4
      • setVertexInputPropertyNames

        public Self setVertexInputPropertyNames​(java.lang.String... vertexInputPropertyNames)
        Set the input features for the algorithm in the form of names of properties on the graph. You can set multiple input properties.

        Supported graph property types are:

        • integer
        • long
        • boolean
        • double
        • float
        • string
        • double vectors
        • float vectors

        Parameters:
        vertexInputPropertyNames - property names
        Returns:
        this
        Since:
        19.4
      • setEdgeInputPropertyNames

        public 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. You can set multiple input properties.

        Supported property types are given by GraphWiseBaseModelConfig.SUPPORTED_INPUT_TYPES. Additionally, float and double vector properties are supported.

        Parameters:
        edgeInputPropertyNames - list of property names
        Returns:
        this
        Since:
        21.2
      • setEdgeInputPropertyNames

        public Self setEdgeInputPropertyNames​(java.lang.String... edgeInputPropertyNames)
        Set the edges input features for the algorithm in the form of names of properties on the graph. You can set multiple input properties.

        Supported graph property types are:

        • integer
        • long
        • boolean
        • double
        • float
        • string
        • double vectors
        • float vectors

        Parameters:
        edgeInputPropertyNames - property names
        Returns:
        this
        Since:
        21.2
      • setVertexInputPropertyConfigs

        public Self setVertexInputPropertyConfigs​(InputPropertyConfig... propertyConfigs)
        Set vertex input property configs. You can set multiple input property configs.

        Currently only string properties are supported for input property configs.

        Parameters:
        propertyConfigs - list of property configs
        Returns:
        this
        Since:
        23.2
      • setEdgeInputPropertyConfigs

        public Self setEdgeInputPropertyConfigs​(InputPropertyConfig... propertyConfigs)
        Set edge input property configs. You can set multiple input property configs.

        Currently only string properties are supported for input property configs.

        Parameters:
        propertyConfigs - list of property configs
        Returns:
        this
        Since:
        23.2
      • setStandardize

        public Self setStandardize​(boolean standardize)
        Whether to standardize the batch before passing them through a convolutional layer.

        default: GraphWiseBaseModelConfig.DEFAULT_STANDARDIZE

        Parameters:
        standardize - whether to standardize
        Returns:
        this
        Since:
        19.4
      • setNormalize

        public Self setNormalize​(boolean normalize)
        Whether to l2 normalize the output of the convolutional layers.

        default: GraphWiseBaseModelConfig.DEFAULT_NORMALIZE

        Parameters:
        normalize - whether to normalize
        Returns:
        this
        Since:
        23.2