ff8dccc29edca64877b3cef1b53c7958ce321f76,dirty_cat/test/test_similarity_encoder.py,,test_similarity_encoder,#,7

Before Change


    X = np.array(["aa", "aaa", "aaab"]).reshape(-1, 1)
    X_test = np.array([["aa", "aaa", "aaa", "aaab", "aaac"]]).reshape(-1, 1)
    model.fit(X)
    encoder = model.transform(X_test)
    ans = np.zeros((len(X_test), len(X)))
    for i, x_t in enumerate(X_test.reshape(-1)):
        for j, x in enumerate(X.reshape(-1)):
            ans[i, j] = lev.ratio(x_t, x)

After Change


            for i, x_t in enumerate(X_test.reshape(-1)):
                for j, x in enumerate(X.reshape(-1)):
                    ans[i, j] = jaro_distance(x_t, x)
            assert np.array_equal(encoder, ans)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: dirty-cat/dirty_cat
Commit Name: ff8dccc29edca64877b3cef1b53c7958ce321f76
Time: 2018-03-14
Author: patricio.cerda@inria.fr
File Name: dirty_cat/test/test_similarity_encoder.py
Class Name:
Method Name: test_similarity_encoder


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: d7dfef48a5afaf3d3a664ca9997baecd50c94cd6
Time: 2019-05-17
Author: joshua.dunn@engie.com
File Name: category_encoders/tests/test_count.py
Class Name: TestCountEncoder
Method Name: test_count_min_group_size_int


Project Name: lmcinnes/umap
Commit Name: 7178ab901cbe8283288c69836af2e9aa69fd24d4
Time: 2021-02-09
Author: valerio.maggio@gmail.com
File Name: umap/tests/test_parametric_umap.py
Class Name:
Method Name: test_inverse_transform


Project Name: rasbt/mlxtend
Commit Name: edb96f18196fda66df69fe5214b8f6cf6f12f461
Time: 2017-09-19
Author: mail@sebastianraschka.com
File Name: mlxtend/feature_extraction/tests/test_principal_component_analysis.py
Class Name:
Method Name: test_evals


Project Name: dirty-cat/dirty_cat
Commit Name: 30a84d87f185185a7256231097a461e2a255247d
Time: 2018-03-14
Author: patricio.cerda@inria.fr
File Name: dirty_cat/test/test_dirty_cat.py
Class Name:
Method Name: test_similarity_encoder