Class TrainedDagSimulatorGNM.Params
java.lang.Object
edu.cmu.tetrad.sem.TrainedDagSimulatorGNM.Params
- All Implemented Interfaces:
TetradSerializable, Serializable
- Enclosing class:
TrainedDagSimulatorGNM
public static final class TrainedDagSimulatorGNM.Params
extends Object
implements TetradSerializable
Represents a configuration class containing various hyperparameters and settings
used for the simulation and training of a directed acyclic graph (DAG) model.
This class provides default values for all parameters, which can be modified as needed.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionintRepresents the number of samples to be processed together in a single batch during training.booleanIndicates whether bootstrap sampling should be used when initializing roots during the execution of certain algorithms.intSpecifies the number of training iterations or epochs, which represent one complete pass through the entire training dataset during model training.intSpecifies the default number of hidden units in a single layer of the model.int[]Specifies the layer configuration of a neural network by defining the number of hidden units for each layer.doubleL2 regularization parameter used to prevent overfitting during the training process.doubleA parameter representing the regularization strength applied to parent nodes in a learning model.doubleSpecifies the learning rate used in the optimization algorithm during training.intThe maximum number of discrete levels allowed for a variable or feature in the model or algorithm.intThe maximum number of residual strata to consider for stratification.longThe initial seed value used for random number generation or other computational purposes within the application.booleanIndicates whether residuals should be stratified based on discrete parent variables.doubleA threshold parameter used for controlling or warning about a specific condition or operation within the application.doubleA configurable parameter used to define a specific warning threshold value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint[]Retrieves the configuration for the hidden layers.
-
Field Details
-
epochs
public int epochsSpecifies the number of training iterations or epochs, which represent one complete pass through the entire training dataset during model training. This value determines how many times the model will see the entire dataset for learning and optimization. A higher number of epochs typically allows the model to train longer and potentially achieve better performance, but it may also increase the risk of overfitting. It is important to tune this parameter according to the dataset and problem at hand. Default value: 200 -
lr
public double lrSpecifies the learning rate used in the optimization algorithm during training. The learning rate determines the step size at which the optimization algorithm adjusts the model parameters in response to the estimated gradient during training. A smaller learning rate may result in slower convergence but can offer more precise adjustments to model parameters, while a larger learning rate can speed up convergence but risks overshooting optimal parameter values or failing to converge. Default value: 0.01 -
l2
public double l2L2 regularization parameter used to prevent overfitting during the training process. This value controls the penalty applied to the magnitude of model weights, encouraging smaller weights and promoting generalization. -
batchSize
public int batchSizeRepresents the number of samples to be processed together in a single batch during training. This variable is commonly used in machine learning and deep learning applications to control the size of data subsets passed to the model for each training iteration. -
seed
public long seedThe initial seed value used for random number generation or other computational purposes within the application. This value can be customized to control repeatability in scenarios like machine learning model training, simulations, or other processes requiring stochastic behaviors. -
maxDiscreteLevels
public int maxDiscreteLevelsThe maximum number of discrete levels allowed for a variable or feature in the model or algorithm. It is used to impose a limit on the granularity of discrete variables, ensuring computational efficiency and preventing excessively fine categorizations. -
bootstrapRoots
public boolean bootstrapRootsIndicates whether bootstrap sampling should be used when initializing roots during the execution of certain algorithms. When set totrue, the system will use bootstrap sampling to initialize roots; otherwise, it will not use bootstrap sampling. -
lambdaParents
public double lambdaParentsA parameter representing the regularization strength applied to parent nodes in a learning model. It is a double value used to control the contribution of parent nodes during training. A higher value increases the penalty, potentially discouraging overfitting, whereas a lower value reduces the penalty, allowing for greater flexibility in modeling the parent nodes' influence. -
zWarn1
public double zWarn1A threshold parameter used for controlling or warning about a specific condition or operation within the application. The exact purpose and usage are dependent on the broader context of the containing class. The value is initialized to 4.0 by default. -
zWarn2
public double zWarn2A configurable parameter used to define a specific warning threshold value. This parameter can be utilized in various computations or validations where such a threshold is required. -
stratifyResidualsByDiscreteParents
public boolean stratifyResidualsByDiscreteParentsIndicates whether residuals should be stratified based on discrete parent variables. When set totrue, the model will group residuals into strata according to the distinct values of discrete parent variables. This setting is typically used in models involving discrete data to provide finer granularity in analysis or computation. -
maxResidualStrata
public int maxResidualStrataThe maximum number of residual strata to consider for stratification. This parameter controls the maximum number of distinct strata that residuals can be grouped into based on discrete parent variables. It helps manage memory usage and computational complexity, especially in large datasets.
-
Constructor Details
-
Params
public Params()Constructs a new parameter set for the trained DAG simulator.
-
-
Method Details
-
getHiddenLayers
public int[] getHiddenLayers()Retrieves the configuration for the hidden layers.- Returns:
- an array of integers representing the sizes of the hidden layers. If no explicit configuration for hidden layers exists, an array containing the single value of the default hidden size is returned.
-