<jupyter_start><jupyter_text>Worst frame analysis<jupyter_code>df['worst_frame'] = df.max(axis=1, skipna=True, numeric_only=True).values
df['worst_frame'].to_csv("/media/andivanov/DATA/experiments/VideoMatte5x18/out/worst_pha_mad.csv", index_label="clipname")
df['worst_frame']
df.groupby('bgr_type')['worst_frame'].mean()
df.groupby('bgr')['worst_frame'].mean()
df.groupby('fgr')['worst_frame'].mean()<jupyter_output><empty_output><jupyter_text>Single video worst frame analysis<jupyter_code>df.loc['0001_00037', "worst_frame"]<jupyter_output><empty_output><jupyter_text>Intervals of frames analysis<jupyter_code>df["mad(0-100)"] = df[list(map(lambda x: str(x), list(range(0, 100))))].mean(axis=1).values
df["mad(100-200)"] = df[list(map(lambda x: str(x), list(range(100, 200))))].mean(axis=1, skipna=True).values
df["mad(200-300)"] = df[list(map(lambda x: str(x), list(range(200, 300))))].mean(axis=1, skipna=True).values
df["mad(300-400)"] = df[list(map(lambda x: str(x), list(range(300, 400))))].mean(axis=1, skipna=True).values
df["mad(400-500)"] = df[list(map(lambda x: str(x), list(range(400, 500))))].mean(axis=1, skipna=True).values
df["mad(500-600)"] = df[list(map(lambda x: str(x), list(range(500, 600))))].mean(axis=1, skipna=True).values
df["mad(600-700)"] = df[list(map(lambda x: str(x), list(range(600, 700))))].mean(axis=1, skipna=True).values
df.groupby('bgr_type')[["mad(0-100)", "mad(100-200)", "mad(200-300)", "mad(300-400)", "mad(400-500)"]].mean()
df.groupby('bgr')[["mad(0-100)", "mad(100-200)", "mad(200-300)", "mad(300-400)", "mad(400-500)"]].mean()
df.loc["0001_00037"].filter(like='mad')
df.loc["0001_00037"][[x for x in range(200, 300)]].values
df_dict = {"clip_0": [1, 1, 1], "clip_1": [1, 1]}
df_dummy = pd.DataFrame.from_dict(df_dict, orient="index", columns=[0, 1, 2])
df_dummy
df_dummy.loc["mean"] = df.mean()
df_dummy<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.24667729930887825, 'fraction_numerical': 0.10101010101010101, 'mean_word_length': 9.816091954022989, 'pattern_counts': {'":': 2, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '512465', 'license': 'MIT', 'n_tokens_mistral': 909, 'n_tokens_neox': 784, 'n_words': 102, 'path': 'evaluation/notebooks/per_frame_mad_analysis.ipynb', 'repo_name': 'ivandrej/checkmatte', 'size': '1881'}