From 628e107f21ee37cd6b3e66cd3d26f0d5d46d9b44 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 15 Mar 2023 20:03:49 +0100 Subject: [PATCH] p3: visualise explicit theta --- p3/visualise.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/p3/visualise.py b/p3/visualise.py index 89902e3..66dd9f3 100644 --- a/p3/visualise.py +++ b/p3/visualise.py @@ -70,9 +70,13 @@ explicitTheta = pd.read_csv('data/explicit_theta.csv', header=None) eTx = explicitTheta[0:4] eTy = explicitTheta[4:8] -eTxy = [eTx, eTy] -explicitTheta = np.array(eTxy) -print(explicitTheta) +eTxy = [np.transpose(eTx), np.transpose(eTy)] +plt.scatter(th_columns, eTxy[0], label="$\hat{θ}_0$") +plt.scatter(th_columns, eTxy[1], label="$\hat{θ}_1$") +plt.legend() +plt.title("ARX Theta (θ) Parameter Estimation using ELSq") +plt.savefig('res/explicit_theta.png', dpi=300) +plt.clf() explicitError = pd.read_csv('data/explicit_error.csv', header=None)