rcurtin_irc changed the topic of #mlpack to: mlpack: a scalable machine learning library (https://www.mlpack.org/) -- channel logs: https://libera.irclog.whitequark.org/mlpack -- NOTE: messages sent here might not be seen by bridged users on matrix, gitter, or slack
<RishabhGarg108Ri> @ryan:ratml.org The past few months we have done a lot of refactoring! :)
<RishabhGarg108Ri> Have we also updated the bindings tutorial on the website? I think most of the newcomers follow that to learn to write bindings.
<rcurtin[m]> RishabhGarg108 (RishabhGarg108): you're right! let me open an issue for that, and maybe I can handle it tomorrow
<RishabhGarg108Ri> :+1:
<RishabhGarg108Ri> @ryan:ratml.org How should I change `REQUIRE_THROWS(mlpackMain());` in `main_tests` ?
<jonpsy[m]> <rcurtin[m]> "for lab.mlpack.org, right?" <- Thanks for the intiative, Ryan. The site responds now, however it shows "potential security threat" in firefox, and when I ignore and continue it shows "Gitlab is taking too long to respond".
aakashi2001 has joined #mlpack
aakashi2001 has quit [Ping timeout: 252 seconds]
aakashi2001 has joined #mlpack
aakashi2001 has joined #mlpack
aakashi2001 has quit [Changing host]
aakashi2001 has quit [Remote host closed the connection]
<zoq[m]1> <jonpsy[m]> "Thanks for the intiative, Ryan...." <- I still have to redirect the binderhub.
<jonpsy[m]> y
<jonpsy[m]> * i see.
<heisenbuugGopiMT> git issues.
<heisenbuugGopiMT> What should be my upstream?
<heisenbuugGopiMT> Now the issue is when I go to mlpack repo on my github account, it says
<heisenbuugGopiMT> `This branch is 48 commits ahead of mlpack:master.`
<heisenbuugGopiMT> And I am on master branch.
<heisenbuugGopiMT> How can I sync this with original mlpack repo?
<shrit[m]> Oh
<jonpsy[m]> wait, did you push changes on your master fork?
<heisenbuugGopiMT> Yea, I think I did that by mistake last time...
<jonpsy[m]> lol
<jonpsy[m]> okay you can do ``git reset --hard``` to upstream/master
<heisenbuugGopiMT> I though I solved it but I was wrong.
<jonpsy[m]> s/``/```/
<PranshuSrivastav> I think you need to use git reset --hard HEAD~n
<shrit[m]> I would recommend that you delete your origin and upstream
<shrit[m]> git remote remove origin
<PranshuSrivastav> where n is the number of commits u want to go back and then push the changes
<shrit[m]> git remote remove upstream
<shrit[m]> each time you push you use `git push link branch name`
<heisenbuugGopiMT> I tried that reset command, although it shows branch upto date in terminal, but on my github page it still shows same message.
<shrit[m]> this way you will never ever do an error
<heisenbuugGopiMT> okay, I will delete them.
<shrit[m]> Of course because you need to reset the origin
<jonpsy[m]> wait
<jonpsy[m]> i've faced such errors before, let me tell you the most easiest way
<jonpsy[m]> not "error" per e
<jonpsy[m]> * not "error" per se
<jonpsy[m]> fetch `origin/master`, then `git reset --hard upstream/master` and then force push to `origin/master`
<jonpsy[m]> done
<heisenbuugGopiMT> @shrit:matrix.org But how to sync my fork and original?
<heisenbuugGopiMT> I deleted origin and upstream
<shrit[m]> you need to fetch from the original by using the link
<heisenbuugGopiMT> `git fetch git@github.com:mlpack/mlpack.git master`
<heisenbuugGopiMT> And then git merge to my fork?
<shrit[m]> git pull git@github.com:mlpack/mlpack.git master
<shrit[m]> Try both
<shrit[m]> I am not sure you can fetch with link directly, but you can definitely do this with `git pull`
<heisenbuugGopiMT> From github.com:mlpack/mlpack
<heisenbuugGopiMT> (base) [heisenbug@fedora build]$ git pull git@github.com:mlpack/mlpack.git master
<heisenbuugGopiMT> Already up to date.
<heisenbuugGopiMT> * branch master -> FETCH_HEAD
<shrit[m]> Good
<shrit[m]> then git push to your link master
<shrit[m]> but you need to reset before.
<shrit[m]> try to push to your github and we will see what will happen later
<shrit[m]> hmm, let us try to use `git reset --hard git@github.com:heisenbuug/mlpack.git master`
<heisenbuugGopiMT> `fatal: invalid object name 'git@github.com'.`
<shrit[m]> Why you are trying to pull from the master?
<heisenbuugGopiMT> To get the main mlpack code?
<heisenbuugGopiMT> if I do git status, it says nothing to commit, working tree is clean
<heisenbuugGopiMT> But the only issue is when I go to my repo on github.com
<heisenbuugGopiMT> It says I am ahead by 48 commits.
<heisenbuugGopiMT> So I thought I would pull the mlpack mater and merge it with my fork master
<heisenbuugGopiMT> s/mater/master/
<shrit[m]> This is not how git works
<shrit[m]> You only need to reset your master that is on github
<heisenbuugGopiMT> Yup I got that now, and I think I made some mistake in that only.
<shrit[m]> You have two master, one locally (on your machine) and one remote (one github)
<shrit[m]> The one locally is fine I think, did you push to it recently?
<heisenbuugGopiMT> No, actually if you remember during the last video meetup we were trying to solve the same issue...
<shrit[m]> I remember it was solved locally for you
<heisenbuugGopiMT> Yea, I thought so, but then why does it shows that message on my github page.
<heisenbuugGopiMT> *?
<shrit[m]> because you did reset that locally but not on github
<shrit[m]> and you have probably pushed the modification to github before we have fixed it during the meeting
<heisenbuugGopiMT> ohhh...
<heisenbuugGopiMT> So how can I solve this now?
<shrit[m]> You only need to reset your master that is on github
<shrit[m]> Look at my last command
<shrit[m]> If it does not work try to dig more online, I think you understand what is happening now
<heisenbuugGopiMT> Hmm, okay...
<heisenbuugGopiMT> I think I got an idea...
<heisenbuugGopiMT> I will try and update...
<heisenbuugGopiMT> Okay, it's done.
<heisenbuugGopiMT> Now my github shows `This branch is even with mlpack:master`
<shrit[m]> Perfect
<heisenbuugGopiMT> Hello
<heisenbuugGopiMT> @shrit:matrix.org I started working on digamma
<heisenbuugGopiMT> If you look at wiki [page](https://en.wikipedia.org/wiki/Digamma_function)
<heisenbuugGopiMT> You can see that `digamma(x)` is `ln(x) - 1/2*x`
<heisenbuugGopiMT> s/2*x/2x/
<heisenbuugGopiMT> approximately
<shrit[m]> Yes
<heisenbuugGopiMT> When I compared this expression with boost's implementation there is a small difference in both.
<heisenbuugGopiMT> And as the value of x increases this difference decreases...
<heisenbuugGopiMT> Boost has a bit different implementation, I think they used the expansion to reduce this error in direct formula.
<shrit[m]> I see what your mean,
<shrit[m]> I am not sure how much precision we need in mlpack,
<shrit[m]> maybe rcurtin has a thought about it? for me I think it is fine
<shrit[m]> for what I can see is that the direct formula is a little bit higher values than Boost
<heisenbuugGopiMT> And tried to build it, somehow my terminal keeps crashing.
<shrit[m]> Did you implement Digamma?
<shrit[m]> is the Direct formula is your implementations value?
<shrit[m]> do they present the formula you have wrote above?
<heisenbuugGopiMT> `std::log(i) - (1 / (2 * i))`
<heisenbuugGopiMT> Yup, this
<shrit[m]> Okay, why your terminal is crashing?
<heisenbuugGopiMT> No idea, maybe due to this change process in getting stuck in some loop?
<heisenbuugGopiMT> Should I push the code and see what's happening on CI?
<heisenbuugGopiMT> Oh, maybe negative numbers?
<heisenbuugGopiMT> Yea, if we will have x as a negative number then this will fail.
<heisenbuugGopiMT> But I don't think it should crash the terminal...
<shrit[m]> what are the equivilant boost values?
<heisenbuugGopiMT> For negative values?
<shrit[m]> yes
<shrit[m]> Would you add the same one as the above comparison but for negative values
<shrit[m]> ?
<shrit[m]> There is an issue with your implementation, or we do not know what boost guy's implemented
<heisenbuugGopiMT> Also `x > -1`
<heisenbuugGopiMT> if i use `x <= -1` then even boost is giving an error.
<shrit[m]> This is normal
<heisenbuugGopiMT> And it makes sence, gamma is (n-1)!
<shrit[m]> No values for x < -1
<heisenbuugGopiMT> Yea, I spent the whole day figuring out gamma, it was fun but took some time.
<heisenbuugGopiMT> I also understood what boost did, but I am not very sure and it's difficult to write out all notations here...
<heisenbuugGopiMT> Maybe I can make two cases?
<heisenbuugGopiMT> `x > 0` and `x < 0`
<shrit[m]> Give it a try
<heisenbuugGopiMT> But even for that first, we need to verify that the above is at least working for positive integers.
<shrit[m]> You can an integration test 👍️
<shrit[m]> * You can add an integration
<heisenbuugGopiMT> `double nominator = meanLogx - logMeanx + log(aEst) - (std::log(aEst) - 1 / (2 * aEst));`
<heisenbuugGopiMT> This is the line I changed.
<heisenbuugGopiMT> Do you see any obvious errors which I am missing.
<heisenbuugGopiMT> Before
<heisenbuugGopiMT> `double nominator = meanLogx - logMeanx + log(aEst) - digamma(aEst);`
<shrit[m]> I think the best way to have a header file for the digamma function, and a unit testing, this will allow to compare with boost and verify if the results are true
<heisenbuugGopiMT> Yup, but if boost is doing soo much just to get that precision will we be losing something if we use direct formula.
<heisenbuugGopiMT> But how will we know the correct answer? Are we considering boost's implementation as a target?
<shrit[m]> I have no idea,
<shrit[m]> We can wait on rcurtin asnwer on this
<shrit[m]> s/asnwer/answer/
<heisenbuugGopiMT> Okay, I will try to figure out the same for negative numbers. I will make a separate header file in `mlpack/core/math/` and push the code to see the error properly on CI
<heisenbuugGopiMT> I will tag you and ryan in the PR.