Skip to content
Snippets Groups Projects
Commit 9fb04e5f authored by Dean Samuel Schmitz's avatar Dean Samuel Schmitz
Browse files

Update README.md

parent 8e3b6d79
Branches
No related tags found
No related merge requests found
...@@ -42,3 +42,18 @@ For a list of the functions the BayesianLinearRegression method has go to ...@@ -42,3 +42,18 @@ For a list of the functions the BayesianLinearRegression method has go to
[Mlpack BayesianLinearRegression documentation](https://www.mlpack.org/doc/stable/doxygen/classmlpack_1_1regression_1_1BayesianLinearRegression.html) [Mlpack BayesianLinearRegression documentation](https://www.mlpack.org/doc/stable/doxygen/classmlpack_1_1regression_1_1BayesianLinearRegression.html)
For Arrays i have added predicates for converting Prolog lists [] to the needed float_array type and when receiving an array also Predicates for converting it to a normal list.
A Matrix is just a long list with the added information how many row it has.
In both cases when using the array in a function the size must also be send, since after sending or receiving it you cant get the length of the array from itself.
for example:
```
train :-
convert_list_to_float_array([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5],3, array(Xsize, Xrownum, X)),
convert_list_to_float_array([0.2,0.2,0.2,0.2], array(Ysize, Y)),
train(X,Xsize, Xrownum,Y, Ysize).
```
here the longer list representing a Matrix gets convertet into an array X with the row amount, and the smaller list into an array Y.
And they get used in the foreign function from BayesianLinearRegression that takes an Matrix of points and a vector of targets to train the model.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment