Implementation details
We apply PyCaret with Python 3.6, an open-source machine learning package deployed with 18 algorithms, to select the best model as well as the hyper-parameters for purpose identification. According to the results of 10-fold cross-validation on the training set, we use LightGBM as the classifier with a learning rate of 0.1, minimum child samples as 20, minimum child weight as 0.001, number of estimators as 100, number of leaves as 100, and other default settings in [83]. We use LabelEncoder in sklearn [100] to encode categorical features. Features with multiple values (e.g., domain role) are represented as Bag-of-Words [120] using CountVectorizer in sklearn. For sequence-like features (e.g., keys in the request body), we aggregate such features as a “document” for each sample and apply TF-IDF [107] for the feature representation. Finally, we concatenate all features as the input to the classifier.