unbalancedparentheses / data_science_in_julia_for_hackers

Data Science in Julia With Hackers
https://datasciencejuliahackers.com
114 stars 25 forks source link

Chp 06 Review #187

Open aloctavodia opened 1 year ago

aloctavodia commented 1 year ago

Poor quality image

Give more details

Change

"To simplify, we approximate the escape velocity as:"

To something like:

"Assuming the planet is spherical and taking into account only the gravitational effect of Mars" (or whatever the assumptions are)

Otherwise is easy to get distracted thinking about what the approximation actually is, how crude it is, etc

format issue

"## Proyectile Motion"

Simplify

Change:

"...the x normally is parallel to the ground and the y axis is perpendicular,..."

To:

"...the x axis is parallel to the ground and the y axis is perpendicular,..."

Typo, ahve

So, in the example we ahve just explained,

Typo, and --> an

... suppose we only keep the measurements with and initial angle θ~45°

Use the same name in text and code

Suppose we did the experiment and we have measured then the 5 points, Δx and Δt, shown below:

Reword

This is very hard to read:

Using the equations of the trajectory, when the stone hits the ground, y(t) = 0, since we take the start of the y coordinate in the ground (negleting the initial height with respect to the maximum height), so finding the other then the initial point that fulfill this equation, we find that:

Typo

So, solving for v0m,

Change label or omit values and labels on y-axis

Change : "Probability"

Into: "Probability density"

Number equations

It will be easier to follow

Out of the blue

The sentence "So, the model we are going to propose is a linear regression. A linear equation has the form:"

is not well connected with the previous paragraphs. It is not clear why we need a linear model at all. The transition from mechanics to statistics should be smoother

Maybe you can invert the order of the story

  1. We want to scape from mars
  2. We need to find out the scape velocity
  3. For that we need to find g_mars
  4. We realize x = f(g, t), so we can throw stones to find g!
  5. But measurement are noisy, hence we create the model x ~ Normal(f(g, t), σ)
  6. We now try to find f from what we remember from high-school physics.
  7. We got it! we collect a few datapoints
  8. We explore a few priors.

Justify Priors

say something like know it has to be positive and and less than g_earth, which is 9.8, and can round up to 10.

Do the same for the other two priors

Doubt HMC/ Turing good practices

Why are you using HMC sampler instead of NUTS or other similar adaptive dynamic HMC methods, the parameters you are passing are standard parameters? Standard for unidimensional posteriors?

I recommend to use NUTS instead of HMC even for simple models. I assume NUTS parameters are optional in turing, so you don't need to explain what epsilon or tau are (that you are not currently not explaining)

rewording

Change:

Now that we have a good understanding of the equations and the overall problem, we are going to add some difficulties and we will loosen a constrain we have imposed: Suppose that the device employed to measure the angle has an error of 15°, no matter the angle.

We want to know what are the most convenient angle to do the experiment and to measure or if it doesn’t matter.

to something like:

Let us remove a the angle constraint and add complexity to the problem. We will consider that the device measuring the angle has a 15 degree error, no matter the angle.

There is a most convenient angle to do the experiment? Or it doesn’t matter?

Discuss the posterior with angle uncertainty vs the one without it.

Consider a new plot with them side by side or use overlapped. Discuss mean and standard deviation or HDI (or some other interval)

logarithmic --> LogNormal

first with a normal distribution and then with a logarithmic one.