diff --git a/sandbox/figures/abc_posterior.png b/sandbox/figures/abc_posterior.png new file mode 100644 index 0000000..396cb7a Binary files /dev/null and b/sandbox/figures/abc_posterior.png differ diff --git a/sandbox/figures/bayesian_inference.png b/sandbox/figures/bayesian_inference.png new file mode 100644 index 0000000..3931691 Binary files /dev/null and b/sandbox/figures/bayesian_inference.png differ diff --git a/sandbox/figures/density_estimation.png b/sandbox/figures/density_estimation.png new file mode 100644 index 0000000..41e227e Binary files /dev/null and b/sandbox/figures/density_estimation.png differ diff --git a/sandbox/mdn_results.png b/sandbox/figures/mdn_results.png similarity index 100% rename from sandbox/mdn_results.png rename to sandbox/figures/mdn_results.png diff --git a/sandbox/figures/y_sims.png b/sandbox/figures/y_sims.png new file mode 100644 index 0000000..2962135 Binary files /dev/null and b/sandbox/figures/y_sims.png differ diff --git a/sandbox/src/activity_predictions.csv b/sandbox/src/activity_predictions.csv new file mode 100644 index 0000000..339a974 --- /dev/null +++ b/sandbox/src/activity_predictions.csv @@ -0,0 +1,126 @@ +test_activity,pred_activity,mse +0.2881355932203389,0.0320321559160905,0.14964211691085133 +-0.2967032967032966,0.015439026965906827,0.14964211691085133 +-0.2444444444444444,0.24127334651266327,0.14964211691085133 +0.9649122807017544,-0.24960949249244144,0.14964211691085133 +-0.3900709219858156,-0.05166626386959243,0.14964211691085133 +0.3935483870967742,0.05944704079236342,0.14964211691085133 +0.303030303030303,0.34077228058006337,0.14964211691085133 +0.7227722772277227,0.6936648867205155,0.14964211691085133 +0.4814814814814814,0.1716131833688073,0.14964211691085133 +0.4901960784313726,1.9498261421907586e-11,0.14964211691085133 +-0.1225806451612903,0.007147101705297528,0.14964211691085133 +0.1578947368421053,0.41133347124907976,0.14964211691085133 +0.1450381679389312,0.05225591286135991,0.14964211691085133 +-0.1188811188811188,0.020597466404647435,0.14964211691085133 +0.0804597701149425,0.05742342798246397,0.14964211691085133 +0.3958333333333332,0.4907407352431381,0.14964211691085133 +-0.5522388059701493,0.0023912471372003305,0.14964211691085133 +-0.2396694214876032,0.025164311319724367,0.14964211691085133 +0.1132075471698113,0.5333468036220377,0.14964211691085133 +0.2363636363636363,0.0037748604729087782,0.14964211691085133 +0.0571428571428571,-0.01917858705622959,0.14964211691085133 +0.2291666666666667,-0.03467438031143768,0.14964211691085133 +0.5,0.016519049195556534,0.14964211691085133 +0.2804878048780488,0.24907439357940833,0.14964211691085133 +-0.2452830188679244,0.00011930710025189262,0.14964211691085133 +0.263157894736842,-2.0804846379430334e-06,0.14964211691085133 +0.063063063063063,3.480491783291631e-16,0.14964211691085133 +0.858974358974359,0.5972619003647274,0.14964211691085133 +0.776470588235294,0.3776222242068719,0.14964211691085133 +0.3402061855670102,0.030945842862629747,0.14964211691085133 +0.1724137931034481,0.016461106920334194,0.14964211691085133 +0.2125984251968504,0.35587005564413043,0.14964211691085133 +-0.1794871794871795,0.4435127664251056,0.14964211691085133 +0.8873239436619718,-0.04613697966917962,0.14964211691085133 +0.04,0.004765907549727924,0.14964211691085133 +0.3043478260869565,2.1747621837153478e-06,0.14964211691085133 +0.1044776119402985,0.009638815672365748,0.14964211691085133 +0.0,-0.09551030362326311,0.14964211691085133 +0.849624060150376,0.04949132434795511,0.14964211691085133 +0.5533980582524272,0.02969272996581439,0.14964211691085133 +0.8043478260869565,0.08409662196404835,0.14964211691085133 +-0.381578947368421,-0.0007688401570315462,0.14964211691085133 +0.3538461538461539,0.001479319172891485,0.14964211691085133 +0.8645833333333333,0.09408851102519691,0.14964211691085133 +0.2307692307692308,0.04408560431473308,0.14964211691085133 +0.0598290598290598,-0.03307559174759021,0.14964211691085133 +0.2463768115942028,-0.05906986495431228,0.14964211691085133 +0.2444444444444444,0.001591913584868495,0.14964211691085133 +-0.0416666666666666,-0.0007622742405358294,0.14964211691085133 +0.25,-0.03900115334523043,0.14964211691085133 +0.290909090909091,0.0123117938369884,0.14964211691085133 +0.9161676646706588,0.004707789193654139,0.14964211691085133 +0.7124999999999999,0.08778887688772787,0.14964211691085133 +0.0276243093922652,0.04194115286865411,0.14964211691085133 +-0.0799999999999999,-2.7684018572137924e-08,0.14964211691085133 +0.1688311688311687,0.03602496839646857,0.14964211691085133 +0.018181818181818,0.032611672740677305,0.14964211691085133 +0.0204081632653061,-0.037058324334827655,0.14964211691085133 +-0.0769230769230768,0.020579005546984375,0.14964211691085133 +0.0975609756097561,0.10318442486572048,0.14964211691085133 +0.1515151515151516,-0.004692559786531981,0.14964211691085133 +0.9190751445086704,0.09857295500067376,0.14964211691085133 +0.1902439024390243,0.42120451353592764,0.14964211691085133 +0.0728476821192052,0.010757164652300638,0.14964211691085133 +0.3793103448275863,6.349676610973473e-06,0.14964211691085133 +-0.0769230769230768,-0.024464769244889276,0.14964211691085133 +0.4054054054054055,1.214944705492033e-09,0.14964211691085133 +0.3333333333333332,0.04982603536277974,0.14964211691085133 +0.925531914893617,0.4508852295127753,0.14964211691085133 +0.2125984251968504,-0.011076788299805719,0.14964211691085133 +0.4621848739495797,0.43512098105399505,0.14964211691085133 +0.3706293706293706,0.07315018982579526,0.14964211691085133 +0.8431372549019607,-0.02129938809060519,0.14964211691085133 +0.5853658536585367,0.030762693724065617,0.14964211691085133 +0.3703703703703704,0.8625794377009051,0.14964211691085133 +0.3057851239669422,0.7588897270737066,0.14964211691085133 +-0.0754716981132075,-0.013427432690170042,0.14964211691085133 +0.0708661417322835,0.0347600994637629,0.14964211691085133 +0.5245901639344261,0.003518616773381634,0.14964211691085133 +0.2365591397849462,-0.0009694495960736764,0.14964211691085133 +0.3066666666666666,0.2878083950454676,0.14964211691085133 +-0.3,8.362186080916291e-10,0.14964211691085133 +0.1503267973856208,0.00012279542152452482,0.14964211691085133 +0.064516129032258,-0.22832277661647069,0.14964211691085133 +0.1604938271604938,0.1610779387444944,0.14964211691085133 +0.1964285714285714,-0.024578131683524337,0.14964211691085133 +0.8810810810810812,-0.07311905484122926,0.14964211691085133 +0.2473118279569892,3.33716665184024e-06,0.14964211691085133 +0.6723163841807909,0.5147050575689928,0.14964211691085133 +0.8974358974358974,0.2937144415451197,0.14964211691085133 +0.2714285714285713,0.36001587652149114,0.14964211691085133 +-0.2299465240641711,0.08175471879130508,0.14964211691085133 +0.4366197183098592,0.1270522912599153,0.14964211691085133 +0.1746031746031746,-0.06393134971594397,0.14964211691085133 +-0.0847457627118644,0.024660612223296522,0.14964211691085133 +0.1935483870967742,0.08158258631906268,0.14964211691085133 +0.0291262135922329,0.1345346941393369,0.14964211691085133 +-0.4583333333333333,0.02898012682282674,0.14964211691085133 +0.4411764705882353,0.010457736297429802,0.14964211691085133 +0.0384615384615385,6.436518099689194e-05,0.14964211691085133 +0.6860465116279071,0.00039218972214958463,0.14964211691085133 +-0.0482758620689655,0.12318231100298747,0.14964211691085133 +0.2941176470588236,-0.04733234696326069,0.14964211691085133 +0.0082644628099173,0.09329049525539315,0.14964211691085133 +-0.1489361702127659,0.0062734019313363835,0.14964211691085133 +0.3661971830985915,0.0002757070913911144,0.14964211691085133 +0.2641509433962263,0.5024898830236015,0.14964211691085133 +0.1910112359550562,0.8994354486043559,0.14964211691085133 +0.0384615384615385,0.34745428244543786,0.14964211691085133 +0.5391705069124424,0.04179207352799518,0.14964211691085133 +0.8148148148148149,-0.06950291141584586,0.14964211691085133 +0.0709677419354839,0.031778961045302395,0.14964211691085133 +0.2575757575757575,0.25455544632615257,0.14964211691085133 +-0.0172413793103448,-0.002083882672317004,0.14964211691085133 +0.0769230769230768,6.128097381832908e-54,0.14964211691085133 +0.1014492753623188,0.22530801421134486,0.14964211691085133 +0.834710743801653,0.524686854416369,0.14964211691085133 +0.7222222222222223,0.23396185091436283,0.14964211691085133 +0.825,0.5184310788180837,0.14964211691085133 +0.5038759689922481,0.011002819150578156,0.14964211691085133 +0.8631578947368421,0.28418029435382075,0.14964211691085133 +0.7086092715231789,0.4491041626707194,0.14964211691085133 +0.0,0.39584627396853644,0.14964211691085133 +-0.0344827586206896,0.14835743656714118,0.14964211691085133 +0.9148936170212768,0.7776484039691169,0.14964211691085133 diff --git a/sandbox/src/approximate_bayesian.py b/sandbox/src/approximate_bayesian.py new file mode 100644 index 0000000..1342fa1 --- /dev/null +++ b/sandbox/src/approximate_bayesian.py @@ -0,0 +1,70 @@ +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt + +# Define distance function based on the paper +def distance_function(y_obs, y_sim=0): + """ + Distance measure between observed and simulated outputs. + """ + sigma_sim = np.std(y_sim) + if sigma_sim == 0: # Handle edge case for zero variance + sigma_sim = 1e-6 + return np.sum(((y_obs - y_sim) ** 2)) + +# ABC algorithm +def abc(data, y_sims, y_obs, epsilon): + """ + Approximate Bayesian Computation using pre-simulated ABM data. + + Parameters: + data: pandas DataFrame containing ABM inputs and outputs. + observed_activity: Observed output value. + epsilon: Tolerance for accepting parameter sets. + + Returns: + posterior_samples: DataFrame of accepted parameter sets. + """ + accepted_parameters = [] + + # Iterate through all rows in the dataset + for idx, row in enumerate(data): + y_sim = y_sims[idx] + + # Compute the distance between observed and simulated outputs + distance = distance_function(y_obs, y_sim) + + # Accept or reject based on epsilon + if distance <= epsilon: + accepted_parameters.append(row) + + return pd.DataFrame(accepted_parameters) + +def main(): + # Load ABM data + data_path = "../data/ARCADE/C-feature_0.0_metric_15-04032023.csv" + data = pd.read_csv(data_path) + input_feature_names = ["NODES", "EDGES", "GRADIUS"] + input_feature_names = ["ACTIVITY"] + predicted_output = ["ACTIVITY", "GROWTH", "SYMMETRY"] + input_features = data[input_feature_names].values + y_sims = data[predicted_output].values + fig, ax = plt.subplots(1, 3, figsize=(15, 5), sharey=True) + for i, feature in enumerate(predicted_output): + ax[i].hist(data[feature], bins=50) + ax[i].set_title(feature) + plt.savefig("y_sims.png") + + y_obs = 1 + print(f"Number of samples: {len(data)}") + return 0 + # ABC setup + epsilon = 500 + + # Run ABC + posterior_samples = abc(input_features, y_sims, y_obs, epsilon) + # posterior_samples.to_csv("posterior_samples.csv", index=False) + print(f"Number of accepted samples: {len(posterior_samples)}") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/sandbox/src/bayesian.py b/sandbox/src/bayesian.py new file mode 100644 index 0000000..eee26ab --- /dev/null +++ b/sandbox/src/bayesian.py @@ -0,0 +1,41 @@ +import numpy as np +import matplotlib.pyplot as plt + +# Generate observed data +np.random.seed(42) +true_mu = 5.0 # True mean +sigma = 1.0 # Known standard deviation +N = 20 # Number of observations +y_obs = np.random.normal(loc=true_mu, scale=sigma, size=N) + +# ABC Parameters +mu_prior_mean = 0.0 # Prior mean +mu_prior_std = 3.0 # Prior standard deviation +epsilon = 30.0 # Tolerance threshold +num_samples = 100000 # Number of prior samples + +# ABC Sampling +accepted_samples = [] +for _ in range(num_samples): + # Sample from prior + mu = np.random.normal(mu_prior_mean, mu_prior_std) + + # Simulate data + y_sim = np.random.normal(mu, sigma, size=N) + + # Compute distance + distance = np.sum((y_sim - y_obs)**2) + # Accept or reject + if distance < epsilon: + accepted_samples.append(mu) + +# Plot posterior +plt.figure(figsize=(10, 6)) +plt.hist(accepted_samples, bins=30, density=True, alpha=0.6, color="blue", label="Posterior (ABC)") +plt.axvline(true_mu, color="red", linestyle="--", label="True Mean") +plt.title("Posterior Distribution of $\mu$ using ABC") +plt.xlabel("$\mu$") +plt.ylabel("Density") +plt.legend() +plt.grid() +plt.savefig("abc_posterior.png") diff --git a/sandbox/src/gp.py b/sandbox/src/gp.py new file mode 100644 index 0000000..e787dcb --- /dev/null +++ b/sandbox/src/gp.py @@ -0,0 +1,85 @@ +import numpy as np +import pandas as pd +from sklearn.gaussian_process import GaussianProcessRegressor +from sklearn.gaussian_process.kernels import RBF, ConstantKernel as C +from sklearn.model_selection import train_test_split, KFold +from sklearn.metrics import mean_squared_error, r2_score + + +# Load data +data_path = "../../data/ARCADE/C-feature_0.0_metric_15-04032023.csv" +data = pd.read_csv(data_path) +output_names = ["ACTIVITY", "GROWTH", "SYMMETRY"] + +# Input features and outputs +X = data[["NODES", "EDGES", "GRADIUS"]].values # Inputs +y = data[output_names].values # Outputs + + +# Step 1: Split data into 75% training and 25% test +X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=42) + +# Step 2: Split the training set into 75% training and 25% validation +X_train_final, X_val, y_train_final, y_val = train_test_split(X_train, y_train, test_size=0.25, random_state=42) + +# Step 3: Perform 5-fold cross-validation on the training set +kf = KFold(n_splits=5, shuffle=True, random_state=42) + +# Define the GP kernel +kernel = C(1.0, (1e-3, 1e3)) * RBF(length_scale=1.0, length_scale_bounds=(1e-2, 1e2)) + +# Train a separate GP for each output using cross-validation +gps = [] +cv_scores = [] + +for i in range(y_train_final.shape[1]): # Train a GP for each output (ACTIVITY, GROWTH, SYMMETRY) + fold_scores = [] + for train_idx, val_idx in kf.split(X_train_final): + # Split the data into training and validation sets for this fold + X_train_fold, X_val_fold = X_train_final[train_idx], X_train_final[val_idx] + y_train_fold, y_val_fold = y_train_final[train_idx, i], y_train_final[val_idx, i] + + # Train the GP on the current fold + gp = GaussianProcessRegressor(kernel=kernel, n_restarts_optimizer=10, alpha=1e-6) + gp.fit(X_train_fold, y_train_fold) + + # Evaluate on the validation fold + y_val_pred, y_val_std = gp.predict(X_val_fold, return_std=True) + fold_score = np.mean((y_val_pred - y_val_fold) ** 2) # Mean Squared Error + fold_scores.append(fold_score) + + # Store the GP model and cross-validation score + gps.append(gp) + cv_scores.append(np.mean(fold_scores)) + +# Print cross-validation scores +for name, score in zip(output_names, cv_scores): + print(f"Cross-validation MSE for {name}: {score:.4f}") + +# Step 4: Final evaluation on the test set +# Final evaluation for the "ACTIVITY" output +activity_gp = gps[0] # GP model for "ACTIVITY" +y_test_activity = y_test[:, 0] # True test values for "ACTIVITY" +y_pred_activity, y_pred_std = activity_gp.predict(X_test, return_std=True) # Predictions for "ACTIVITY" + +# Calculate MSE and R-squared +mse_activity = mean_squared_error(y_test_activity, y_pred_activity) +r2_activity = r2_score(y_test_activity, y_pred_activity) + +# Print R-squared value +print(f"R-squared for ACTIVITY: {r2_activity:.4f}") +print(f"MSE for ACTIVITY: {mse_activity:.4f}") + + +# Create a DataFrame with required columns +results_df = pd.DataFrame({ + "test_activity": y_test_activity, + "pred_activity": y_pred_activity, +}) + +# Save to CSV +results_df.to_csv("activity_predictions.csv", index=False) + +# Print the first few rows of the results +print("\nSaved predictions to 'activity_predictions.csv':") +print(results_df.head()) diff --git a/sandbox/src/mcmc.py b/sandbox/src/mcmc.py new file mode 100644 index 0000000..bdcf8a1 --- /dev/null +++ b/sandbox/src/mcmc.py @@ -0,0 +1,91 @@ +import numpy as np +import pandas as pd +import random + +# Define distance function based on the paper +def distance_function(y_obs, y_sim): + """ + Distance measure between observed and simulated outputs. + """ + return np.sum(((y_obs - y_sim) ** 2)) + +# Define a log-likelihood function +def log_likelihood(y_sim, y_obs): + """ + Calculate the log-likelihood based on the distance function. + """ + distance = distance_function(y_obs, y_sim) + return -distance # Negative because we maximize log-likelihood + +# MCMC sampling function +def mcmc(data, y_sims, y_obs, n_iterations, proposal_std=1.0): + """ + MCMC sampling algorithm. + + Parameters: + data: pandas DataFrame containing ABM inputs and outputs. + observed_activity: Observed output value. + n_iterations: Number of iterations for the MCMC chain. + proposal_std: Standard deviation for the proposal distribution. + + Returns: + samples: List of accepted parameter sets (posterior samples). + """ + n_samples = len(data) + current_idx = random.randint(0, n_samples - 1) # Random initial state + current_theta = data[current_idx] + y_sim = y_sims[current_idx] + current_log_likelihood = log_likelihood(y_sim, y_obs) + + samples = [] + for _ in range(n_iterations): + # Propose a new state by perturbing the current state + proposal_idx = (current_idx + int(np.random.normal(0, proposal_std))) % n_samples + proposal_idx = max(0, min(n_samples - 1, proposal_idx)) # Keep within bounds + + proposal_theta = data[proposal_idx] + proposal_y_sim = y_sims[proposal_idx] + proposal_log_likelihood = log_likelihood(proposal_y_sim, y_obs) + + # Acceptance probability + acceptance_ratio = np.exp(proposal_log_likelihood - current_log_likelihood) + # Accept or reject + if random.random() < acceptance_ratio: + current_idx = proposal_idx + current_theta = proposal_theta + current_log_likelihood = proposal_log_likelihood + + # Store the accepted sample + samples.append(np.append(current_theta, proposal_y_sim)) + # Remove duplicates in the samples + samples = list(set(tuple(row) for row in samples)) + return pd.DataFrame(samples, columns=["NODES", "EDGES", "GRADIUS", "ACTIVITY", "GROWTH", "SYMMETRY"]) + +def main(): + # Load ABM data + data_path = "../../data/ARCADE/C-feature_0.0_metric_15-04032023.csv" + data = pd.read_csv(data_path) + + # Extract inputs (theta) and outputs (y) + input_feature_names = ["NODES", "EDGES", "GRADIUS"] + # input_feature_names = ["ACTIVITY"] + predicted_output = ["ACTIVITY", "GROWTH", "SYMMETRY"] + input_features = data[input_feature_names].values + y_sims = data[predicted_output].values + + # Observed value + y_obs = [-1.0, -10, 0] + + # Run MCMC + n_iterations = 10000 + posterior_samples = mcmc(input_features, y_sims, y_obs, n_iterations, proposal_std=5.0) + + # Save posterior samples to a file + posterior_samples.to_csv("posterior_samples_mcmc.csv", index=False) + + # Print summary of posterior samples + print(f"Number of samples: {len(posterior_samples)}") + print(posterior_samples.describe()) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/sandbox/mdn.py b/sandbox/src/mdn.py similarity index 100% rename from sandbox/mdn.py rename to sandbox/src/mdn.py diff --git a/sandbox/src/posterior_samples_mcmc.csv b/sandbox/src/posterior_samples_mcmc.csv new file mode 100644 index 0000000..8cb3465 --- /dev/null +++ b/sandbox/src/posterior_samples_mcmc.csv @@ -0,0 +1,11 @@ +NODES,EDGES,GRADIUS,ACTIVITY,GROWTH,SYMMETRY +1715.0,2074.0,57.0,0.5,0.4854700854700854,0.6857142857142857 +1936.0,2368.0,54.0,0.8089887640449438,1.36022792022792,0.6415094339622642 +2061.0,2521.0,62.0,-0.0754716981132075,0.9878062678062676,0.5290322580645161 +1997.0,2449.0,55.0,0.7730496453900708,1.293903133903134,0.7132075471698114 +1695.0,2056.0,53.0,0.1219512195121952,0.481139601139601,0.7833333333333333 +2214.0,2711.0,56.0,0.2592592592592593,1.114074074074074,0.4622222222222221 +1898.0,2328.0,61.0,-0.5625,1.2252991452991453,0.56 +1982.0,2414.0,59.0,0.7605633802816902,1.2868376068376068,0.6978723404255319 +1985.0,2434.0,56.0,0.6855345911949686,1.2996011396011395,0.6377358490566039 +1814.0,2199.0,56.0,0.28125,0.6632478632478631,0.5727272727272728 diff --git a/sandbox/src/test_predictions.csv b/sandbox/src/test_predictions.csv new file mode 100644 index 0000000..7fb2603 --- /dev/null +++ b/sandbox/src/test_predictions.csv @@ -0,0 +1,126 @@ +ACTIVITY,GROWTH,SYMMETRY,Std Devs +0.032032157730647846,0.795663276554849,0.5529447079264727,0.4512581223962164 +0.015439027529708334,0.8533861878031682,0.6313000952317039,0.43333887134935395 +0.24127335457520924,1.4048167250837855,0.696977495041543,0.40887353551893363 +-0.24960950261147952,0.1978521500141719,0.2768234260362332,0.31553050123897 +-0.05166626365392685,1.2263328288899058,0.6599885817713087,0.19966018175830144 +0.059447043798926076,0.9435340045081364,0.6445924088894532,0.4896574255649451 +0.3407722870794434,1.1623070821567212,0.5671146753289017,0.32464638862027523 +0.6936648882906145,1.4335096227617683,0.691303687601259,0.13096516478067305 +0.17161318525300395,0.9061969873081497,0.6808369773958912,0.2696555589968289 +1.9498270134622498e-11,0.005572640513373582,0.023993791342587608,0.6503444102225956 +0.007147102125339278,0.628350492629497,0.5920598350137529,0.5210047951998896 +0.41133348074168563,0.9277305066350501,0.6772041816870352,0.33550503405525073 +0.052255914384086444,0.4761717609766739,0.5737192820549789,0.472623127725131 +0.020597467560319292,0.7181216452911201,0.7176274380391636,0.3652785375531416 +0.05742343236103416,0.9826556423885796,0.6406201105441037,0.43307770913995697 +0.4907407394255954,1.1782549633304278,0.7441949158998122,0.24738897662651071 +0.0023912473447064973,0.575901345901925,0.695962685999826,0.5514359949598538 +0.025164312528345896,0.8864615506273303,0.6902934429899745,0.47790931108180795 +0.5333468147530066,1.2694660378409197,0.6048968470514298,0.32722545118498525 +0.0037748608327633233,0.3756151145313195,0.3668496221132053,0.6005126815441822 +-0.01917858800113109,0.8853001138042995,0.5293593290369693,0.4184308799289116 +-0.03467438218627103,0.4170348639029174,0.34857248946580643,0.4773958349052343 +0.016519050168824153,0.4316885357153286,0.4754608907137614,0.5132266708782663 +0.24907439610968793,1.2145017721722835,0.683124544873409,0.31264543958951113 +0.00011930711861959361,0.1564397286937008,0.19355201049669427,0.6294361284771391 +-2.080485109545165e-06,0.09026402163227912,0.2846594467292429,0.638597713481199 +3.480494096066391e-16,0.0005441560416944747,0.006978307284533555,0.6508317752381056 +0.597261906932249,1.4036152930332548,0.67885223086451,0.29181798620527843 +0.3776222264452026,0.9439355324887517,0.6016715016242022,0.12859166239000386 +0.030945844910747238,0.6020829205644009,0.9494864662856806,0.5270106002093043 +0.01646110794869484,0.6770992587234917,0.28066931903240233,0.5586071400435835 +0.35587005563163554,1.1211142058564816,0.5917815776709432,0.13405814726653495 +0.44351277256716626,1.2343874114635431,0.7509659538698858,0.3611457022597116 +-0.04613697996873922,1.1055229609271544,0.6675013375138109,0.2441738970318255 +0.0047659078762849385,0.4015377526964074,0.47701284871793337,0.569725472749659 +2.1747627375206484e-06,0.062250025015964675,0.1500507395921809,0.6447559531160509 +0.009638816156087596,0.6674945693789764,0.5932711818513889,0.5236877249559951 +-0.09551030474419563,1.0305840160161908,0.6402739505485066,0.3336006455420016 +0.04949132493914733,1.0364124914728379,0.7021715700352769,0.2814664409971365 +0.02969273130075492,0.6314724612415998,0.6286437898907553,0.5006536330076624 +0.08409662365907158,1.0179185819619652,0.5696959948019504,0.22153687941794678 +-0.0007688402361561823,0.615814517643156,0.4115966370034655,0.562842419881466 +0.0014793193362616374,0.4010910013469473,0.16851929237803698,0.6095587051520494 +0.09408851387443885,0.9365773650220853,0.6166971518451967,0.38090162057998017 +0.04408560591332132,0.5851991415064643,0.44906600050779805,0.49425858350499746 +-0.033075592307299936,1.0255632411939963,0.6475527635019144,0.3362052158767159 +-0.05906986639401574,1.0720494133806195,0.7158852597919285,0.3790555269172371 +0.0015919137703793837,0.5730574953264406,0.529028047865228,0.591538150406224 +-0.0007622740623130595,1.0450651107984306,0.6811333683132532,0.3915506487807774 +-0.0390011536807051,0.9520475465418929,0.6033170682350202,0.2692370927020544 +0.012311794596051128,0.4364268273179797,0.35507793218177625,0.5548142015169393 +0.004707789703404502,0.8150537735222376,0.5837325852030801,0.5490793658697798 +0.08778887962174994,1.0293416854418356,0.7334403308530392,0.4485936828361527 +0.04194115460625788,0.5817836098147943,0.6907204446447736,0.4696767421742218 +-2.7684029613791967e-08,0.040826189708873785,0.10345344783093871,0.6447366351827286 +0.03602496863546715,0.8502518166457975,0.5733900684824814,0.34370564382259355 +0.03261167437376871,1.1058919667690625,0.6828118578494944,0.4021499320602446 +-0.03705832533510541,0.9096596317095795,0.45976212841402125,0.45106426189355053 +0.020579007090690656,0.6741771974791202,0.5695765684376282,0.5720897539741396 +0.10318442686058457,0.7104461124338365,0.5013570836002911,0.4120617817426302 +-0.004692560116575677,0.7078352163896108,0.7785209050578596,0.5522376682088664 +0.09857296076225897,1.0658251054768475,0.6933874328226973,0.3894226113392196 +0.4212045146628361,1.0384894166508327,0.5947647174596502,0.24238280450490815 +0.010757165221175969,0.6243384185682581,0.5536615795615127,0.5349843115350033 +6.349677882932663e-06,0.0898646900522003,0.18154151260130086,0.6409792307073475 +-0.024464770231852135,0.6990329072343149,0.4348313615303977,0.48458218089534544 +1.2149452094918015e-09,0.02471114851464222,0.09990448226901795,0.649947076258405 +0.04982603677530058,0.7570711544749869,0.6275573939528492,0.40048950354115026 +0.4508852374322702,1.204866729656084,0.8101788514097442,0.2626955946375693 +-0.011076788896877453,0.6687583195884509,0.41164306953657853,0.4976899248527367 +0.4351209854647889,0.9964790905403618,0.7658574150927251,0.18169541676805342 +0.07315019181923521,0.7520368236067693,0.2972803106270783,0.42989729670785404 +-0.021299389406308964,0.9080298444508947,0.6604539266911649,0.4932785459326216 +0.030762693150323078,0.9574767356932423,0.5317240946984532,0.27149307351546703 +0.8625794385616484,1.3949387607028203,0.8397038499979912,0.1292057712175219 +0.7588897310131427,1.2113777330166522,0.9747963285232517,0.1502452859665177 +-0.013427433480973718,1.240850310670248,0.6974630666250418,0.41259970604604224 +0.03476010073342985,0.8254766951615126,0.572072271090477,0.4371603358266108 +0.003518617124505849,0.5580363942917146,0.19293050856380572,0.5430632244505718 +-0.0009694497188763756,0.24305179442405966,0.24858830769239293,0.597249577603735 +0.28780839674314357,1.3703666919655384,0.774829770830034,0.1334472360873387 +8.362188981121434e-10,0.026636591876981863,0.10186448540980586,0.6484886455583879 +0.00012279543926919213,0.1305804746951489,0.31843182919859814,0.6280930121461171 +-0.2283227790281972,0.8487367423597751,0.532329495031407,0.3061527428261401 +0.16107794195230016,0.8532457307087311,0.6912443513839087,0.4141822201330963 +-0.02457813269442209,0.6939511247159894,0.5187784913469452,0.4814680420428257 +-0.07311905600879982,1.3632015921723728,0.745686815159571,0.23844198895272553 +3.3371674237242387e-06,0.1398366152224071,0.2723276486632289,0.6384429017310662 +0.5147050689681691,1.2904237440221373,0.6211989800229463,0.30580620980477985 +0.2937144537275254,1.2004055345002187,0.6422903125273087,0.3130030871236627 +0.3600158776694422,0.7525600580132634,0.7196948485470016,0.23951579344159887 +0.08175472164972966,0.7610911535084971,0.5266126083614452,0.48714608278092486 +0.12705229620263248,0.6871444461686309,0.4295428412115256,0.4864725716862486 +-0.06393135173071168,1.0581424788801135,0.5579405340591558,0.34759061038273825 +0.024660613117954866,0.6994201099311937,0.5504822327887323,0.4950894767883267 +0.08158258964621837,0.9049862306219614,0.6484817443006654,0.45395604400581835 +0.13453469651031894,0.9969425908773387,0.6893807385671286,0.39279160244913597 +0.02898012866534743,0.7234232292053808,0.6827225364330756,0.5123633576096032 +0.010457737141381106,0.5271135573963771,0.6505391317161854,0.5479220493251311 +6.436519196513446e-05,0.18662603682818146,0.3936561527201487,0.6244849278850387 +0.00039218977504338086,0.4870195347529047,0.5277946155616646,0.5749429999598147 +0.12318231147334731,1.0629187543696865,0.664217201633079,0.20547445053554195 +-0.04733234832089601,0.8119546398645436,0.5668817383394515,0.44442857180249956 +0.09329049726971345,0.8984845368550468,0.47805125695869083,0.40426399231309595 +0.006273401904167662,0.7836436686291715,0.5337949446339314,0.06328699960000746 +0.0002757071123939917,0.4005471492612732,0.3369997311319767,0.5813319722480476 +0.5024898923121384,1.1702896890253538,1.1164964454249502,0.27832724204113196 +0.8994354514820319,1.3401959765271978,0.9348581519748653,0.154897892855731 +0.3474542894700141,1.205656366306198,1.0260946559627513,0.31327505297166386 +0.04179207615236678,1.0127790230317175,0.7126918290283586,0.5170524918415099 +-0.06950291298782892,1.026209254911449,0.6980210010973751,0.42537408109197594 +0.031778962707189426,0.37316598001183404,0.49349790737502963,0.5443927656857133 +0.2545554515217073,1.0505234667358554,0.7363162380642602,0.3504211693102697 +-0.002083882803858394,0.6192500594346589,0.6184788306270782,0.5332509132980988 +6.12811218437345e-54,3.1155225815120875e-12,3.379537260539137e-07,0.6508709680944763 +0.2253080205329664,1.2856420208905237,0.6804899222368631,0.4048182210418712 +0.5246868610449935,1.2750577665262095,0.943857340820502,0.2510624490683279 +0.23396185976475428,1.5111916441036541,0.5285332549876074,0.2980158754460448 +0.5184310881037733,0.7816913361207938,0.4664203336674291,0.2469943602287754 +0.011002820016590292,0.5349802415051382,0.4339603766838116,0.580482614243901 +0.2841803023493519,0.8256539916929497,0.9475262402001934,0.3140895949904836 +0.44910416796935254,1.1522949353920182,0.8114957906392378,0.3428499513628174 +0.39584628340465494,1.1082924805204748,0.5736507631933137,0.2862152137527709 +0.14835744050488076,1.1902816451126959,0.7398594357414707,0.2880777921840107 +0.7776484139296373,1.4696686979200264,0.6607354381272152,0.2159047791365367