trajminer.clustering.DBSCAN

class trajminer.clustering.DBSCAN(eps=0.5, min_samples=5, measure='precomputed', n_jobs=1)

DBSCAN Clustering.

epsfloat (default=0.5)

The maximum distance between two trajectories for them to be considered in the same neighborhood.

min_samplesint (default=5)

The minimum number of trajectories in a neighborhood for a trajectory to be considered as a core point, including the trajectory itself.

measureSimilarityMeasure object or str (default=’precomputed’)

The similarity measure to use for computing similarities (see trajminer.similarity) or the string ‘precomputed’.

n_jobsint (default=1)

The number of parallel jobs.

Ester, M., Kriegel, H. P., Sander, J., & Xu, X. (1996, August). A density- based algorithm for discovering clusters in large spatial databases with noise. In Kdd (Vol. 96, No. 34, pp. 226-231).

__init__(eps=0.5, min_samples=5, measure='precomputed', n_jobs=1)

Initialize self. See help(type(self)) for accurate signature.

fit_predict(X)

Fits and returns the predictions for the given test data.

Xarray-like, shape (n_samples, max_length, n_features)

Input data. If measure == ‘precomputed’, then X is a distance matrix with shape (n_samples, n_samples).

predictionsarray-like, shape (n_samples)

Assigned cluster for each input sample.