wsae-lstm icon indicating copy to clipboard operation
wsae-lstm copied to clipboard

error in formula 29, linear correlation

Open timothyyu opened this issue 6 years ago • 3 comments

error brought to my attention by S. Mamont for formula 29, linear correlation: image

timothyyu avatar Jun 10 '19 01:06 timothyyu

related #3

timothyyu avatar Jun 10 '19 01:06 timothyyu

formula in question, 29: image

timothyyu avatar Jun 10 '19 02:06 timothyyu

Error in formula 29, linear correlation, noted in formulas.py. The Scipy.stats module implementation of pearson r is going to be used instead: https://github.com/timothyyu/wsae-lstm/commit/80ff7daf6e87521a4673d661ac9a01b9538feeba#diff-cb33a52a1b5551c0fa2f0477a49de96b

import numpy as np
import math
import scipy.stats

# Formula 29, Linear Correlation 
    # Acknowledgements: Error in formula in source article brought to my attention by S. Mamont.
    # Use scipy.stats.pearsonr
        # scipy.stats.pearsonr(x, y)
        # https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html```

timothyyu avatar Aug 25 '19 04:08 timothyyu