Implement the frozen F3 protocol, nested LOWO, posterior label banks, ablations, diagnostics, checkpoint validation and full-volume inference. Record the negative G-C result: improvement at 1/4 wells, coverage80 52.38% and coverage90 60.91%, with unchanged thresholds and historical P2 results. Add native Windows logging, the RTX 3060 environment lock, detached runs, and an audited dashboard-lock recovery that preserves frozen scientific code. Update report.html, the plan and agent guidance with completed P3 status. Archive thesis sources under code_thesis with identical Git blobs and record the original-output audit without committing large data or model artifacts. Validation: 129 tests passed, 13 skipped; CUDA end-to-end smoke passed; completion audit verified 1,320 checkpoint/prediction pairs, 28 registration bundles and all 649 interior volume inlines. Scripts 04 and 09 were not rerun. Co-authored-by: Codex <codex@openai.com>
37 lines
1.2 KiB
Python
37 lines
1.2 KiB
Python
import numpy as np
|
|
import matplotlib.pyplot as plt
|
|
from sklearn.metrics import mean_squared_error
|
|
from scipy.stats import pearsonr
|
|
|
|
# === Load file ===
|
|
data = np.load(r"C:\Users\PC\Documents\Thesis\outputs\open_loop_patch_preds_F06-1_v2.npz", allow_pickle=True)
|
|
print("Keys trong file:", data.files)
|
|
|
|
# === Giả định các key là ===
|
|
# y_true: porosity từ well-logging
|
|
# y_pred: porosity dự đoán
|
|
# times_ms: trục thời gian
|
|
y_true = data['y_true']
|
|
y_pred = data['y_pred']
|
|
times = data['times_ms'] if 'times_ms' in data.files else np.arange(len(y_true))
|
|
|
|
# === Tính toán ===
|
|
mse = mean_squared_error(y_true, y_pred)
|
|
pcc, _ = pearsonr(y_true, y_pred)
|
|
|
|
print(f"[🔍] MSE: {mse:.4f}")
|
|
print(f"[🔍] PCC: {pcc:.4f}")
|
|
|
|
# === Vẽ biểu đồ ===
|
|
plt.figure(figsize=(10,5))
|
|
plt.plot(times, y_true, label='True Porosity', linewidth=2)
|
|
plt.plot(times, y_pred, label='Predicted Porosity', linestyle='--')
|
|
plt.xlabel("Time (ms)")
|
|
plt.ylabel("Porosity")
|
|
plt.title(f"F06-1 Porosity Comparison\nMSE={mse:.4f} | PCC={pcc:.4f}")
|
|
plt.legend()
|
|
plt.grid(True)
|
|
plt.tight_layout()
|
|
plt.show()
|
|
plt.savefig(r"C:\Users\PC\Documents\Thesis\outputs\porosity_comparison_F06-1.png")
|