[−][src]Function appr_dbscan::do_appr_dbscan_auto_dimensionality_file
pub fn do_appr_dbscan_auto_dimensionality_file<P>(
filename: P,
epsilon: f64,
rho: f64,
min_pts: usize
) -> (VectorDBSCANResult, usize) where
P: AsRef<Path>,
Function that returns the result of the approximate DBSCAN algorithm without prior knowledge of the points dimensionality
, executed on the set of points contained in filename
with the given values of epsilon and rho.
Arguments
filename
: the path to the file containing the data points. The file should be formatted with one point per line and the values for each coordinate should be separated by a white space. Only numerical coordinates values are accepted.epsilon
: the radius for the DBSCAN algorithm.rho
: the approximation factor. The smaller it is the more precise the result. Usual values are 0.1 and 0.01.min_pts
: the minimum number of nearby points required by the DBSCAN algorithm to declare an area as 'dense'.
Return value
This function returns a vector of clusters, where each cluster is a vector of the points contained in it. Each point is stored as a vector of f64
,
contrary to the other functions, along with the detected dimensionality of the points inside.
The element at index 0
is the collection of all noise points, while all the other elements are the actual clusters.
Example
extern crate appr_dbscan; use appr_dbscan::do_appr_dbscan_auto_dimensionality_file; let (res,dimensionality) = do_appr_dbscan_auto_dimensionality_file("./datasets/out_test_1.txt", 0.3, 0.1, 10); let clusters_count = res.len() - 1; let noise_points_count = res[0].len();