The machine learning functions are not optimized for distributed processing.
The capability to train large data sets is limited by this execution of the
final training on a single instance.
Feature vector
To solve a problem with the machine learning technique, especially as a supervised learning problem, it is necessary to represent the data set with the sequence of pairs of labels and feature vector. A label is a target value you want to predict from the unseen feature and a feature is a A N-dimensional vector whose elements are numerical values. In Trino, a feature vector is represented as a map-type value, whose key is an index of each feature, so that it can express a sparse vector. Since classifiers and regressors can recognize the map-type feature vector, there is a function to construct the feature from the existing numerical values, features():Classification
Classification is a type of supervised learning problem to predict the distinct label from the given feature vector. The interface looks similar to the construction of the SVM model from the sequence of pairs of labels and features implemented in Teradata Aster or BigQuery ML. The function to train a classification model looks like as follows:Regression
Regression is another type of supervised learning problem, predicting continuous value, unlike the classification problem. The target must be numerical values that can be described asdouble
.
The following code shows the creation of the model predicting sepal_length
from the other 3 features: