ProximityTree

class sktime.classification.distance_based.ProximityTree(random_state=None, get_exemplars=<function get_one_exemplar_per_class_proximity>, distance_measure=None, get_distance_measure=None, setup_distance_measure=<function setup_all_distance_measure_getter>, get_gain=<function gini_gain>, max_depth=inf, is_leaf=<function pure>, verbosity=0, n_jobs=1, n_stump_evaluations=5, find_stump=None)[source]

Proximity Tree class to model a decision tree which uses distance measures to partition data.

@article{lucas19proximity,

title={Proximity Forest: an effective and scalable distance-based classifier for time series}, author={B. Lucas and A. Shifaz and C. Pelletier and L. O’Neill and N. Zaidi and B. Goethals and F. Petitjean and G. Webb}, journal={Data Mining and Knowledge Discovery}, volume={33}, number={3}, pages={607–635}, year={2019}

} https://arxiv.org/abs/1808.10594

label_encoder[source]

label encoder to change string labels to numeric indices

classes_[source]

unique list of classes

random_state[source]

the random state

get_exemplars[source]

function to extract exemplars from a dataframe and

class value list
setup_distance_measure[source]

function to setup the distance measure

getters from dataframe and class value list
get_distance_measure[source]

distance measure getters

distance_measure[source]

distance measures

get_gain[source]

function to score the quality of a split

verbosity[source]

logging verbosity

n_jobs[source]

number of jobs to run in parallel *across threads”

find_stump[source]

function to find the best split of data

max_depth[source]

max tree depth

depth[source]

current depth of tree, as each node is a tree itself,

therefore can have a depth of >=0
X[source]

train data

y[source]

train data labels

stump[source]

the stump used to split data at this node

branches[source]

the partitions of data driven by the stump

__init__(random_state=None, get_exemplars=<function get_one_exemplar_per_class_proximity>, distance_measure=None, get_distance_measure=None, setup_distance_measure=<function setup_all_distance_measure_getter>, get_gain=<function gini_gain>, max_depth=inf, is_leaf=<function pure>, verbosity=0, n_jobs=1, n_stump_evaluations=5, find_stump=None)[source]

build a Proximity Tree object :param random_state: the random state :param get_exemplars: get the exemplars from a given dataframe and list of class labels :param distance_measure: distance measure to use :param get_distance_measure: method to get the distance measure if no already set :param setup_distance_measure: method to setup the distance measures based upon the dataset given :param get_gain: method to find the gain of a data split :param max_depth: maximum depth of the tree :param is_leaf: function to decide when to mark a node as a leaf node :param verbosity: number reflecting the verbosity of logging :param n_jobs: number of parallel threads to use while building :param find_stump: method to find the best split of data / stump at a node :param n_stump_evaluations: number of stump evaluations to do if find_stump method is None