slearn.slearn
- class slearn.slearn(method='fABBA', ws=1, step=10, classifier_name='MLPClassifier', form='numeric', random_seed=0, verbose=1)[source]
A package linking symbolic representation with scikit-learn for time series prediction.
- classifier_name - str, default=MLPClassifier,
optional choices = {“KNeighborsClassifier”, “GaussianProcessClassifier” “QuadraticDiscriminantAnalysis”, “DecisionTreeClassifier”, “LogisticRegression”, “AdaBoostClassifier”, “RandomForestClassifier”, “GaussianNB”, “LGBM”, “SVC”, “RBF”}:
The classifier you specify for symbols prediction.
- ws - int, default=3:
The windows size for symbols to be the features, i.e, the dimensions of features.
- step - int, default=1,
The number of symbols for prediction.
- method - str {‘SAX’, ‘ABBA’, ‘fABBA’}:
The symbolic time series representation. We use fABBA for ABBA method.
- form - str, default=’numeric’:
predict in symboli form or numerical form.
- random_seed - int, default=0:
The random state fixed for classifers in scikit-learn.
- verbose - int, default=0:
log print. Whether to print progress or other messages to stdout.
- __init__(method='fABBA', ws=1, step=10, classifier_name='MLPClassifier', form='numeric', random_seed=0, verbose=1)[source]
Methods
__init__
([method, ws, step, ...])construct_train
(series)Construct features and target labels for symbols.
encode
(string)Construct features and target labels for symbols and encode to numerical values.
forecast
(x, y[, step, inversehash, centers])init_classifier
()params_secure
()predict
(**params)set_symbols
(series, **kwargs)Transform time series to specified symplic representation