cytoflowgui.workflow.operations.kmeans¶
- class cytoflowgui.workflow.operations.kmeans.KMeansWorkflowOp[source]¶
Bases:
cytoflowgui.workflow.operations.operation_base.WorkflowOperation,cytoflow.operations.kmeans.KMeansOp- default_view(**kwargs)[source]¶
Returns a diagnostic plot of the k-means clustering.
- Returns
IView
- Return type
an IView, call
KMeans1DView.plotto see the diagnostic plot.
- estimate(experiment)[source]¶
Estimate the k-means clusters
- Parameters
experiment (Experiment) – The
Experimentto use to estimate the k-means clusterssubset (str (default = None)) – A Python expression that specifies a subset of the data in
experimentto use to parameterize the operation.
- apply(experiment)[source]¶
Apply the KMeans clustering to the data.
- Returns
a new Experiment with one additional entry in
Experiment.conditionsnamedname, of typecategory. The new category has valuesname_1,name_2, etc to indicate which k-means cluster an event is a member of.The new
Experimentalso has one new statistic calledcenters, which is a list of tuples encoding the centroids of each k-means cluster.- Return type
- class cytoflowgui.workflow.operations.kmeans.KMeansWorkflowView[source]¶
Bases:
cytoflowgui.workflow.views.view_base.WorkflowByView- id = 'edu.mit.synbio.cytoflowgui.op_plugins.kmeans'¶
- friendly_id = 'KMeans'¶
- plot(experiment, **kwargs)[source]¶
A default
plotthat passescurrent_plotas the plot name.