Package oracle.pgx.config.mllib
Class Pg2vecModelConfig
- java.lang.Object
-
- oracle.pgx.config.mllib.Pg2vecModelConfig
-
- All Implemented Interfaces:
BaseModelConfig
public class Pg2vecModelConfig extends java.lang.Object implements BaseModelConfig
-
-
Constructor Summary
Constructors Constructor Description Pg2vecModelConfig()
Pg2vecModelConfig(int walkLength, int walksPerVertex, int minWordFrequency, int batchSize, int numEpochs, int layerSize, double learningRate, double minLearningRate, int windowSize, java.util.Collection<java.lang.String> vertexPropertyNames, java.lang.String graphLetIdName, PropertyType graphIdPropertyType, java.lang.Double trainingLoss, double validationFraction, boolean useGraphletSize, java.lang.Long seed, boolean shuffle, java.lang.String graphletSizePropertyName, boolean enableAccelerator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBatchSize()
Gets the batch sizePropertyType
getGraphIdPropertyType()
java.lang.String
getGraphLetIdPropertyName()
java.lang.String
getGraphletSizePropertyName()
int
getLayerSize()
double
getLearningRate()
java.lang.Double
getLoss()
double
getMinLearningRate()
int
getMinWordFrequency()
int
getNumEpochs()
Gets the number of epochs to train the modeljava.lang.Long
getSeed()
Gets the random seedjava.lang.Boolean
getUseGraphletSize()
java.util.Collection<java.lang.String>
getVertexPropertyNames()
int
getWalkLength()
int
getWalksPerVertex()
int
getWindowSize()
boolean
isEnableAccelerator()
boolean
isShuffle()
Gets whether the model will shuffle or notvoid
setBatchSize(int batchSize)
void
setEnableAccelerator(boolean enableAccelerator)
void
setGraphIdPropertyType(PropertyType graphIdPropertyType)
void
setGraphLetIdPropertyName(java.lang.String graphLetIdName)
void
setGraphletSizePropertyName(java.lang.String graphletSizePropertyName)
void
setLayerSize(int layerSize)
void
setLearningRate(double learningRate)
void
setLoss(java.lang.Double trainingLoss)
Sets the loss after trainingvoid
setMinLearningRate(double minLearningRate)
void
setMinWordFrequency(int minWordFrequency)
void
setNumEpochs(int numEpochs)
void
setSeed(java.lang.Long seed)
void
setShuffle(boolean shuffle)
void
setUseGraphletSize(java.lang.Boolean useGraphletSize)
void
setVertexPropertyNames(java.util.Collection<java.lang.String> vertexPropertyNames)
void
setWalkLength(int walkLength)
void
setWalksPerVertex(int walksPerVertex)
void
setWindowSize(int windowSize)
-
-
-
Constructor Detail
-
Pg2vecModelConfig
public Pg2vecModelConfig(int walkLength, int walksPerVertex, int minWordFrequency, int batchSize, int numEpochs, int layerSize, double learningRate, double minLearningRate, int windowSize, java.util.Collection<java.lang.String> vertexPropertyNames, java.lang.String graphLetIdName, PropertyType graphIdPropertyType, java.lang.Double trainingLoss, double validationFraction, boolean useGraphletSize, java.lang.Long seed, boolean shuffle, java.lang.String graphletSizePropertyName, boolean enableAccelerator)
-
Pg2vecModelConfig
public Pg2vecModelConfig()
-
-
Method Detail
-
getUseGraphletSize
public java.lang.Boolean getUseGraphletSize()
-
setUseGraphletSize
public void setUseGraphletSize(java.lang.Boolean useGraphletSize)
-
getLoss
public java.lang.Double getLoss()
-
setLoss
public void setLoss(java.lang.Double trainingLoss)
Description copied from interface:BaseModelConfig
Sets the loss after training- Specified by:
setLoss
in interfaceBaseModelConfig
- Parameters:
trainingLoss
- the value of the training loss
-
getWalkLength
public int getWalkLength()
-
setWalkLength
public void setWalkLength(int walkLength)
-
getWalksPerVertex
public int getWalksPerVertex()
-
setWalksPerVertex
public void setWalksPerVertex(int walksPerVertex)
-
getMinWordFrequency
public int getMinWordFrequency()
-
setMinWordFrequency
public void setMinWordFrequency(int minWordFrequency)
-
getBatchSize
public int getBatchSize()
Description copied from interface:BaseModelConfig
Gets the batch size- Specified by:
getBatchSize
in interfaceBaseModelConfig
- Returns:
- batch size
-
setBatchSize
public void setBatchSize(int batchSize)
-
getNumEpochs
public int getNumEpochs()
Description copied from interface:BaseModelConfig
Gets the number of epochs to train the model- Specified by:
getNumEpochs
in interfaceBaseModelConfig
- Returns:
- number of epochs to train the model
-
setNumEpochs
public void setNumEpochs(int numEpochs)
-
getLayerSize
public int getLayerSize()
-
setLayerSize
public void setLayerSize(int layerSize)
-
getLearningRate
public double getLearningRate()
-
setLearningRate
public void setLearningRate(double learningRate)
-
getMinLearningRate
public double getMinLearningRate()
-
setMinLearningRate
public void setMinLearningRate(double minLearningRate)
-
getWindowSize
public int getWindowSize()
-
setWindowSize
public void setWindowSize(int windowSize)
-
getVertexPropertyNames
public java.util.Collection<java.lang.String> getVertexPropertyNames()
-
setVertexPropertyNames
public void setVertexPropertyNames(java.util.Collection<java.lang.String> vertexPropertyNames)
-
getGraphLetIdPropertyName
public java.lang.String getGraphLetIdPropertyName()
-
setGraphLetIdPropertyName
public void setGraphLetIdPropertyName(java.lang.String graphLetIdName)
-
getGraphIdPropertyType
public PropertyType getGraphIdPropertyType()
-
setGraphIdPropertyType
public void setGraphIdPropertyType(PropertyType graphIdPropertyType)
-
getGraphletSizePropertyName
public java.lang.String getGraphletSizePropertyName()
-
setGraphletSizePropertyName
public void setGraphletSizePropertyName(java.lang.String graphletSizePropertyName)
-
getSeed
public java.lang.Long getSeed()
Description copied from interface:BaseModelConfig
Gets the random seed- Specified by:
getSeed
in interfaceBaseModelConfig
- Returns:
- random seed
-
setSeed
public void setSeed(java.lang.Long seed)
-
isShuffle
public boolean isShuffle()
Description copied from interface:BaseModelConfig
Gets whether the model will shuffle or not- Specified by:
isShuffle
in interfaceBaseModelConfig
- Returns:
- whether the model will shuffle or not
-
setShuffle
public void setShuffle(boolean shuffle)
-
setEnableAccelerator
public void setEnableAccelerator(boolean enableAccelerator)
-
isEnableAccelerator
public boolean isEnableAccelerator()
-
-