Table Of Contents

LibsvmModel predict


predict(self, frame, observation_columns=None)

[ALPHA] New frame with new predicted label column.

Parameters:

frame : <bound method AtkEntityType.__name__ of <trustedanalytics.rest.jsonschema.AtkEntityType object at 0x7f9e686f3fd0>>

A frame whose labels are to be predicted.

observation_columns : list (default=None)

Column(s) containing the observations whose labels are to be predicted. Default is the columns the LIBSVM model was trained on.

Returns:

: <bound method AtkEntityType.__name__ of <trustedanalytics.rest.jsonschema.AtkEntityType object at 0x7f9e686f3fd0>>

A new frame containing the original frame’s columns and a column predicted_label containing the score calculated for each observation.

Predict the labels for a test frame and create a new frame revision with existing columns and a new predicted label’s column.

Examples

>>> my_model = ta.LibsvmModel(name='mySVM')
>>> my_model.train(train_frame, 'name_of_label_column',['name_of_observation_column1'])
>>> predicted_frame = my_model.predict(predict_frame, ['predict_for_observation_column'])