a871536bcbb38b9ca03b0bc777712d8c0a79ad90,matchzoo/data_pack/pack.py,,pack,#Any#,17

Before Change


        col_all.append("label")

    // prepare data pack.
    df = pd.DataFrame(data, columns=col_all)
    df.fillna("missing")  // avoid tokenization exception.

    // Segment input into 3 dataframes.
    relation = df[col_relation]

After Change


        3     L-2         C      R-2          c      0

    
    if "text_left" not in df or "text_right" not in df:
        raise ValueError(
            "Input data frame must have `text_left` and `text_right`.")

    // Gather IDs
    if "id_left" not in df:
        id_left = _gen_ids(df, "text_left", "L-")
    else:
        id_left = df["id_left"]
    if "id_right" not in df:
        id_right = _gen_ids(df, "text_right", "R-")
    else:
        id_right = df["id_right"]

    // Build Relation
    relation = pd.DataFrame(data={"id_left": id_left, "id_right": id_right})
    for col in df:
        if col not in ["id_left", "id_right", "text_left", "text_right"]:
            relation[col] = df[col]

    // Build Left and Right
    left = _merge(df, id_left, "text_left", "id_left")
    right = _merge(df, id_right, "text_right", "id_right")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: NTMC-Community/MatchZoo
Commit Name: a871536bcbb38b9ca03b0bc777712d8c0a79ad90
Time: 2018-12-13
Author: i@uduse.com
File Name: matchzoo/data_pack/pack.py
Class Name:
Method Name: pack


Project Name: Epistimio/orion
Commit Name: 9d941d30962c211971ec316bf40c2ebfbf28a567
Time: 2021-02-24
Author: xavier.bouthillier@umontreal.ca
File Name: src/orion/analysis/lpi_utils.py
Class Name:
Method Name: lpi


Project Name: dmbee/seglearn
Commit Name: f15e6db393d3ed6ddca47669ac5a8c4b332ddd2c
Time: 2020-03-31
Author: david.mo.burns@gmail.com
File Name: examples/plot_nn_training_curves.py
Class Name:
Method Name:


Project Name: datascienceinc/Skater
Commit Name: 26bb049b3d843811b2f1c46bb3e7d579a2f07f91
Time: 2017-04-25
Author: aikramer2@gmail.com
File Name: pyinterpret/core/global_interpretation/partial_dependence.py
Class Name:
Method Name: _compute_pd