Training Your AI Using Triples

In this example we will walk you through how to train your AI. First create a file with facts formatted as Subject Verb Object.

Below is the contents of an example file,

s,v,o,Label
me,love,cat,Yes
me,love,dog,Yes

This file will contain core facts that define what your AI believes. You load the file into Triples=Lang using the records command.

records load facts.csv;

Now you can train a learner on the data, For simple response models based on facts, a tree works well. You train the AI using the learner command then specify the learner, the independent columns and the target column,

learner tree s|v|o->Label;


Once the model finishes you can save the model for later reuse.

learner save tree->fact.tree;

Loading a model is similar to saving.
learner load tree->fact.tree;

Now your AI is ready to respond to a question,

reason decide me|love|cat|;  

Your AI will repsond

True