A Python implementation of FlowSOM algorithm with parallelized consensus metaclustering
Project description
FlowSOM
Python implementation of the FlowSOM algorithm based on minisom and ConsensusClustering.
The main advantage over the current implementations is the parallelized nature of the ConsensusClustering.
Installation
pip install flowsom-clustering
Basic usage:
import numpy as np
import pandas as pd
from FlowSOM import flowsom
# import your data via pandas or numpy
data = pd.DataFrame(data = np.random.rand(250,10),
columns = [str(i) for i in range(10)])
cluster_annotations = flowsom(data = data, # input data array
x_dim = 50, # x dimension of the self organized map
y_dim = 50, # y dimension of the self organized map
sigma = 1, # spread of the neighborhood function
learning_rate = 0.5, # initial learning rate
n_iterations = 100, # trains the map for 100 iterations
neighborhood_function = "gaussian", # defines the neighborhood function
consensus_cluster_algorithm = "AgglomerativeClustering", # runs Consensus Clustering with Agglomerative Clustering
consensus_cluster_min_n = 10, # minimum n_clusters to check for optimal clustering
consensus_cluster_max_n = 50, # maximum n_clusters to check for optimal clustering
consensus_cluster_resample_proportion = 0.5, # resample proportion for the consensus finding
consensus_cluster_n_resamples = 10, # number of resamples for consensus clustering
verbose = False, # whether to be verbose
n_jobs = None, # number of joblib.Parallel threads
random_state = 187 # seed for reproducibility of the results
)
data["flowsom_consensus"] = cluster_annotations
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for flowsom_clustering-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d0e6a9892eca29f8d4841e4ec6e98b86492fc181908517c57cfda78e7080da4 |
|
MD5 | 40a3c6772d6980161aecd590c39fd188 |
|
BLAKE2b-256 | 9e954ee2521c17762130ac656f04c9c76c2ea18ec11da9ee073e2e34d4aee8e2 |