skcla_mlp {daltoolboxdp} | R Documentation |
Multi-layer Perceptron Classifier
Description
Implements classification using Multi-layer Perceptron algorithm. This function wraps the MLPClassifier from Python's scikit-learn library.
Usage
skcla_mlp(
attribute,
slevels,
hidden_layer_sizes = c(100),
activation = "relu",
solver = "adam",
alpha = 1e-04,
batch_size = "auto",
learning_rate = "constant",
learning_rate_init = 0.001,
power_t = 0.5,
max_iter = 200,
shuffle = TRUE,
random_state = NULL,
tol = 1e-04,
verbose = FALSE,
warm_start = FALSE,
momentum = 0.9,
nesterovs_momentum = TRUE,
early_stopping = FALSE,
validation_fraction = 0.1,
beta_1 = 0.9,
beta_2 = 0.999,
epsilon = 1e-08,
n_iter_no_change = 10,
max_fun = 15000
)
Arguments
attribute |
Target attribute name for model building |
slevels |
List of possible values for classification target |
Number of neurons in each hidden layer | |
activation |
Activation function for hidden layer ('identity', 'logistic', 'tanh', 'relu') |
solver |
The solver for weight optimization ('lbfgs', 'sgd', 'adam') |
alpha |
L2 penalty (regularization term) parameter |
batch_size |
Size of minibatches for stochastic optimizers |
learning_rate |
Learning rate schedule for weight updates |
learning_rate_init |
Initial learning rate used |
power_t |
Exponent for inverse scaling learning rate |
max_iter |
Maximum number of iterations |
shuffle |
Whether to shuffle samples in each iteration |
random_state |
Seed for random number generation |
tol |
Tolerance for optimization |
verbose |
Whether to print progress messages to stdout |
warm_start |
Whether to reuse previous solution |
momentum |
Momentum for gradient descent update |
nesterovs_momentum |
Whether to use Nesterov's momentum |
early_stopping |
Whether to use early stopping |
validation_fraction |
Proportion of training data for validation |
beta_1 |
Exponential decay rate for estimates of first moment vector |
beta_2 |
Exponential decay rate for estimates of second moment vector |
epsilon |
Value for numerical stability in adam |
n_iter_no_change |
Maximum number of epochs to not meet tol improvement |
max_fun |
Maximum number of loss function calls |
Details
Neural Network Classifier
Value
A Multi-layer Perceptron classifier object
skcla_mlp
object
Examples
#See an example of using `skcla_mlp` at this
#https://github.com/cefet-rj-dal/daltoolboxdp/blob/main/examples/skcla_mlp.md