This is the documentation for the Project Prolog MLpack Library.
Here you can find documentaion on the used Datatypes, a detailed documentation for the available Methods and for the helper files.
Quickstart
Todo
Data Types
To connect mlpack and SICStus prolog i used the c interface of SICStus which can convert prolog datatypes to c datatypes and vise versa.
Here you can find a list of the available conversion types.
Extra Symbols
-
'+' is the symbol for inupting a concret value from prolog to c/c++
-
'-' is the symbol for inputing a variable from prolog to c/c++ that then gets assigned a value in one c side, that then can be used on the prolog side.
-
'[-]'
is the symbol for an output value from c/c++ to prolog, in its function very similar to -.
Data Types
-
integer
are the normal numbers 1,2,3...
c/c++ : SP_integer
-
float
are the numbers like 0.0, 1.2, 5.7...
full definition prolog : float_32 shortend to float32 since this has the correct Byte size for its counter part double
c/c++ : double
-
string
are just atoms like: word, hello, nice7...
c/c++ : char const *
-
integer(bool)
there are no bool atoms in Prolog that could translate to bool in c, so i chose integer numbers as replacement with 1 = true and 0(or any other int number) = false
c/c++ : SP_integer (1)true, (0)false
-
matrix
is defined a just a long list/vector where you specify its row numbers
currently on the prolog side you have to convert a normal list like [1, 2, 3] to a float_array with the help of some helper predicates in helper.pl.
input :
- prolog : +pointer(float_array) (converted list), +integer (list length), +integer (Rows)
- c/c++ : float * array, SP_integer size, SP_integer rows
output :
- prolog : -pointer(float_array) (converted list), -integer (Columns), -integer (Rows)
- c/c++ : float **array, SP_integer *colums, SP_integer *rows
-
vector
currently on the prolog side you have to convert a normal list like [1, 2, 3] to a float_array with the help of some helper predicates in helper.pl.
prolog : pointer(float_array) (converted list), integer (list length)
c/c++ : float *array, SP_integer size
Prolog Methods
Here you can find all the documentation sites for the implemented mlpack methods of this libraray.
In the project they can be found under :
/src/methods/name_of_method
Classification
- Adaboost
- Decision_Stump
- Decision_Tree
- Hoeffding_Tree
- Linear_SVM
- Logistic_Regression
- NBC
- Perceptron
- Random_Forest
- Softmax_Regression
Regression
Clustering
- DBScan
- GMM
- KMeans
- Mean_Shift
Geometry
Preproccessing
- Preproccess_Split
- Preproccess_Binarize
- Preproccess_Describe
- Preproccess_Scale
- Preproccess_One_Hot_Encoding
- Image_Converter