Live data from Hacker News

Machine Learning Crash Course

developers.google.com

151–160 of 233 posts

Re: Machine Learning Crash Course

#151

This looks like a well put-together course, and a good way to learn TensorFlow. Keras and TensorFlow are top of my list of technologies to explore in the very near future. Is anyone here doing Andrew Ng's Machine Learning course [1]? I'm about half-way through and really enjoying it. I'm particularly appreciating that the programming exercises are done in MatLab/Octave, so I feel that I'm really understanding the fun…

i completed the andrew ng course recently, and felt that the difficulty dropped a lot in the second half of the course (for example, he stops giving homeworks). im hoping for more in his new DL courses

Re: Machine Learning Crash Course

#152
post #53

I want to ask people who know ML well if the hype is warranted? Billions of courses, web sites, job applications and HN posts. The subject seem to have taken off massively in the last two years. I mean image and speech recognition is pretty cool (when it works!), but hardly that earth shattering, is it?

Deep nets are deservedly big because they've managed to improve upon most of the decades-old state-of-the-art methods in the world of signal processing (DSP): voice, image, video, game play, and a significant amount of natural language. No other single computational/algorithmic method has achieved so much in so many domains, ever. That's revolutionary. The rate of advance using deep nets in signal processing will lik…

just commenting to thank you for a very accessible assessment of a simple question "is the hype warranted". please do more of these on HN (or elsewhere!)

Re: Machine Learning Crash Course

#153
post #133

Earlier quoted context omitted.

That has little to do with a PhD, it's the kind of thing you get with experience leading to a deeper understanding. 3D programming started as a field where only PHD's had any deep understanding of what was going on simply because they had experience when nobody else did. You see this pattern repeated frequently, in any complex domain.

Yeah, I expected this reply. The PhD is sufficient but not necessary here, right? A PhD researcher's job description is basically "learn necessary math, become a domain expert, and publish papers advancing that domain." It's difficult (but possible) to gain the same experience in industry if you don't have a graduate degree. Which company would pay you to work through Bishop or Goodfellow for a few months? Even a pri…

I would say PHD is sufficient to advance the field. That's no small thing, but only really overlaps at the start when just about anything advances the field and you need a broad focus.

Machine leaning for sorting peas at high speed is a very well trodden area at this point with a lot of industry specific domain knowledge. I expect self driving cars for example to reach a similar state in ~10-25 years.

The risk with a PHD is you miss the specific wave. But, if you want to stay on the bleeding edge it's probably well worth it.

Re: Machine Learning Crash Course

#154
post #110
post #24

In the course, in lecture "Reducing Loss: Gradient Descent" is "Convex problems have only one minimum; that is, only one place where the slope is exactly 0. That minimum is where the loss function converges." The first sentence is flatly wrong: E.g., for positive integer n and the set of real numbers R, function f: R^n --> R where for all x in R^n f(x) = 0, f is convex, concave, and linear, and for all x in R^n x is…

