Machine Learning has been added to Tiki23 as a built-in (but optional) feature, using the Rubix ML library, which provides 40+ supervised and unsupervised learning algorithms.
In this basic documentation to machine learning feature in Tiki, you'll discover how to create Machine leaning (ML) models, train against data stored in trackers and query models.
Machine Learning (ML) is a form of Artificial Intelligence (AI) that uses data to train a computer to perform tasks. Unlike traditional programming, in which rules are programmed explicitly, machine learning uses algorithms to build rulesets automatically. At a high level, machine learning is a collection of techniques borrowed from many disciplines including statistics, probability theory, and neuroscience combined with novel ideas for the purpose of gaining insight through data and computation.
Machine Learning is further broken down into subcategories based on how the learners are trained and the tasks they handle.
In this documentation we assume that you already have a basic understanding of the different types of machine learning such as classification and regression. If not, we recommend What is Machine Learning? to start with.
Rubix ML is a high-level machine learning and deep learning library for the PHP language that includes implementations of several machine learning algorithms, so you can define a model object in a single line or a few lines of code, then use it to fit a set of points or predict a value. It is Open Source and free to use commercially.
The library provides tools for the entire machine learning life cycle from ETL (extracting, transforming, loading, manipulating and summarising data) to training, cross-validation, and production with over 40 supervised and unsupervised learning algorithms. A number of algorithms in the library support Deep Learning including the Multilayer Perceptron classifier and MLP Regressor.
This library has been added in tiki starting with version 23 in order to give Tiki users access to the power of artificial intelligence and machine learning .
It opens up so many possibilities for Tiki users :
To start using Machine Learning in Tiki, the Machine Learning feature must first be enabled in control panel.
Machine Learning models in Tiki use data from Trackers to learn. This makes it compulsory to have the Trackers feature also enabled. Check it is enabled on the same admin control panel page.
Additionally, you might want only selected users to manage and use the Machine Learning models. In that case, you can give the permissions to the relevant users in the User Settings page.
At this point, you are ready to start creating and using Machine Learning models in Tiki with only a few more steps ahead. The next steps being to prepare the training dataset and then creating the Machine Learning model. Model configuration and training steps come last.
A Machine Learning model after being trained can then be used to make predictions as described in Using Machine Learning Models.
Suppose that you went out and asked 4 couples (2 married and 2 divorced) to respond to 3 features - their partner's communication skills (between 1 and 5), attractiveness (between 1 and 5), and time spent together per week (hours per week). You would follow the following steps to setup a Machine Learning model in Tiki that will predict whether other couples will get divorced or remain married.
Get the data you collected by asking the four couples in our example into a Tiki Tracker. To import a dataset into tiki, we need to create a tiki tracker with the corresponding data fields then import the csv file. The tracker will be used as our data set to create a machine learning model.
As a side note, we can even create a fake dataset (tracker) to train our model by populating fields and items manually.
So trackers are define as input sources - one or more tracker fields would be the feature set and item ID will be the label.
Continuing with our example, structure the data gotten from the couples in a tracker like in the example below.
Go to the List Models page under the Machine Learning menu to launch the tiki-ml-list page containing the list of models; from there you can click on the add button to launch the new model creation form.
On the Machine Learning model Edit Page
Go to List Models page under the Machine Learning menu to launch the tiki-ml-list page containing the list of models; from there you can click on the train button for the corresponding model.
If data source is not big, you can train via web interface. Otherwise, it is better to use the new console command (ml:train) and do this with a scheduler - e.g. train every night.
php console.php ml:train <mlmId>
Something important I see here is that trained models are stored as cached content on disk. Clearing Tiki cache will require to re-train the model.
Go to the "List Models" under the Machine Learning menu to launch the tiki-ml-list page containing the list of models; from there you can click on the use button to use the corresponding model.
Use this model by entering a sample information in the form this execute a query against the trained model. This will produce results based on the chosen estimator and show you the most relevant matches.
That's in short. I suppose you will have a lot of feedback, so curious to hear how to continue/improve here.
One way to experiment is different source options - more than trackers, e.g. wiki pages, action log items, calendar items, files, etc. Files should probably give us the ability to upload a csv of a sample data to train against.
ID | Name | Comment | Uploaded | Size | Downloads | |
---|---|---|---|---|---|---|
174 | 2020-11-15 20.06.07.gif | Using the model to make predictions. | Nat Okpe | 1.10 Mb | 30 | |
173 | 2020-11-15 19.42.06.gif | Train the Machine Learning model. | Nat Okpe | 461.85 Kb | 32 | |
172 | 2020-11-15 18.18.05.gif | Configure the Machine Learning model. | Nat Okpe | 1.94 Mb | 32 | |
171 | 2020-11-15 17.59.48.gif | Create the Machine Learning model | Nat Okpe | 1.29 Mb | 44 | |
170 | 2020-11-15 17.42.28.gif | Structure data in a Tiki Tracker. | Nat Okpe | 2.06 Mb | 40 | |
169 | 2020-11-11 22.26.24.gif | Trackers are input sources for Machine Learning models. One or more tracker fields would be the feature set and item ID will be the label. | Nat Okpe | 7.69 Mb | 39 | |
168 | 2020-11-11 21.29.06.gif | Assign Machine Learning permissions to relevant users. | Nat Okpe | 1.20 Mb | 35 | |
167 | 2020-11-11 21.03.18.gif | Enable Machine Learning feature in control panel. | Nat Okpe | 2.00 Mb | 41 |