DTDA ML - Machine Learning models

An asset by DTDAGames
The page banner background of a mountain and forest
DTDA ML - Machine Learning models hero image

Quick Information

0 ratings
DTDA ML - Machine Learning models icon image
DTDAGames
DTDA ML - Machine Learning models

DTDA ML allows you to run machine learning models like KNN, Linear Regression, Logistic Regression, SVM.

Supported Engine Version
4.0
Version String
0.0.2
License Version
Apache-2.0
Support Level
community
Modified Date
2 months ago
Git URL
Issue URL

dtda_ml

DTDA ML allows you to run machine learning models like KNN, Linear Regression, Logistic Regression, SVM

4 models are currently available:

  • KNN
  • Linear Regression
  • Logistic Regression
  • SVM

=== MLTools features ===

Use MLTools.new() to create a new MLTools. _dropVariable() and _getVariable() allows you to drop a column, or keep column from an array. This is usefull to create X_train and Y_train for all models

Example:

  • data = [ [1, 1, 1, 0, 1], [1, 1, 1, 1, 1], [1, 0, 0, 0, 0] ]
  • var ml = MLTools.new()
  • var X_train = ml._dropVariable(data, data[0].size()-1) #return an array of array without the last column
  • var y_train = ml._getVariable(data, data[0].size()-1) #return an array of array only with the last column

=== KNN Model ===

Use DTDAKNN.new() to create a new model. _fit() and _predict() allows you to train and use the model. This model is better for classification.

Example:

  • var knn = DTDAKNN.new(3)
  • knn._fit(X_train, y_train)
  • var X_test = [ [1, 1, 0, 1] ]
  • print("KNN prediction: ", knn._predict(X_test))

=== Linear Regression Model ===

Use DTDALinReg.new() to create a new model. _fit() and _predict() allows you to train and use the model. This model is better for Regression.

Example:

  • var linreg = DTDALinReg.new(0.01, 1000)
  • linreg._fit(X_train, y_train)
  • var X_test = [ [1, 1, 0, 1] ]
  • print("Linear Regression prediction: ", linreg._predict(X_test))

=== Logistic Regression Model ===

Use DTDALogReg.new() to create a new model. _fit() and _predict() allows you to train and use the model. This model is only for classification (1 or 0).

Example:

  • var logreg = DTDALogReg.new(0.01, 1000)
  • logreg._fit(X_train, y_train)
  • var X_test = [ [1, 1, 0, 1] ]
  • print("Logistic Regression prediction: ", logreg._predict(X_test))

=== SVM Model ===

Use DTDASVM.new() to create a new model. _fit() and _predict() allows you to train and use the model. This model is only for classification (1 or -1).

Example:

  • var svm = DTDASVM.new(0.01, 0.01, 1000)
  • svm._fit(X_train, y_train)
  • var X_test = [ [1, 1, 0, 1] ]
  • print("SVM prediction: ", svm._predict(X_test))

DTDA ML allows you to run machine learning models like KNN, Linear Regression, Logistic Regression, SVM.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
DTDA ML - Machine Learning models icon image
DTDAGames
DTDA ML - Machine Learning models

DTDA ML allows you to run machine learning models like KNN, Linear Regression, Logistic Regression, SVM.

Supported Engine Version
4.0
Version String
0.0.2
License Version
Apache-2.0
Support Level
community
Modified Date
2 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers