local Model = {}
local MT = {}
MT.__index = MT
local Datapredict = require(game.ReplicatedStorage["DataPredict - Release Version 1.14"])
local NeuralNetwork = Datapredict.Models.NeuralNetwork.new()
function Model.new()
local self = {}
setmetatable(self, MT)
self.Datapredict = require(game.ReplicatedStorage["DataPredict - Release Version 1.14"])
return self
end
function MT:Train(featureMatrix, Banned)
local SVM = self.Datapredict.Models.SupportVectorMachine.new(55, 5, 'RadialBasisFunction')
SVM:train(featureMatrix, Banned)
self.Model = SVM
end
function MT:UpdateChance(dt, chance, increment)
local value = chance/math.sqrt(dt)
value += increment
return value
end
function MT:PredictIfBanned(Varibles)
return self.Model:predict(Varibles, Varibles)
end
return Model
normal Script:
local ACModule = require(game.ReplicatedStorage["Anti-Cheat"])
local Model = ACModule.new()
local Feature = {
{10, 100},
{40, 70}
}
local Label = {
{"1"},
{"0"}
}
print(Model)
Model:Train(Feature, Label)
Model:PredictIfBanned({50, 80})
Hey guys, I want to let you guys know that I made minor code refactoring to fix some issues for Release 1.16 version of the library. I recommend you to update the library as soon as possible.
Hey guys! I renamed some of the functions in the MatrixL for less verbosity and required some refactoring in the DataPredict library.
It’s not urgent to update the library, but if you find yourself getting errors before updating any libraries, then all you need is to update both of the libraries at the same time.
Refactored RandomNetworkDistillation so that it no longer inherits NeuralNetwork. Please use setModel() function to add neural network model to it. Also added deep copy option for TargetModelParameters and PredictorModelParameters.
Regularization no longer need number of data, instead the gradient method models will handle the operations related to it instead.
Improved calculations related to calculation of cost function derivatives involving both regularization and optimizers.
Fixes
Made some bug fixing.
Removed
LongShortTermMemory and RecurrentNeuralNetwork models are removed as these do not work well with the current API.
Note
These changes are for preparing long-term maintenance mode and will no longer receive new updates or features. In other words, this library will soon reach End-Of-Support.
If you want a more advanced deep learning library, you can have a look at DataPredict Neural here.
In the future, LSTM and RNN will be added to the DataPredict Neural library to replace the models that are being removed from the current DataPredict library.
Hello guys! I made some fixes to affinity propagation model and made some changes.
If anyone is using that model, I highly recommend you to replace the current version of Release 1.17 to updated version of Release 1.17 as soon as possible.
Hello guys! I made some fixes and improvements to all experience replays.
If anyone using any kind of experience replay, I highly recommend you to replace the current version of Release 1.17 to updated version of Release 1.17 as soon as possible.
im making a new Anti-Cheat now, but why does the cost value just go up? ive tried different combos of different MatrixL and DataPredict versions but nothing works, heres the code:
local module = {}
local MT = {}
MT.__index = MT
function module.new(Dataset, Varibles, Externals, Mask)
local self = {}
setmetatable(self, MT)
local NewDataset = {}
local Labels = {}
for i, v in pairs(Dataset) do
local Div = 0
for i2, v2 in pairs(v["Divs"]) do
Div += v2
end
Div = Div * v["Time"]
local Statistics = {}
for i2, Stat in pairs(v["Stats"]) do
table.insert(Statistics, Stat/Div)
end
for i2, v2 in pairs(Externals) do
if v["Externals"][v2] then
table.insert(Statistics, v["Externals"][v2])
else
table.insert(Statistics, Mask)
end
end
if v["Cheater"] == true then
table.insert(Labels, {1})
else
table.insert(Labels, {-1})
end
table.insert(NewDataset, Statistics)
end
print(NewDataset)
local Model = require(game.ReplicatedStorage.DataPredict.Models.SupportVectorMachine).new(100, 1, 'RadialBasisFunction')
Model:train(NewDataset, Labels)
return self
end
return module