Table of Contents

Module: __init__ compClust/mlx/labelings/__init__.py
Imported modules   
from ElementLabeling import ElementLabeling
from GlobalElementLabeling import GlobalElementLabeling, GlobalElementWrapper
from GlobalLabeling import GlobalLabeling, GlobalWrapper
from Labeling import Labeling
Functions   
castToGlobalLabeling
subsetByLabeling
  castToGlobalLabeling 
castToGlobalLabeling (
        lab,
        name=None,
        removeLocal=1,
        )

cast the given labeling to a global label, if name is none the name of the local labeling is percolated to the global labeling. if removeLocal is set, the local labeling is removed. A globalWrapper analogous to the lab is returned.

  subsetByLabeling 
subsetByLabeling (
        ds,
        labeling,
        obj,
        )

Creates and returns an arbitrary view based on a valid labeling of the dataset.

If the labeling passed is not directly tied to the dataset object, the subset returned will be the subset of self which corresponds to the datapoints labeling in the dataset to which the labeling is attatched.

The application of this behavior can be expressed in the following situation:

Given a Dataset, perform two clusterings which result in two labelings. Using these labelings, create two views, one per clustering of a particular cluster. Then create a labeling for the view which labels all the data. Now apply this labeling to the second view to create a subset of common datapoints. The code to do this may be like the following.

view1 = dataset.subset(labeling1, "cluster 2") view2 = dataset.subset(labeling2, "cluster 6")

newlabeling1 = view1.createLabeling() newlabeling1.addLabelToRows("foo", range(view1.getNumRows()))

commonGenes = view2.subset(newlabeling1, "foo")

At the conclusion of this code, the commonGenes view will hold the data which is in view2 and also labeled "foo" in newlabeling1


Table of Contents

This document was automatically generated on Wed Aug 27 14:24:59 2003 by HappyDoc version 2.1