Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to understand your Standardise method - dataframe div first row #6

Open
elulue opened this issue Apr 16, 2018 · 0 comments
Open

Comments

@elulue
Copy link

elulue commented Apr 16, 2018

Dears,

I am confused about the standardise method in the code -

    def zero_base_standardise(self, data, abs_base=pd.DataFrame()):
        """Standardise dataframe to be zero based percentage returns from i=0"""
        if(abs_base.empty): abs_base = data.iloc[0]
        data_standardised = (data/abs_base)-1
        return (abs_base, data_standardised)

My understanding about the standarise is -

(x - mean) / standard_deviation
mean = sum(x) / count(x)
standard_deviation = sqrt( sum( (x - mean)^2 ) / count(x))

I think (data/abs_base)-1 should be far from standardised values, could you please kindly let me know if I misunderstood anything?
Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant