<jupyter_start><jupyter_text>toy problem<jupyter_code># reproducibility
r = RandomState(seed=42)

# simulating data
n_points = 1000
n_outliers = 100
df = pd.DataFrame(
    np.vstack([
        2+r.randn(n_outliers,2)*4,
        r.randn(n_points,2)
    ]), columns=['x1', 'x2']
)
old_df = df.copy()
df.head()
scaler_1 = StandardScaler()
df_std = df.copy()
df_std[:] = scaler_1.fit_transform(df)

scaler_2 = MinMaxScaler()
df_mm = df.copy()
df_mm[:] = scaler_2.fit_transform(df)
fig, axes = plt.subplots(1, 3, figsize=(20,5))
fig.suptitle('Bigger 1 row x 2 columns axes with no data')
sns.scatterplot(x='x1', y='x2', data=old_df, ax=axes[0])
axes[0].set_title('Original data')
axes[0].set_aspect(1)

sns.scatterplot(x='x1', y='x2', data=df_std, ax=axes[1])
axes[1].set_title('Z-score')
axes[1].set_aspect(1)

sns.scatterplot(x='x1', y='x2', data=df_mm, ax=axes[2])
axes[2].set_title('MinMax')
axes[2].set_aspect(1)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1953781512605042, 'fraction_numerical': 0.046218487394957986, 'mean_word_length': 6.111940298507463, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '629422', 'license': 'MIT', 'n_tokens_mistral': 462, 'n_tokens_neox': 431, 'n_words': 68, 'path': 'notebooks/data_preprocessing/04-normalization.ipynb', 'repo_name': 'omadson/vds', 'size': '952'}