mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-16 10:15:13 +00:00
748 B
748 B
MultilayerPerceptron
A multilayer perceptron (MLP) is a feedforward artificial neural network model that maps sets of input data onto a set of appropriate outputs.
Constructor Parameters
- $layers (array) - array with layers configuration, each value represent number of neurons in each layers
- $activationFunction (ActivationFunction) - neuron activation function
use Phpml\NeuralNetwork\Network\MultilayerPerceptron;
$mlp = new MultilayerPerceptron([2, 2, 1]);
// 2 nodes in input layer, 2 nodes in first hidden layer and 1 node in output layer
Methods
- setInput(array $input)
- getOutput()
- getLayers()
- addLayer(Layer $layer)
Activation Functions
- BinaryStep
- Gaussian
- HyperbolicTangent
- Sigmoid (default)