Maximum Likelihood: Normal Linear Model

I have looked at the Literate package as you and @pkofod mentioned and have produced a tutorial but since I cannot send any files via the Discourse forum I would appreciate some guidance. I need another pair (or two) of eyes to check my Jupyter notebook and Markdown file (which was very easy to create, BTW).

Thank You!

Perhaps put them in a gist?

1 Like

That was quick :slight_smile: I’ll see if I can enable the Literate examples in the Optim.jl documentation today or tomorrow, and then you can submit your example as a PR to Optim.

Uploading the Literate file as a gist, as @Tamas_Papp suggested is also a good way to show us the tutorial.

I have added both the markdown file and the Jupyter notebook as a gist, as Thomas Papp suggested. The copied URL is as follows:

https://gist.github.com/djlacombe/6c4ec789833514713df1d61f091cd89b.js

The name of the gist in both cases is “Maximum Likelihood Estimation in Julia: The Normal Linear Model”.

I tried to add a TIP to the markdown but it is not rendering correctly and I’m happy to make any corrections that anyone can point out in terms of errors or clarifications.

As for the speed of the work, I’ve been given the fortune to discover this community and Julia and just wish to provide something in return.

Thanks!

2 Likes

Thanks for putting this together; this morning it helped me figure out how to do a similar problem.

1 Like

Great :slight_smile:

If you wish, I can add your tutorial to the Literate PR I made to Optim just now, but then I would need a gist of the original jl file and not the Markdown or ipynb files.

Alternatively, you can follow the steps I did there and submit a PR yourself if you would like to do that instead (but then I advise waiting for my PR to be merged) :wink:

The Markdown TIP is written in a way so that it will work when the documentation is deployed (after it has been merged to the master branch on Optim. But that is all taken care of automatically so you can just copy-paste what I did in my example (you’ll have to change the file names, however :stuck_out_tongue: )

Excellent! That’s what I was hoping for in putting this together.

I’ll probably add some more tutorials in the near future.

I’ve placed a public gist on the board at the following location:

https://gist.github.com/djlacombe/b13b4386b20106f5933985d71c0f8073.js

As you can see, it’s a Julia script and I’m happy for you to do the PR…

I’ll need to learn more about GitHub and PR’s. For some reason PR’s make me nervous and I don’t want to be “that guy” who completely destroyed the Julia ecosystem with one mouse click.

You can’t. With a version control system you can always backtrack, and in any case PRs are like suggestions, to be reviewed by the repo maintainers. It is OK to make git mistakes too, you can always correct them.

2 Likes

Yup! Don’t be afraid. It’s really not that hard, and we’ll be happy to help you if some stages are not clear.

4 Likes

I’m revisiting this issue and had a quick question that I hope someone can answer.

The fieldnames(fun2) doesn’t return the elements of the fun2 structure anymore.

Is there an alternative that I can use? I’d like to be able to recover some of these parameters.

Thank you for any help in advance.

you need to do fieldnames(typeof(fun2)) now.