<jupyter_start><jupyter_text>Test c_perc= list of percentage<jupyter_code>gn_perc = UtilityBasedGaussianNoiseSampler(data, thr_rel=0.8, c_perc=[0.5,3])
method = gn_perc.getMethod()
extrType = gn_perc.getExtrType()
thr_rel = gn_perc.getThrRel()
controlPtr = gn_perc.getControlPtr()
c_perc_undersampling, c_perc_oversampling = gn_perc.getCPerc()
pert = gn_perc.getPert()
method, extrType, thr_rel, controlPtr, c_perc_undersampling, c_perc_oversampling, pert
resampled = gn_perc.resample()
len(resampled), resampled
x = resampled['X1'].to_numpy()
y = resampled['X2'].to_numpy()
color = resampled['Tgt'].to_numpy()
plt.scatter(x, y, s=6.0, c=color)
cb = plt.colorbar()
cb.set_label('Tgt')
plt.xlabel('X1')
plt.ylabel('X2')
plt.title('method=extremes,thr_rel=0.8, c_perc=[0.5,3]')
plt.show()<jupyter_output><empty_output><jupyter_text>Test c_perc= 'balance'<jupyter_code>data = pd.read_csv('test/ImbR.csv', index_col=0)
gn_balance = UtilityBasedGaussianNoiseSampler(data, thr_rel=0.8, c_perc='balance')
method = gn_balance.getMethod()
extrType = gn_balance.getExtrType()
thr_rel = gn_balance.getThrRel()
controlPtr = gn_balance.getControlPtr()
c_perc = gn_balance.getCPerc()
pert = gn_balance.getPert()
method, extrType, thr_rel, controlPtr, c_perc, pert
resampled = gn_balance.resample()
len(resampled), resampled
x = resampled['X1'].to_numpy()
y = resampled['X2'].to_numpy()
color = resampled['Tgt'].to_numpy()
plt.scatter(x, y, s=6.0, c=color)
cb = plt.colorbar()
cb.set_label('Tgt')
plt.xlabel('X1')
plt.ylabel('X2')
plt.title('method=extremes,thr_rel=0.8, c_perc=balance')
plt.show()<jupyter_output><empty_output><jupyter_text>Test c_perc= 'extreme'<jupyter_code>data = pd.read_csv('test/ImbR.csv', index_col=0)
gn_extreme = UtilityBasedGaussianNoiseSampler(data, thr_rel=0.8, c_perc='extreme')
method = gn_extreme.getMethod()
extrType = gn_extreme.getExtrType()
thr_rel = gn_extreme.getThrRel()
controlPtr = gn_extreme.getControlPtr()
c_perc = gn_extreme.getCPerc()
pert = gn_extreme.getPert()
method, extrType, thr_rel, controlPtr, c_perc, pert
resampled = gn_extreme.resample()
len(resampled), resampled
x = resampled['X1'].to_numpy()
y = resampled['X2'].to_numpy()
color = resampled['Tgt'].to_numpy()
plt.scatter(x, y, s=6.0, c=color)
cb = plt.colorbar()
cb.set_label('Tgt')
plt.xlabel('X1')
plt.ylabel('X2')
plt.title('method=extremes,thr_rel=0.8, c_perc=extreme')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16473029045643153, 'fraction_numerical': 0.015767634854771784, 'mean_word_length': 8.567460317460318, 'pattern_counts': {'":': 0, '<': 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': '513715', 'license': 'MIT', 'n_tokens_mistral': 1097, 'n_tokens_neox': 1056, 'n_words': 146, 'path': 'test_gn_sampler.ipynb', 'repo_name': 'ndai093/UtilityBasedRegression', 'size': '2410'}