GithubHelp home page GithubHelp logo

Pink noise about literaturame HOT 5 CLOSED

jj avatar jj commented on August 26, 2024
Pink noise

from literaturame.

Comments (5)

JJ avatar JJ commented on August 26, 2024

I'll check this out. The fitting code is in the paper itself, from line 624:

    spec.fit <- lm(log(this.spectrum$spec) ~ log(this.spectrum$freq))

So it's a loglog fit of coefficients. I'll try to do it with squares. Which is actually just 2*log, right?

from literaturame.

ccottap avatar ccottap commented on August 26, 2024

Something odd going on here. The coefficients had not changed so I took a look at the code and saw something misplaced: the fit should be to the log of the aquare, rather than to the square of the log, thus:
spec.fit <- lm(log(this.spectrum$spec) ~ log(this.spectrum$freq^2))
Now, this may be a trivial issue but it is evading me: by doing so, the coefficients are actually halved rather than doubled. I do not know R enough to debug this.

from literaturame.

JJ avatar JJ commented on August 26, 2024

I already did that:

 spec.fit <- lm(log(this.spectrum$spec) ~ log((this.spectrum$freq))**2)

It's actually the same. What is being fit is to the left of the ~ so it's natural that it goes that way, no big deal.

from literaturame.

ccottap avatar ccottap commented on August 26, 2024

log((this.spectrum$freq))**2 is the square of the log, and it should be the log of the square: log((this.spectrum$freq)**2). But there is another issue: check the coefficients of the raw log-log fit and those of the log-log(square) fit. The latter should be twice the former, but it is not the case (unless there is a problem on my side when compiling the document).

from literaturame.

JJ avatar JJ commented on August 26, 2024

OK, will look into that.

from literaturame.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.