HNHacker News
TopNewBestAskShowJobs

Ragib_Zaman

246 karma · joined January 2, 2019

submissionscomments
Ragib_Zaman··on Learning at work is work, and we must make space for it
Exactly. Lots of places will not blink an eye if you are reading a blog post on something you'll be able to apply within a week. Having a textbook with pen and paper out to learn something that may not bring fruit for several months is a different story.
Ragib_Zaman··on The most copied StackOverflow snippet of all time is flawed
And the pow and log methods they call run loops anyway. What is wrong with loops anyway?
Ragib_Zaman··on Sundar will be the CEO of both Google and Alphabet
And their core goal of truly autonomous vehicles is a technical challenge that at this point seems like it will take at least several years more than what they originally thought 3 years ago. Their situation is not similar to FB in 2008 at all.
Ragib_Zaman··on What is Symplectic Geometry? (2016) [pdf]
Quite interestingly, Symplectic Geometry is currently under review/investigation for some of the foundational papers in the field having serious gaps and outright errors after closer inspection. These concerns were always spoken of in hush hush tones and only in recent times have people stated their concerns publically. Some of the original authors refuse to retract their papers despite being assured their academic positions (which realistically, came through the reputation built up by these papers) are secure. Here's a quanta article about this fiasco: https://www.quantamagazine.org/the-fight-to-fix-symplectic-g...
Ragib_Zaman··on The revolution of machine learning has been exaggerated
The first path lets you become a quantitative problem solver, which is widely employable. The second path leads to being very good at specific deep learning tasks that I don't think will be in large demand in 5 years IMO, at least outside the largest tech companies with all the data. Other companies will fulfill their business needs with fewer ML-specialists, AutoML and pretrained models.
Ragib_Zaman··on Office noise bothers some people more than others
I agree that brown noise generally sounds more calming and pleasant, for example some people enjoy falling asleep to brown noise. In my personal use case of shutting out external noises, I find that it's only the higher frequencies that can make it through the noise cancelling headphones and earplugs, and pink noise helps my brain ignore those better than brown noise, as it melts into the pink noise more closely. It's definitely worth trying both out, in various environments, to figure out what works best for you.
Ragib_Zaman··on Office noise bothers some people more than others
I also hate external noise. Here's my nuke option.

1) Sony XM3 headphones. They are the 2nd most comfortable after the Bose headphones and have the best NC. So far, nothing you haven't done before.

2) High quality foam earplugs. I have the Mack's Ultra Soft plugs, with 32 decibel noise reduction rating. Anything with 27 decibel reduction or above should be good enough though. You may need to alternate between a few brands and variants before you find one that's comfortable enough to go many hours with.

3) Pink Noise. Play it quite softly so that you can barely even hear it at all with the plugs in. It helps to drown out the remaining external noises that come through without registering in your brain as extra noise itself (which is why I play pink noise instead of other suggestions such as calming music). I like this one: https://youtu.be/8SHf6wmX5MU

I combine all 3 for the nosiest areas like studying in a busy cafe, but you won't usually need the whole stack.

Ragib_Zaman··on New Solutions for Quantum Gravity with TensorFlow
> "This work is predicated on a key observation that a mixed numerical and analytic approach can be more powerful than a purely analytical method. Instead of attempting to find analytic solutions with brute force, we use a numerical approach that leverages TensorFlow for the initial search for solutions to the model. This then yields hypotheses on which specific combinations can be tested and analyzed with stringent mathematical methods, ultimately proving the actual existence of a conjectured solution. This represents a novel methodology for making further progress in theoretical physics."

This paragraph makes it sound like they invented the entire idea of using numerical experiments to find promising paths for analytic studies.

Ragib_Zaman··on Three of the Hundred Falsehoods CS Students Believe
Indeed, Dijkstra barely ever even used a computer. I can't say I agree with trashing a Prof with deep expertise in algorithms for not knowing C while doing a favour by substituting for a colleague.
Ragib_Zaman··on Introduction to Probability at an advanced level (2018) [pdf]
Homework problems and notes split into individual lectures available here:

https://www.coursehero.com/sitemap/schools/234-University-of...

