Classifier
ProximityTree
Proximity Tree class.
Quickstart
python
from sktime.classification.distance_based import ProximityTree
estimator = ProximityTree(random_state=None, distance_measure=None, max_depth=inf, is_leaf=<function pure>, verbosity=0, n_jobs=1, n_stump_evaluations=5)Parameters(7)
- random_state: int or np.RandomState, default=0
- random seed for the random number generator
- distance_measure: ``None`` (default) or str; if str, one of
euclidean,dtw,ddtw,wdtw,wddtw,msm,lcss,erpdistance measure to use ifNone, selects distances randomly from the list of available distances- max_depth: int or math.inf, default=math.inf
- maximum depth of the tree
- is_leaffunction, default=pure
- decide when to mark a node as a leaf node
- verbosity: 0 or 1
- number reflecting the verbosity of logging 0 = no logging, 1 = verbose logging
- n_jobs: int or None, default=1
- number of parallel threads to use while building
- n_stump_evaluations: number of stump evaluations to do if find_stump method is None
Examples
>>> from sktime.classification.distance_based import ProximityTree
>>> from sktime.datasets import load_unit_test
>>> X_train, y_train = load_unit_test (split = "train", return_X_y = True)
>>> X_test, y_test = load_unit_test (split = "test", return_X_y = True)
>>> clf = ProximityTree (max_depth = 2, n_stump_evaluations = 1)
>>> clf. fit (X_train, y_train) ProximityTree(
... )
>>> y_pred = clf. predict (X_test)