Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/o/r/Orange-2.7.2/Orange/testing/unit/tests/test_hclustering.py   Orange(Download)
    def test_pickling_on(self, data):
        cluster = clustering(data, Euclidean, HierarchicalClustering.Single)
        s = pickle.dumps(cluster)
        cluster_clone = pickle.loads(s)
        self.assertEqual(len(cluster), len(cluster_clone))
        self.assertEqual(cluster.mapping, cluster_clone.mapping)

src/o/r/Orange-2.7.2/Orange/testing/unit/tests/test_svm.py   Orange(Download)
    def test_rfe_on(self, data):
        rfe = RFE()
        num_selected = min(5, len(data.domain.attributes))
        reduced = rfe(data, num_selected)
        self.assertEqual(len(reduced.domain.attributes), num_selected)
        scores = rfe.get_attr_scores(data, stop_at=num_selected)
        self.assertEqual(len(data.domain.attributes) - num_selected, len(scores))