Ragib_Zaman··on Introduction to Probability at an advanced level (2018) [pdf]
I wish I had searched for something like this when I was revising for some interviews last month! This is a great quick overview of intro probability. Thanks for sharing OP.
Ragib_Zaman··on The making of Jim Simons
As throwawaymath mentioned, it's not too hard to find papers written by them, but I'll highlight some papers that I found particularly interesting.

Many optimization problems that arise in machine learning can be viewed as minimizing a particular Bregman distance subject to affine constraints (I'll call these "Bregman distance optimization problems").

In [1], the authors develop some quite general and widely applicable convex analysis type results for Bregman distances and use those results to give the technique of "Auxiliary Functions" which can be used to derive and prove the convergence of algorithms for particular Bregman distance optimization problems.

In [2], the authors show that finding the optimal parameters of two quite different approaches of binary classification, AdaBoost and Logistic Regression, can both be simultaneously viewed as the same Bregman distance optimization problem (with slightly different initial parameters). They then present several algorithms for solving this unified problem (and thus, for optimizing both AdaBoost and Logistic Regression), and prove the convergence of their algorithms with the method of Auxiliary functions developed in [1]. This paper was the first general proof of convergence for AdaBoost which was proposed by Yoav and Schapire (one of the authors of [2]) and earned them the Gödel prize in 2003.

If you don't mind me plugging in some expository work of mine, I wrote an essay ([3]) giving an introduction to Bregman distances and is pitched at a lower level than [1] and [2]. The end of the first chapter discusses in particular the general Bregman distance optimization problem, setting it up in the same framework as [1] and [2], and the final chapter presents the algorithm and proof of convergence originally given in [2] but hopefully with a slightly simplified presentation due to focusing only on the Logistic Regression case of the algorithm.

In case you want to play around with it, I have implemented the algorithm from [2], as well as a related algorithm from [4] which incorporates L1 (Ivanov) regularization into that algorithm, both being available at [5]. The middle chapters contain brief discussions on the relation of Bregman distances with Exponential Families, and on Generalized Linear Models, which are relevant to the overall purpose of the essay but not so closely related to the content of [1] and [2] and may safely be skipped.

If you generally enjoy the types of problems discussed in [1] and [2], you might also enjoy some of these papers: [6] [7] [8] [9].

--------------------------------------

[1] - "Duality and Auxiliary Functions for Bregman Distances". Stephen Della Pietra, Vincent Della Pietra, and John Lafferty, 2001.

[2] - "Logistic Regression, AdaBoost and Bregman Distances". Robert Schapire, Michael Collins, Yoram Singer, 2001.

[3] - "Optimisation of Bregman Divergences". Ragib Zaman, 2018. https://github.com/RagibZaman/mathematical-optimisation/blob...

[4] - "Bregman distance to L1 regularized logistic regression". T. Huang and M. Gupta, International Conference on Pattern Recognition, 2008.

[5] - Notebook containing implementations of Bregman divergence based algorithms for Logistic Regression from [2] and [4]. https://github.com/RagibZaman/mathematical-optimisation/tree...

[6] - "Legendre functions and the method of random Bregman projections." H. Bauschke and J. Borwein, Journal of Convex Analysis, 1997.

[7] - "Inducing features of random fields". Stephen Della Pietra, Vincent Della Pietra, and John Lafferty, 1997.

[8] - "Statistical learning algorithms based on Bregman distances". Stephen Della Pietra, Vincent Della Pietra, and John Lafferty, 1997.

[9] - " A maximum entropy approach to natural language processing". Adam L. Berger, Stephen Della Pietra and Vincent Della Pietra. Computational Linguistics, 1996.

Ragib_Zaman··on The making of Jim Simons
Flip side to this - I remember studying a series of papers in statistics/optimisation/machine learning with highly non-trivial content published between 1998 and 2008 by the Della Pietra brothers. I had assumed they were mathematicians/statisticians at some major research university. At the bottom of one of these papers it had some personal blurbs which stated they had both been at RenTech since 1995 working on "statistical methods to model the stock market", which surprised me greatly given the amount of research they output. I assume the content of those papers were applied to their strategies, in which case there would also be a good amount of people who would be surprised if they knew how advanced their methods are. I say this especially in comparison to the "quant" strategies I know many other trading firms use/have used, which are actually often quite simple. Indeed, at some places they seem to think any systematic/automated strategy is "quant"...
Ragib_Zaman··on Why Isn't Functional Programming the Norm? [video]
That certainly explains a whole lot. Thanks!
Ragib_Zaman··on Why Isn't Functional Programming the Norm? [video]
Jane Street is OCaml basically from top to bottom. They seem pretty fast.
Ragib_Zaman··on Why Isn't Functional Programming the Norm? [video]
Perhaps not a satisfactory response but when I start drifting towards thinking FP is fundamentally not as performant as _whatever_else_, I remember that Jane Street uses OCaml basically from top to bottom, and they certainly can't be too slow... Some black magic going on there.
Ragib_Zaman··on What the max amount of caffeine you should be drinking in day looks like (2017)
I've never tried nor wanted to cut it out entirely, but I did want to reduce my intake so that when I did take it, I was not so tolerant of it and it's positive effects were more noticeable. Due to having built a tolerance and enjoying the taste, I would have coffee in the evenings, on weekends, and on workdays at least 3 on waking, midday and afternoon.

For the 2 months I've cut down pretty drastically - No caffeine after 4pm. Only taking it on workdays, at 11am and 3pm. 1 shot per coffee (no large size or double shots).

Surprisingly, I haven't noticed any real negative effects. I think it would be worse going totally to zero. Maybe you'll be able to get the benefits you want by a reduction without going cold turkey?

Another thing to do your own research on, but I also started having Theanine alongside my coffee, and I feel like it's functioning as intended in terms of reducing jittery-ness, some of the random mild muscle twitches I sometimes got with high caffeine/low sleep, and less of that heavy heartbeat I sometimes used to get. Unfortunately there's considerate overlap between when I started reducing my caffeine intake and also supplementing Theanine, so I don't know how much to attribute to what...

Also, decaf does not taste noticeably different to me. I started ordering decaf e.g. on weekends, and it's made surprisingly little difference. I did get a few comments when my friends noticed, but no negative pressure, most people tend to be sympathetic to someone trying to reduce their caffeine intake I've found.

Ragib_Zaman··on A Counterintuitive Probability Game
Great problem OP.

1 - As some people have already clarified for other commenters, it indeed makes no difference how Player 1 picks their numbers. They can pick them from some distribution of their own, or in an adversarial manner. The probability of winning by following the strategy in the paper is still strictly greater than 1/2.

2 - In fact, even if Player 1 can read Player 2's mind and knows their strategy and even the exact distribution they will sample from (but can't see into the future to see the sample from the distribution), the probability is still strictly greater than 1/2.

