pre_partitioning: K-means clustering based on outlier detection

View source: R/pre_partitioning.R

pre_partitioningR Documentation

K-means clustering based on outlier detection

Description

Get the result of K-means area division after outlier detection.

Usage

pre_partitioning(
  dat = NULL,
  partition_count = NULL,
  batch_size = min(500, nrow(dat)),
  num_init = 10,
  max_iters = 1000,
  outlier_det = TRUE,
  outlier_methods = "md",
  outlier_q = 0.2,
  min_n = 200,
  seed = 723
)

Arguments

dat

expression matrix, row is cell, col is feature

partition_count

the number of partitions

batch_size

the number of threads

num_init

the proportion of outliers that need to be removed

max_iters

the maximum iterations for kmeans

outlier_det

whether running outlier detection

outlier_methods

outlier detection methods, md or ed. "md" utilizes the Mahalanobis distance for detection, while "ed" treats points that are far from the center proportionally as outliers.

outlier_q

the proportion of outliers you want to filter. When outlier_methods is ed, this parameter takes effect.

min_n

the minimum number of data points for outlier detection.

seed

random seed

Value

A list that include K-means result, division result, and center matrix was removed outliers


renjun0324/KKLClustering documentation built on Oct. 8, 2024, 7:39 p.m.