is an open source, free-to-use, python package that you can use to make deep artificial neural network models. This package comes with a lot of customizations on the models that you create.
Inorder to make an Artificial Neural Network model using pydANN import the package and instantiate the class ann()
from pydann import ann
model = ann()
Inorder to add hidden layers to the model use the method add_hl( hidden_Layers_list , activations_for_each_layer + 1 )
# we are now going to add hidden layers to the model
model.add_hl( [ 2,5,5 ] , activation_functions = ['relu', 'relu' ,'relu' ,'sigmoid'] )
# the above line adds to the model three hidden layers each of 2, 5 and 5 nodes, respectively.
# The activation_functions should be 1 more in length so as to have one for each hl and an activation for the output layer
To train the model, use the fit( xtrain, ytrain, epoch = 50, learning_rate = 0.01, verbose = 0,decay = True, decay_iter = 5, decay_rate = 0.9, stop_decay_counter = 100, loss_function = 'mse' )
method
# you can also register the training data before you train the model.
model.fit( train_x , y_train ) # this is the basic implementation of the method without any alteration
epoch : The number of iterations to train the model
learning_rate : The value with which the algorithm optimizes weights and biases
verbose : When put 0, verbose is False ( There won't be data printing ) if set to another value other than 0, then the data is printed after each verbose interval
decay : This value optimizes the learning_rate when set to True
loss_function : The function using which the loss is calculated. Loss function option : 'mse' , 'rmse'
decay_rate : The fractional value with which the learning rate is altered
model.plot_cost_to_epoch()
model.plot_lrc_to_epoch()
y_predictions = model.predict( xtest )
model.mse_model_eval( ytest,ypreds )
# 'file' is the name of the file in which the model would be saved and it has to be a .dat file
model.save_model() # to save the model as pydann_model.dat just call the function like this
# to customize the name of the file in which the model should be saved , change 'file'
model.save_model( file = 'model.dat' )
# path is the file path ( directory ) to the saved model
model.use_model( )
model.dispose_model()
model.help()