3 - Since it isn't actually included in the paper or any of the comments, for the sake of completeness I'll write down the computation.

Let P(E) denote the probability of an event E, and W be the event that Player 2 wins by following the strategy suggested in the paper. Let a, b be the smaller, larger number respectively. A is the event that Player 2 picked a, B is the event that Player 2 picked b. Then summing over disjoint events,

P(W) = P(A and W) + P(B and W) = P(W | A)P(A) + P(W | B)P(B)

We have P(A) = P(B) = 1/2. Now let x be the result of Player 2 sampling from their distribution. Given that they picked A, they win if and only if a <= x, so P(W | A) = P(a <= x). Given that they picked B, they win if and only if x < b, so P(W | B) = P(x < b). Therefore,

P(W) = (1/2) [P(a <= x) + P(x < b)] = (1/2) [1 + P( x in [a,b) )]

4 - If I were to show this problem to someone else, I may try to emphasize the potentially adversarial nature of Player 1 and the odds seemingly being stacked against Player 2 by phrasing it like this (although this may be _over_ exaggerated):

* Player 1 gets to write down any two distinct real numbers on two pieces of paper, and then flips a coin. Player 2 gets to see the number on the left if the coin lands on Heads, the number on the right if the coin lands on Tails. After seeing the number, Player 2 must declare whether they are seeing the smaller or larger number. If Player 2 guesses correctly, they win $1 from Player 1. Otherwise, Player 2 pays $1 to Player 1.

Further, now knowing the rules of the game, both players can choose any particular strategy of playing the game. However, whatever Player 2 chooses as their strategy, they must inform Player 1 of their strategy and not deviate from it when the game is played. Player 1 is allowed to adjust their strategy after hearing Player 2s strategy. Would you prefer to be Player 1 or Player 2? *

