Do you have any information on how to create a neural network fighter? I have 18 inputs but I’m not sure if I need to collect data before, or if I can just use reinforce?
You need collect data first. This is because you need the labels for the reinforcing part.
can i know what are you inputting?
Also try updating the matrix and/or deep learning library. It might be out of date.
The example input given in the post
Here is the code just in case
local MDLL = require(game.ServerStorage.AqwamRobloxMachineAndDeepLearningLibrary)
local LogisticRegression = MDLL.Models.LogisticRegression
local LogisticRegressionModel = LogisticRegression.new(1,1)
local featureMatrix = {
{ 0, 0},
{10, 2},
{-3, -2},
{-442, -22},
{ 2, 2},
{ 1, 1},
{-11, -22},
{ 3, 3},
{-2, -2},
}
local labelVectorLogistic = {
{1},
{1},
{0},
{0},
{1},
{1},
{0},
{1},
{0}
}
local testData = {
{69, 1}
}
LogisticRegression:train(featureMatrix,labelVectorLogistic)
print(LogisticRegression:predict(testData))
From the input given, I do not receive any errors when using up-to-date library. Perhaps try updating the libraries? There were minor bug fixes.
I also recommend you choosing the package version instead of module version for an up to date library
Version 1.3.4
Added new models!
- K-Medoids
- LogisticRegressionOneVsAll
- SupportVectorMachineOneVsAll
Sorry for the late reply. I tried updating the module but still getting this error message.
I was looking for a lua package that is similar to brain.js. This one suits the project I want to make. Thanks
Ah I see. This will be last question before I will ask you to send the DataPredict and MatrixL libraries.
Have you followed the introduction from the documentation here?
Thanks for considering to use our library! If there are any issues, please let me know so that I can fix them ASAP.
Version 1.3.7 is here!
New clustering models
-
Affinity Propagation
-
DBSCAN
-
Agglomerative Hierarchical
That’s all for today!
PS: I should probably stop making new models. It’s too addicting to try to implement them.
Current Version: 1.3.9
Few minor changes and fixes to bugs. Recommended you to update the library.
Also update the matrix library too. Apparently it had some bugs.
This looks sick. Is it possible to train an network using a genetic algorithm?
Sure you can! Though, you need to create your own fitness and mutate functions.
To mutate the model, you need to access the model parameters using :getModelParameters() method. This will contain a table of matrices.
I’ll give you an example. If you want to access the layer L of model parameters at row I and column J, you can use this: ModelParameters[L][I][J].
Once you change the values, you can put the adjusted parameters back using :setModelParameters().
If you want to view the API reference for this, you can have a look here:
https://aqwamcreates.github.io/DataPredict/API/Models/BaseModel.html
PS: You might need to create a function to deep copy the model parameters.
Heads up! New version of the library is here!
The neural network got a new upgrade!
You can now add individual optimizers and regularization objects to individual layers using :addLayer() function.
I also changed the parameters for :createLayers() as well.
You may need to review the API for the neural network here.
Any estimate on when LSTM’s will come to this module? Would love to use this for an upcoming project
Unfortunately, I can’t give the estimates right now. The math for the LSTM model is a bit complicated to understand. It should have been done last two months ago, but due to academic pressure, I had to take a pause from this project.
Though, I can say a number of sequential neural networks are being worked on right now.
That being said, there’s another library that have LSTM model. Though the documentation may be confusing.
Apologies for late reply.
Got it! Thanks, sorry for the late reply.