86ee5d290906f342a8b0f6f3461cb109bdc4c71d,scattertext/ScatterChart.py,ScatterChart,to_dict,#ScatterChart#Any#Any#Any#Any#Any#,65
Before Change
self._add_term_freq_to_json_df(json_df, df, category)
json_df["s"] = percentile_min(df["color_scores"])
json_df["os"] = df["color_scores"]
bg_terms = self.term_doc_matrix.get_scaled_f_scores_vs_background()
bg_terms = bg_terms["Scaled f-score"]
bg_terms.name = "bg"
bg_terms = bg_terms.reset_index()
bg_terms.columns = ["term" if x == "index" else x for x in bg_terms.columns]
json_df = pd.merge(json_df, bg_terms, on="term", how="left")
json_df["bg"] = json_df["bg"].fillna(0)
category_terms = list(json_df.sort_values("s")["term"][:10])
After Change
(category, df, other_categories, transform)
df["not cat freq"] = df[[x for x in other_categories]].sum(axis=1)
json_df = df[["x", "y", "term"]]
if self.term_significance:
json_df["p"] = df["p"]
self._add_term_freq_to_json_df(json_df, df, category)
json_df["s"] = percentile_min(df["color_scores"])
json_df["os"] = df["color_scores"]
json_df["bg"] = self._get_corpus_characteristic_scores(json_df)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: JasonKessler/scattertext
Commit Name: 86ee5d290906f342a8b0f6f3461cb109bdc4c71d
Time: 2017-03-01
Author: jason.kessler@gmail.com
File Name: scattertext/ScatterChart.py
Class Name: ScatterChart
Method Name: to_dict
Project Name: catalyst-cooperative/pudl
Commit Name: 6bd4147eae6085142288b355660c250e8184d62f
Time: 2017-11-16
Author: cgosnell@catalyst.coop
File Name: pudl/outputs.py
Class Name:
Method Name: generation_eia923
Project Name: havakv/pycox
Commit Name: d9f4448777a924ed71d82bf84eda6bb88fd96641
Time: 2018-03-13
Author: kvamme@samba8.ad.nr.no
File Name: pycox/callbacks.py
Class Name: PlotProgress
Method Name: on_epoch_end