I think worded like that, many peoples first guess might even be Player 1. Then their next answer would be that it doesn't matter, and then they're in for a treat when they see that they should choose to be Player 2!

Ragib_Zaman··on A mathematician's way of converting miles to kilometers
The pendulum has now swung the other way on the misconception by the general public of mathematicians being great at mental arithmetic, and it's become a meme for some mathematicians to take some pride in being average or poor at mental arithmetic. In my experience, most mathematicians (or anyone working in a quantitative field) don't have issues quickly approximating 1.6 * X.
Ragib_Zaman··on AMD EPYC processors come to Google, and to Google Cloud
If you do data science/ML with CPU computed models (basically everything except deep networks), you get a ~2x speedup when doing e.g n-fold cross validation (n >= 64), or hyperparameter optimisation via grid search.
Ragib_Zaman··on Tech backlash has come to Stanford
Lots of clever people unintentionally trained deep networks that unfairly discriminated against people of various races or from certain zip codes. Sometimes you aren't aware of all the implications of the decisions you might make and a course that informs you of such pitfalls can be helpful. Professional ethics courses at the University level aren't there to convince you discrimination based on gender, race etc is wrong, but to make you aware of when that may be occurring.
Ragib_Zaman··on Personal Website for Programmers
> Judgements like "I'd expect dev to write it themselves" come across as arbitrary.

I feel like this depends on the type of dev. If you write C code for microcontrollers then who cares, but if you do web dev then using a generic template not authored by you seems like a bad sign, no?

Ragib_Zaman··on Temperature Conversion: Mental Calculation (2014)
Ahh fair enough. I should have spent more time understanding your rationale. I'll edit my original comment to reflect that.
Ragib_Zaman··on Temperature Conversion: Mental Calculation (2014)
Edit: The original comment below did not take into proper account the significance of taking the floor in the approximations, rendering it mostly useless. ----

If the "refined approximation" assumes it's easy to 1) subtract 10% 2) double and 3) add 31, then it should be just as easy to 1) double 2) subtract 10% and 3) add 32 - i.e. the exact conversion formula.

Ragib_Zaman··on Matlab vs. Julia vs. Python
I know of a few major trading firms that use MATLAB for a lot of their analysis. In many companies that hire engineers they also often use MATLAB as it's sufficient for what they need those engineers to do (and programmers at those companies use different languages), and many engineers come out of their degree feeling most comfortable with MATLAB for scientific computation.
Ragib_Zaman··on AMD EPYC “Rome” Server Processors to Feature 8 to 64 Cores
Is this conjecture or has AMD stated in a roadmap they plan to have 5nm in 2 years?
Ragib_Zaman··on AMD EPYC “Rome” Server Processors to Feature 8 to 64 Cores
Also maybe complications involving latency for communication between cores, and memory coherence protocols.
Ragib_Zaman··on AMD Ryzen 5 3600 Beats Intel’s Core i7-9700K in Cinebench
Pretty amazing to see him going straight from a a B.S. into designing processors and fairly quickly becoming the head engineer on cutting edge processors.
Ragib_Zaman··on Ask HN: How to get better at Data structures and Algorithm?
If you want to prep for interviews, it may be most efficient to look through lots of hacker rank problems and learn them in an ad-hoc function, looking up solutions online after you've tried them. If you actually want a good understanding of fundamental data structures and algorithms, I very much recommend reading Cormen et al. First 4 sections (17 chapters) plus Chapter 22 (Elementary Graph algorithms) are the absolute essentials (obviously some people may have some small level of disagreement with this but I think it's fairly accurate). By then you'll have enough knowledge to skim the introductions of the other chapters and decide whether you care about reading them now or just keep the basic premise of what that chapter addresses in the back of your head so if something requiring it comes up later you'll know you can refer back there.

Edit: hah, I type very slow on my phone evidently. strikelaserclaw's advice here is very similar to this :)

Ragib_Zaman··on AMD Zen 2 Microarchitecture Analysis: Ryzen 3000 and EPYC Rome
I guess I was being ridiculously optimistic hoping for the 16 core chip to be around the $600 mark :(
← PreviousPage 2 of 3Next →