0347e36737b25671dff14c6c1bbbe5d090d71a06,deepcut/train.py,,train_model,#Any#,87
Before Change
char_le.fit(chars)
type_le.fit(char_labels)
df_train["char"] = char_le.transform(df_train["char"].astype(str))
df_train["type"] = type_le.transform(df_train["type"].astype(str))
df_train_pad = create_n_gram_df(df_train, n_pad=n_pad)
char_row = ["char" + str(i + 1) for i in range(n_pad_2)] + \
After Change
df_train["char"] = df_train["char"].map(lambda x: CHARS_MAP.get(x, 0))
df_train["type"] = df_train["type"].map(lambda x: CHAR_TYPES_MAP.get(x, 0))
df_test["char"] = df_test["char"].map(lambda x: CHARS_MAP.get(x, 0))
df_test["type"] = df_test["type"].map(lambda x: CHAR_TYPES_MAP.get(x, 0))
df_train_pad = create_n_gram_df(df_train, n_pad=n_pad)
df_test_pad = create_n_gram_df(df_test, n_pad=n_pad)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: rkcosmos/deepcut
Commit Name: 0347e36737b25671dff14c6c1bbbe5d090d71a06
Time: 2017-06-28
Author: titipata@allenai.org
File Name: deepcut/train.py
Class Name:
Method Name: train_model
Project Name: mozilla/bugbug
Commit Name: ef65ed0d5cba305de3f3761e929719a0515ce6f1
Time: 2019-01-23
Author: mcastelluccio@mozilla.com
File Name: bugbug/repository.py
Class Name:
Method Name: download_commits
Project Name: instacart/lore
Commit Name: 644f6485707aaf7d670216f7ea0885b7a0bc8a26
Time: 2017-12-08
Author: montanalow@users.noreply.github.com
File Name: lore/encoders.py
Class Name: Token
Method Name: transform