Download the PHP package torian257x/ai-php-rubix-wrap without Composer
On this page you can find all versions of the php package torian257x/ai-php-rubix-wrap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download torian257x/ai-php-rubix-wrap
More information about torian257x/ai-php-rubix-wrap
Files in torian257x/ai-php-rubix-wrap
Package ai-php-rubix-wrap
Short Description AI PHP is a wrapper for rubix ml
License MIT
Informations about the package ai-php-rubix-wrap
AI PHP Rubix Wrap
A wrapper for Rubix ML to make it very approachable
Example:
Where column_with_label
is the key of the multi dimensional array $data
that contains the value that you want to predict.
Let's make a simple example:
See full example of above code here
Reports / Errors / Accuracy
Mean absolute error is basically the actual error you can expect in average. So in average if trying to predict an apartment given the space, you'd be off, in average, by 68.88$
r squared
on the other hand gives more of a feeling how good the algorithm is in %. A high r squared means it works well. For categorical features like cat
or dog
a different report is returned
Estimators / Machine Learning Algorithm
RubixService::train()
will use a default estimator (machine learning algorithm) depending on the data. If you want to choose a different estimator I recommend reading here
rubix ml choosing an estimator
Notice: Neural network is called Multilayer Perceptron in Rubix. Linear regression is called Ridge.
Per default it uses K-d Neighbors or K-d Neighbors Regressor
RubixService::train()
takes as well transformers
In detail RubixService:train()
does
- shuffle of
$data
- train against 70% of
$data
- test against 30% of
$data
You can change that behaviour by using the argument train_part_size
e.g. if you want to train on 80%, and test on 20% you would do RubixService::train(... train_part_size: 0.8)
.