i would request that you stop critiquing "machine learning" based on the presentation in introductory online materials like this and the ng coursera course. you provide a lot of signal in general but i think these critiques do decrease your SNR. i am certain that you are familiar with the "usual" statistics sequence. (for others: there are lower-division courses that use calculus in a few places but otherwise avoid i…

If you find something wrong mathematically or otherwise with something I write, then by all means let me know. So far you have found nothing. Details:

The Google statement I quoted was flatly wrong. It is really important for students to be told that.

I gave some references to more in statistics.

> the measure-theoretic issues

I didn't mention measure theory, and the statistics references I gave don't mention measure theory either. I referenced Fleming only as background on convexity, and there is no measure theory in that part of Fleming.

You mentioned the role of calculus for the math of regression: That use of calculus, for deriving the normal equations, is neither necessary nor, really, sufficient. There is another derivation, nicer, fully detailed mathematically, with no calculus at all. The core of the idea is that the minimization of the squared error has to be an orthogonal projection and, then, presto, bingo, get the normal equations. And there are more advantages to that derivation. To keep my post simple, I omitted that derivation, but a good treatment of regression without calculus could use it.

I omitted the standard definition of convexity, but apparently in this discussion we need that. By omitting the definition, the Google material was not so good.

Definition (convex function): For the set of real numbers R and a positive integer n, a function f: R^n --> R is convex provided for any u, v in R^n and any a in [0,1] we have

f(au + (1-a)v) So, for a picture, on the graph of f(x), we have two points (maybe not distinct) (u, f(u)) and (v, f(v)). Then we draw the line between these two points. The number a determines where we are on that line. With a = 0, we are at point (v, f(v)). With a = 1, we are at point (u, f(u)). Then as we move a from 0 to 1, we move along that line. We also have on the graph the point, say, P

(au + (1 - a)v, f( au + (1-a)v ) )

And on the line we drew, we have point, say, Q

(au + (1 - a)v, af(u) + (1-a)f(v))

Well, we are asking that point Q be the same as point P or directly above point P. That is, the line we drew is on or above the graph of (x, f(x)). The line is sometimes called a secant line and is said to over estimate the function.

Definition (concave): The function -f is concave if and only if the function f is convex.

As in Fleming, a convex function is continuous. Intuitively, the proof is based on two cones, and as we approach a point we get herded between the two cones. The cones are from the convexity assumption. Draw a picture.

IIRC, there is a result in Rockafellar that a convex function is differentiable almost surely with respect to Lebesgue measure, but this is the only connection I would make with convexity and measure theory.

For convex f, the set of all (x, y) where y >= f(x) is the epigraph of f, that is, the region on or above the graph of f.

Definition (convex set): A subset C of R^n is convex provided for any u, v in C and any a in [0,1] the point

au + (1-a)v

is also in set A.

Well, as in Fleming, the epigraph is convex. It is also closed in the usual topology of R^n.

Definition (closed set): A subset C of R^n is closed (in the usual topology of R^n) provided for any sequence x_n, n = 1, 2, ... in C that converges to y in R^n, y is also in C.

In particular, if we define the boundary of C, set C contains is boundary. So, the interval [0,1] is closed and the interval (0,1) is not closed.

Well, for any closed convex set and point u on its boundary, there exists a hyperplane that passes through point x and where set C is a subset of the closed half space on one side of the hyperplane.

Such a hyperplane is said to be supporting for set C at point x.

Intuitively, in R^3, push convex set C to be in contact with a wall. Suppose point x on the boundary of set C is in contact with the wall. Then the wall is a supporting plane for set C at x, and set C is a subset of the room side of the wall.

Or think of a big, solid, irregular piece of cheese and John Belushi as his Samurai Tailor swinging his sword: John keeps swinging his sword in arcs that are in flat planes and cuts down the irregular cheese to a convex hunk. So, the convex C has been determined (formed) from the supporting hyperplanes from Belushi's sword.

For another way to make a convex set, take a piece of wood and press it against a belt sander until the boundary consists of only flat sides.

Let a solid rock roll around in a steam of water for a few thousand years, and may end up with a smooth, shiny, convex rock.

Faster a chicken egg is convex.

In general, a closed convex set is the intersection of its supporting hyperplanes.

Then, we can approximate a convex set with some of its supporting hyperplanes. In particular, we can approximate a convex function with some supporting hyperplanes of its epigraph. At times, this can be useful -- it's the main idea behind Lagrangian relaxation in constrained optimization (I used that once).

In particular, the epigraph of a convex function is the intersection of the supporting hyperplanes. In that case, a supporting hyperplane is called a subgradient. The function is differentiable at the point of contact if and only if the subgradient is unique. If the subgradient is unique, then it is just the tangent hyperplane from the gradient of the function.

In R^3, a cube is a convex set. Each of its sides is part of a supporting hyperplane. For a point on the boundary of the cube that is not on an edge, the supporting hyperplane at that point is unique. The corners and edges of the cube also have supporting hyperplanes, but they are not unique.

In R^3 a sphere is convex. Then it is also the intersection of its supporting hyperplanes. At each point on the boundary of the sphere, the supporting hyperplane is unique.

Similarly for epigraphs.

So, the function f: R*n --> R where for each x f(x) = 0 is convex, concave, and linear, and each x is both a maximum and a minimum of f. So, the minimum of a convex function need not be unique. In this case, the epigraph is just a closed half space.

"Look, Ma! No calculus!" And no measure theory.

Exercise: Derive the regression normal equations via perpendicular projections and without calculus.

Exercise: Argue the role of perpendicular projections in the minimization in regression.

Re: Machine Learning Crash Course

#155

Looking through the topics covered, the standard AI-course caveats ( https://news.ycombinator.com/item?id=16247629 ) apply. Yes, AI/ML MOOCs teach the corresponding tools well, and the creation of new tools like Keras make the field much more accessible. The obsolete gatekeeping by the AI/ML elites who say "you can't use AI/ML unless you have a PhD/5 years research experience" is one of the things I really hate about…

Unless you work for a company obviously known for their ML the "expertise" out there right now is brutal. People are building recommendation engines without knowing the very, very, very basics like Jaccard indexes, ROC Curves, or topic drift. I've even had to explain type two error to someone working on one of these before. I agree with your general thrust, and you're right, messy data is often 95% of the problem, bu…

Was the project the person was working on having any success? If so, you might be unfairly ignoring their positive contributions and focusing only on this one negative sign that you observed.

Re: Machine Learning Crash Course

#156
post #83

Earlier quoted context omitted.

What's a "type two" error? I had to google it. It's a false negative. A "Type 1" error, is a false positive. Is this like how people overuse the term "orthogonal"?

"Type I" and "Type II" errors are some of the stupidest and most obfuscatory academic terminology ever invented, and (as an academic) I absolutely refuse to make the effort to learn which way round they go. Just call the bloody things what they are: false positives and false negatives. (Getting seriously OT now, but Kahneman does something annoyingly similar with his talk of "System 1" and "System 2" in Thinking Fast…

Ahaha, I agree so much the the Kahneman jibe. How could someone so smart pick names so f*cking dumb?!

Re: Machine Learning Crash Course

#157
post #117

Unless you have already invested a lot of time into learning (and building on top of) TF, I would advise to pick up PyTorch. It’s much easier to learn and use (imperative!), and has higher performance on common workloads.

Except there aren't many good resources to learn it and the documentation isn't very good. Hopefully this will improve soon.

On the positive side with PyTorch you don’t need nearly as much documentation as you would with TF. TF in general feels like it’s fighting you every step of the way. There’s a lot of cognitive overhead. Not so with PyTorch. Everything is straightforward, and can be run/examined in ipython.

Re: Machine Learning Crash Course

#158
While I like the idea, in principle, that you don't need a CS education to use AI/ML, I doubt it. Here's a problem that cropped up today: Our instance ran out of hard drive space on a training set of ~400,000 images. The individual images were only 375 GB, but took up 1.5T when converted to Numpy matrices. Why? The arrays were converted to standard int arrays (32-bit x 3 channels) when they could've fit into short (8-bit x 3 channels). Each image was 4x as large as it needed to be.

You can certainly use high-level ML tools (like Keras), but it takes a great deal of work to wrangle your data into a usable format, and even more knowledge to debug an ineffective network.

Re: Machine Learning Crash Course

#159
post #13

Great to see they have a nice introductory section to feature engineering! Feature engineering is often the most impactful thing you can do to improve quality of models and a place where I often see beginners (and experts for that matter) get stuck. Google walks through how to work with json files and categorical variables https://developers.google.com/machine-learning/crash-course/... . If anyone is looking to get m…

How do you select features created with featuretools? The problem with automated feature engineering is that you end with too many irrelevant features, and I haven't found a good guide on feature selection.

Re: Machine Learning Crash Course

#160
post #55
post #24

In the course, in lecture "Reducing Loss: Gradient Descent" is "Convex problems have only one minimum; that is, only one place where the slope is exactly 0. That minimum is where the loss function converges." The first sentence is flatly wrong: E.g., for positive integer n and the set of real numbers R, function f: R^n --> R where for all x in R^n f(x) = 0, f is convex, concave, and linear, and for all x in R^n x is…

You should recheck your definitions on convexity. >function f: R^n --> R where for all x in R^n f(x) = 0 This hyperplane is not convex. A convex curve by definition can not be equal to its tangent at any point. Edit: I should specify, I mean a convex curve cannot be completely equal to any of its tangents, obviously it will equal each tangent at a single point.

> This hyperplane is not convex. A convex curve by definition can not be equal to its tangent at any point.

No, my math is fully correct, and your claim is wrong.

For a lecture Convexity 101, see my

https://news.ycombinator.com/item?id=16498564

Post reply on HN