I thought you said it only applies to multi-class classification algorithms. This only has one class. I’ve also tested that before and after and it gives me this error:
23:42:08.639 ServerScriptService.MatrixL:105: Argument 1 and 2 are incompatible! (2, 4) and (4, 4) - Server - MatrixL:105
23:42:08.639 Stack Begin - Studio
23:42:08.639 Script 'ServerScriptService.MatrixL', Line 105 - function broadcastAndCalculate - Studio - MatrixL:105
23:42:08.640 Script 'ServerScriptService.MatrixL', Line 117 - function add - Studio - MatrixL:117
23:42:08.640 Script 'ServerScriptService.DataPredict - Release Version 1.2.Optimizers.AdaptiveMomentEstimation', Line 61 - function calculate - Studio - AdaptiveMomentEstimation:61
23:42:08.640 Script 'ServerScriptService.DataPredict - Release Version 1.2.Models.NeuralNetwork', Line 293 - function gradientDescent - Studio - NeuralNetwork:293
23:42:08.641 Script 'ServerScriptService.DataPredict - Release Version 1.2.Models.NeuralNetwork', Line 637 - function train - Studio - NeuralNetwork:637
23:42:08.641 Script 'ServerScriptService.DataPredict - Release Version 1.2.Others.GradientDescentModifier', Line 153 - function startStochasticGradientDescent - Studio - GradientDescentModifier:153
23:42:08.641 Script 'ServerScriptService.DataPredict - Release Version 1.2.Others.GradientDescentModifier', Line 179 - function train - Studio - GradientDescentModifier:179
23:42:08.641 Script 'ServerScriptService.aqwamtestscript', Line 44 - Studio - aqwamtestscript:44
23:42:08.641 Stack End - Studio
local Library = require(script.Parent["DataPredict - Release Version 1.2"])
local NeuralNet = Library.Models.NeuralNetwork.new(1,0.01)
local Optimizer = Library.Optimizers.AdaptiveMomentEstimation.new()
NeuralNet:addLayer(1,true,'ReLU',Optimizer)
NeuralNet:addLayer(3,true,'ReLU',Optimizer)
NeuralNet:addLayer(3,true,'ReLU',Optimizer)
NeuralNet:addLayer(2,false,'sigmoid',Optimizer)
NeuralNet:setClassesList({0,1})
local ModifiedModel = Library.Others.GradientDescentModifier.new(NeuralNet)
local featureMatrix = {
{ 0, 0},
{10, 2},
{-3, -2},
{-12, -22},
{ 2, 2},
{ 1, 1},
{-11, -12},
{ 3, 3},
{-2, -2},
}
local labelVectorLogistic = {
{1},
{1},
{0},
{0},
{1},
{1},
{0},
{1},
{0}
}
ModifiedModel:train(featureMatrix,labelVectorLogistic)
local PredictedVector = ModifiedModel:predict({{90, 90}}) -- Should be 1
print(PredictedVector)