Skip to content

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
Dong555 authored Nov 8, 2022
1 parent c9dd6e3 commit 4b8201a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ The returned "results" contain 5 different objects:
To mathmatically compute the Procrustes error of the estimate loading matrix, you need to install the Procruste package
to solve the rotation problem (see `procrustes installation guide <https://procrustes.readthedocs.io/en/latest/usr_doc_installization.html>`_
for Procrustes method). Then one can compute the Procrustes error as following:
for Procrustes method). Once the loading matrix is rotated to its original direction, one can compute the Procrustes error and look at heatmap as following:

.. code:: python
Expand All @@ -158,6 +158,10 @@ for Procrustes method). Then one can compute the Procrustes error as following:
# perform procruste transformation
proc_trans_susie = procrustes.orthogonal(np.asarray(W_hat.T), np.asarray(W.T), scale=True)
print(f"The Procrustes error for the loading matrix is {proc_trans_susie.error}")
# Heatmap of transformed loading matrix
W_trans = proc_trans_susie.t.T @ W_hat
sns.heatmap(W_trans, cmap = div, fmt = ".2f", center = 0)
You can also calculate the relative root mean square error (RRMSE) to assess the model prediction performance

Expand Down

0 comments on commit 4b8201a

Please sign in to comment.