Did I find the right examples for you? yes no

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

src/s/c/scikit-learn-0.14.1/examples/hashing_vs_dict_vectorizer.py   scikit-learn(Download)
t0 = time()
vectorizer = DictVectorizer()
vectorizer.fit_transform(token_freqs(d) for d in raw_data)
duration = time() - t0
print("done in %fs at %0.3fMB/s" % (duration, data_size_mb / duration))

src/s/k/skll-0.23.1/skll/data.py   skll(Download)
        raise e
    try:
        features = feat_vectorizer.fit_transform(feat_dict_generator)
    except ValueError:
        raise ValueError('The last feature file did not include any features.')

src/s/k/skll-HEAD/skll/data.py   skll(Download)
        raise e
    try:
        features = feat_vectorizer.fit_transform(feat_dict_generator)
    except ValueError:
        raise ValueError('The last feature file did not include any features.')

src/n/l/NLP_GDGCairo2013-HEAD/franco.py   NLP_GDGCairo2013(Download)
        featureset.append(features)
        labels.append(label)
    featureset_scikit = v.fit_transform(featureset)
    nb = MultinomialNB(alpha=0.1, fit_prior=False)
    nb.fit(featureset_scikit, labels)

src/s/c/scikit-learn-0.14.1/sklearn/feature_extraction/tests/test_dict_vectorizer.py   scikit-learn(Download)
        for dtype in (int, np.float32, np.int16):
            v = DictVectorizer(sparse=sparse, dtype=dtype)
            X = v.fit_transform(D)
 
            assert_equal(sp.issparse(X), sparse)
            {"version=3": True, "spam": -1}]
    v = DictVectorizer()
    X = v.fit_transform(D_in)
    assert_equal(X.shape, (3, 5))
 

src/p/r/Predicting-Code-Popularity-HEAD/run_test.py   Predicting-Code-Popularity(Download)
 
    vec = DictVectorizer()
    X = vec.fit_transform(dict_repos)
    #X = X.todense()
 

src/p/r/Predicting-Code-Popularity-HEAD/module_test.py   Predicting-Code-Popularity(Download)
 
    y = np.array([class_to_id[classes.classify(r)] for r in repos])
    X = vectorizer.fit_transform(dict_repos)
 
    clf = get_classifier(X, y)