Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Create a model that can learn how to accurately predict a label from given text (train model).

For example: Consider a table with two columns: list of all cities in a country (comma separated string) and country name. Create a model that can identify country name from a list of cities. The list of the cities in the prediction can be incomplete compared to the training list. For instance, adding "Cleveland, London, Paris, Venice" would predict "USA" because cities with all four of the names are found in the USA in addition to other countries.

Cleveland, London => USA, England
Paris => France, USA(CA)
Venice => Italy, USA(FL)

Operator usage in easy mode

  1. Click + on the parent node.

  2. Enter Create Model from Text operator in the search field and select the operator from the Results to open the operator form.

  3. In the Table drop-down, enter or select the table to create a model.

  4. In the Model Name field, enter the name of the model to store it in a particular location.

  5. In the Label Column Name drop-down, select a column name that contains the labels. The drop-down list displays the data based on the selected table name.

  6. Optional. In the Column Names, click Add More to add the list of column names used to create the model.

  7. Click Run to view the result.

  8. Click Save to add the operator to the playbook.

  9. Click Cancel to discard the operator form.

Usage details

LQL Command

createModelFromText(table, outputModelName, label, listOfColumns)

Input
table: Input table to train a model.
outputModelName: Model name to store trained model. Trained models are not displayed in the UI, so remember the name of the model that was created. If a model with the same name exists, this operation overwrites it without notification.
label: Label column name.
listOfColumns: List of columns to train a model to learn label, such as "col1", "col2", "col3".

Output
A message saying the model (name) was successfully created.

Example

Input

id

title

description

label

1

a b c d

e f g h i

spam

1

a x y d u

u v e g x y

ham

LQL command

createModelFromText(table,"scoreEmail", "label", "title", "description")

Output

If the operation is successful, a message that the model was successfully created. To use in prediction, see the checkout predictLabelFromText operator.

  • No labels