Skip to content
Snippets Groups Projects
Commit 42e7fd5a authored by ssibirtsev's avatar ssibirtsev
Browse files

Replace DropDeform_bo.py

parent 5750d664
No related branches found
No related tags found
No related merge requests found
......@@ -266,8 +266,6 @@ def sample_data(config, M_deform, cor_bo, ish):
data_x_new = np.log(data_x_new)
# Combine x_data and y_data into a DataFrame for easy manipulation
data = pd.DataFrame({'x': data_x_new, 'y': data_y_new})
# Exclude data points where y == 0
data = data[data['y'] != 0]
# Bin x into equally spaced bins
data['x_bin'] = pd.cut(data['x'], bins=config.n_bins, labels=False)
# Calculate the minimum number of points in any bin
......@@ -286,8 +284,7 @@ def sample_data(config, M_deform, cor_bo, ish):
# Define x samples for fitting
x_sampled = balanced_sample['x'].values
# Transfer back into non logarithmic scale
if cor_bo == 0:
x_sampled = np.exp(x_sampled)
x_sampled = np.exp(x_sampled)
# Define y samples for fitting
y_sampled = balanced_sample['y'].values
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment