
Machine Learning Crash Course - matant
https://developers.google.com/machine-learning/crash-course/
======
minimaxir
Looking through the topics covered, the standard AI-course caveats
([https://news.ycombinator.com/item?id=16247629](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 the industry.

However, contrary to the thought pieces that tend to pop up, taking and
passing a crash course doesn't mean you'll be an expert in the field (and this
applies for most MOOCs, honestly). They're very good for learning an overview
of the technology, but nothing beats applying the tools on a real-world, noisy
dataset, and solving the inevitable little problems that crop up during the
process.

Reviewing the Keras documentation ([https://keras.io](https://keras.io)) and
examples ([https://github.com/keras-
team/keras/tree/master/examples](https://github.com/keras-
team/keras/tree/master/examples)) are honestly much better teachers of AI/ML
than any MOOC, in my opinion.

(Of course, Keras is now a part of TensorFlow, so there's a neat Google
vertical intergration with this crash course!)

~~~
3pt14159
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, but even going through just the Google courses will put people in
the top 15% in most cities.

~~~
BadCookie
I took a machine learning graduate-level course from Andrew Ng himself, and I
don't recall learning about Jaccard indexes or topic drift. Maybe your sense
of what counts as "very, very, very basic" is skewed toward your own
experience. There's a phenomenon known to psychologists where people tend to
think that the stuff that they know is very easy and basic, so they conclude
that anybody who doesn't know what they know must be uneducated. But then it
turns out that the person you think is uneducated knows about a bunch of
surprising stuff that you don't. I can't remember the term for this
phenomenon, but I often remember it whenever I find myself beginning to judge
another person's expertise. This phenomenon is also super relevant to the
failings of most technical interviews, in my opinion.

~~~
eanzenberg
There's a bit of snobbiness in different areas of tech, although there also
are in different areas of academia and research. At the end of the day, the
most successful people are the ones who wouldn't dismiss a DS who didn't know
"Jaccard index" or "the Halting Problem".

------
kmax12
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/...](https://developers.google.com/machine-learning/crash-
course/representation/feature-engineering).

If anyone is looking to get more indepth, I work on an open source python
library for automated feature engineering called Featuretools
[https://github.com/featuretools/featuretools/](https://github.com/featuretools/featuretools/).
It can help when your data is more complex such as when it comprised of
multiple tables.

We have several demos you can run yourself to apply it to real datasets here:
[https://www.featuretools.com/demos](https://www.featuretools.com/demos).

~~~
fnl
Your comment got me interested in this course. However, all I could find about
feature engineering there is what you linked to, directly.

Given that entire scientific careers, books, and conferences are built around
the topic of feature engineering, and at least IMO good ML tools live or die
with good feature engineering (in its broadest sense, for you deep learning
fanatics :-)) that doesn't seem like more than the bare minimum I'd expect
from _any_ ML "crash-course" that is to be taken serious (and I wouldn't
expect an ounce less from Google... :-)).

Am I missing something, maybe?

In any case, nice work of your own, and thanks for sharing it!

~~~
kmax12
10 seconds into the video of feature engineering they say that feature
engineering takes up about 75% of the time
[https://developers.google.com/machine-learning/crash-
course/...](https://developers.google.com/machine-learning/crash-
course/representation/video-lecture)

They understand the value, but but if you keep watching, they don’t seen go
beyond the basic.

------
eddieplan9
For those interested in a deeper dive to just deep learning, "Tensorflow and
deep learning - without a PhD" is really good, and covers a lot of material in
a single 2hr talk.

[https://www.youtube.com/watch?v=vq2nnJ4g6N0](https://www.youtube.com/watch?v=vq2nnJ4g6N0)

~~~
null0pointer
+1 for this. Well worth the 2 hours.

------
andyjohnson0
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 fundamentals without an API getting in the way, and
developing some good intuition. Obviously frameworks are the way to go for
production ML work, but I wonder whether ML people here think this bottom-up
approach is advisable or could it be misleading when I move on to
Keras/TensorFlow/whatever?

[1] [https://www.coursera.org/learn/machine-
learning](https://www.coursera.org/learn/machine-learning)

Edit: brevity

~~~
johnx123-up
I used to download all ML videos for offline ad hoc watching. But, this crash
course videos cannot be downloaded using 'youtube-dl'. Any recommendations?

~~~
abhishekjha
Where are the videos anyway? I don't see any play button or ay console to play
the videos.

------
bpesquet
The choice of TensorFlow is a bit disappointing for a beginner-focused course
which looks really solid otherwise. Business seems to have gotten priority
over pedagogy in that case.

I see TensorFlow as the Angular of machine learning: first on the market,
powerful but unwiedly. Like Angular, it will ultimately get superseded by
tools with a nicer API (scikit-learn, Keras) or more versatility (PyTorch).
Like Angular, it's probably not the best choice for a beginner to invest time
into.

~~~
dragandj
Add to that that TensorFlow was practically a latecomer, not the first to
market.

------
ivan_ah
I love the prework section: [https://developers.google.com/machine-
learning/crash-course/...](https://developers.google.com/machine-
learning/crash-course/prereqs-and-prework) It's a very good mix of topic and
skills that I think everyone should learn, even if not directly planning to do
ML or DL. If y'all are looking for a compact (and inexpensive) textbook on
linear algebra that comes with all prerequisites you can check out:
[https://gum.co/noBSLA](https://gum.co/noBSLA) (disclaimer: I wrotes it)

------
chris_va
Link to the exercises: [https://developers.google.com/machine-learning/crash-
course/...](https://developers.google.com/machine-learning/crash-
course/exercises)

------
mrdmnd
As someone who just did this internally:

Do it. It's worth your time. Very well paced exercises, and it walks you
through the flow quite nicely.

~~~
tostitos1979
I went through the first a couple of topics. It seemed very disjointed.
Different people presenting, different exercises. Was it like this internally?
Or is this heavily "annotated"?

------
zitterbewegung
I like this move from google. Sure it is targeted for you to use Tensorflow
but more courseware and MOOCs help everyone. I love doing self study and
Tensorflow's tutorials are top notch. Since I can also use Tensorflow on my
own hardware and anywhere else I really love better docs and MOOCs in general.
What I really want to do is understand enough Tensorflow to reproduce other
people's experiments in their papers on github and I think this would be one
of the best ways to do this. Of course, this may eat into a bunch of companies
that have paid programs for ML but its Google's prerogative to make ML cheaper
and easier to deploy and learn so I am all for that.

------
blueside
_we recommend that students meet the following prerequisites:Mastery of intro-
level algebra. You should be comfortable with variables and coefficients,
linear equations, graphs of functions, and histograms_

Any book suggestions to getting up to speed in this area?

~~~
ropable
Khan Academy probably has this covered.

~~~
toomuchtodo
A shame Google doesn’t just link to the Khan Academy course.

~~~
earth2mars
not true. they do have khan academy link where applicable. for example for the
algebra ones. check below link [https://developers.google.com/machine-
learning/crash-course/...](https://developers.google.com/machine-
learning/crash-course/prereqs-and-prework#prerequisites)

------
austenallred
Shameless plug: Lambda School (YC S17) is also putting on a free Machine
Learning crash course (we call it a mini bootcamp), followed by an optional
6-12 month course that you pay for once you get a job in data science (it’s
free until then, and always free if you don’t get a job in ML).

[https://lambdaschool.com/machine-learning-
bootcamp/](https://lambdaschool.com/machine-learning-bootcamp/)

~~~
eorge_g
is there a more fleshed out outline for what will be covered here? sounds
interesting

------
redditmigrant
As someone who is trying to learn ML, all the courses available are hugely
helpful. One thing I wish I had easy access to is the process that someone
goes through while trying to build a model on a real dataset.

Specifically following questions are the ones I struggle with:

1\. How did you figure out what features would be useful?

2\. How did you figure out what algorithm(s) are appropriate?

3\. how and why did you massage the data in a specific way?

~~~
bkanber
> How did you figure out what features would be useful?

There are various feature engineering and feature extraction techniques.
Filter methods, wrapper methods, and embedded methods. Principle component
analysis, autoencoding, variance analysis, linear discriminant analysis, Gini
index, genetic algorithms, etc -- the feature selection process will depend on
the dataset, the problem domain, the analysis algorithm you ultimately use,
etc.

> How did you figure out what algorithm(s) are appropriate?

Also depends on the problem domain. Discrete or continuous data? Categorical
features, numeric features, features as bitmasks. Do you need a probabilistic
outcome? Etc.

Generally you start with the easiest algorithms in your toolbox to see how
viable they are. For a classification task I'll almost always start with a
naive Bayes classifier (if the data allows) and/or a random forest and see how
they perform. If the problem domain is highly non-linear you might start with
a support vector or kernel method. Neural network is a last resort for me, as
I find most classification problems can be solved to a high accuracy much more
simply.

> how and why did you massage the data in a specific way?

This relates back to #1 -- you should only massage data based on what your
feature engineering tells you to do. Sometimes you might want to remove
outliers or clean up the training data, but only if the outliers really should
be removed from consideration entirely.

~~~
redditmigrant
Thanks for the response!

> There are various feature engineering and feature extraction techniques.
> Filter methods, wrapper methods, and embedded methods. Principle component
> analysis, autoencoding, variance analysis, linear discriminant analysis,
> Gini index, genetic algorithms, etc -- the feature selection process will
> depend on the dataset, the problem domain, the analysis algorithm you
> ultimately use, etc.

Obviously thats a big toolbox and Im sure it takes time to develop an
intuitive understanding for all these techniques. What I hope for is some sort
guidebook on what to look for when I stumble across problems. So lets say you
try out an algorithm and your accuracy(or whatever evaluation criteria you
might have) is low. How do you figure out if thats due to the algorithm, or is
it due to (or due to the lack of) feature selection?

An analogy that might be useful is, when I see my database queries are slow, I
can use EXPLAIN to guide what knobs to tune. Obviously it requires
understanding what indexes are, what a full table scan is etc. etc. but the
EXPLAIN plan provides a guidebook of sorts.

~~~
bkanber
Every problem is different, so the only advice I can give is: research
research research! Do the hard work up-front; figure out how to _describe_
your problem in a mathematical sense, and identify the right tools to use for
the shape of your input, output and problem dimensions. What's the
distribution of each dimension. Are the relationships linear, nonlinear,
clustered, dispersed, logarithmic, etc. Once you know those things, you're
able to narrow in on the right tools and analyses to use.

------
rohitpaulk
I've compiled this into a Todoist template you can import - it's got links to
each module + times.

To preview: [http://todotemplates.com/posts/HRtYanEq8zMgRL5fz/google-
ml-c...](http://todotemplates.com/posts/HRtYanEq8zMgRL5fz/google-ml-crash-
course)

To import directly:
[https://todoist.com/importFromTemplate?t_url=https%3A%2F%2Fd...](https://todoist.com/importFromTemplate?t_url=https%3A%2F%2Fd1aspxi4rjqbaz.cloudfront.net%2F24fc6edd6dff480670528e9f842cb494_Google%2520ML%2520crash%2520course.csv)

------
ak_yo
Cool tutorial, but I'm not entirely sure what makes this ML -- aside from
neural nets, this is more or less the material you'd encounter in a basic
applied statistics or regression analysis course, minus material on estimating
uncertainty, modeling survival or time-series data, and causal inference. I
suspect you'd benefit more from a 50 minute tutorial on those than neural
nets.

------
bjourne
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?

~~~
randcraw
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 likely slow down
now, but they aren't going away, not in the foreseeable future.

The hype around DNNs arose when we took our unbridled enthusiasm for what's
they've achieved in DSP and extended it to other domains where data is less
'dense' and thus aren't as amenable to fast de/convolution in N-D space or
time.

Will DNNs revolutionize or introduce _all_ the techniques needed to achieve
AGI/Strong AI? I very much doubt it. As yet, there's little sign that DNNs can
perform relational operations on interdependent symbols, like the transforms
available via type theory, bayesian nets, or predicate logic.

The multitude of disparate facts and semantics in a rich knowledgebase can't
be organized into dense matrices the way that continuous signals can, so the
SIMD operations that are so effective in DSP won't implement the rich
transformations needed in a relational fact-based knowledge space equally as
well, if at all. Thus DNNs almost surely aren't going to take us to the
heights of logical or compositional thinking that human level intelligence
requires.

But how far up relational mountain _will_ DNNs take us? I suspect that won't
be known for a decade or longer. But even if we don't reach the summit, we'll
be considerably closer than we were before.

~~~
wepple
This is a really fantastic and interesting look at ML, for someone who’s just
beginning first steps. Any recommendations on where else I can read about the
areas DNNs and associated stuff (GANs, RL, etc) in terms of what they’ll
likely not be capable of in the near mid term?

------
kidfiji
I've been itching to learn a bit about the industry and to be able to create &
train ML models myself; I'm glad Google decided to put out a course where I
wouldn't have to worry about the quality of instruction.

------
msaharia
On a sidenote, can someone talk about what kind of tools are being used to
integrate the subtitles and scrolling behavior over a youtube video in this
course? Is there an OS implementation?

------
rtfs
Thanks Google! Now I know that I am a ML guy, as an economist and
econometrician. Yes, we shoot this on all kind of stuff, though with a clear
business acumen or economic policy thinking.

------
Abundnce10
I have a new project at work: I need to take in a free form text of recipe
ingredients (e.g. "1/2 cup diced onions", "two potatoes, cut into 1-inch
cubes", etc.) and build a program that identifies the ingredient (e.g. onion,
potato), as well as the quantity (e.g. 0.5 cup, 2.0 units). Would machine
learning be an applicable approach to solving this? Right now I'm just
planning on using an NLP library to parse out the various parts of the
ingredient text.

~~~
maffydub
It's not very sexy, but I think you might find it easier and more robust just
to use an NLP library.

I built something similar (albeit for a relatively limited database of
recipes) for a hackathon a couple of weeks back. I didn't even use a proper
NLP library, just some simple hand-rolled pattern-matching, and got pretty
good results.

Good luck!

~~~
Abundnce10
I think you're right. Did you happen to open-source your code from the
hackathon? I'd love to take a look at your approach if you don't mind.

~~~
maffydub
Sorry, I normally would but one of the other team members is considering
taking the hack forward and wanted to keep it closed for now. (It's hard to
see how much competitive advantage he'd have from 48 hours of very-hacked-
together code, but so few hackathon projects get taken forward that I didn't
want to discourage him!)

The approach was to tokenize the input and then do basic pattern-matching on
it, with separate dictionaries of quantity units (e.g. cup, oz, pound)
ingredients, processing words (e.g. "chopped") and throw-away words (e.g.
"of"). In fact, possibly the most complicated part was parsing "2.5", "2 and a
half" and "2½" all to the same thing.

------
DeepWorker
The ulterior motive behind this is to increase usage of Google Cloud
(according to this answer on Quora: [https://www.quora.com/Why-did-Google-
release-their-machine-l...](https://www.quora.com/Why-did-Google-release-
their-machine-learning-crash-course/answer/Carlos-Matias-La-
Borde?share=00711d71&srid=XvlZ))

------
qwerty456127
Cool! Does anybody also know a good blockchain crash course of similar kind so
one could grok all the major buzzwords of today?

~~~
lanewinfield
I loved this one a lot:
[https://anders.com/blockchain/](https://anders.com/blockchain/)

~~~
abhishekjha
This is what got me a proper intuition for why a blockchain can be useful.

------
throwaway84742
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.

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

~~~
throwaway84742
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.

------
aabajian
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.

------
zengid
I wonder if they are doing this to complete with course.fast.ai

~~~
bllguo
IMO teaching people ML is good in general for Google. 1. it spreads the use of
tensorflow, 2. it increases not only tensorflow, but also Google's mindshare,
3. it trains people that may become future Google employees, and/or serves as
a useful resource for existing employees

~~~
jxub
Also 4) will increment the usage of TPU's on Google Cloud Platform and
subsequently the revenue of their cloud offerings.

------
juanmirocks
The Google AI courses are also good for old seasoned ML practitioners who want
to learn more about more recent deep learning techniques

------
ariwilson
Having done this course 6 months ago, this is a fantastic introduction to the
major concerns of practical machine learning.

------
Animats
Can't view. Requires a Google account.

~~~
Tepix
Have you tried to create one?

------
DiogoMCampos
How does this compare to the CS229 lectures by Andrew Ng? (the recorded
lectures, not the MOOC)

~~~
manav
CS229 @ Stanford is very math/proof intensive. This might be somewhat similar
to CS221 or the Coursera course.

------
noahha
serving videos from youtube without alternatives doesn't make it accessible.
proxying for identified videos esspecially videos from this crash course would
be useful.

~~~
Mashimo
>serving videos from youtube without alternatives doesn't make it accessible.

Why is that?

------
gcb0
this site is so broken on firefox mobile they should be embarrassed.

------
graycat
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 a minimum and a maximum
of f.

Can there be uncountably infinitely many alternative minima for the Google ML
problems? Yes, e.g., just enter one of the independent variables twice.

The second sentence is nonsense.

Grotesque, outrageous incompetence!!!!

It has long been known that minimizing a convex function, even a
differentiable convex function, with just gradient descent can be just
horribly inefficient. A LOT is known about how to do much better than just
gradient descent. E.g., there is Newton iteration (right, that Newton,
hundreds of years ago) and quasi-Newton. And there's more.

Why so inefficient? Well, draw a picture like Google did except use just two
independent variables instead of just the one in the Google picture. Then see
that the resulting, convex "bowl" can be like a long, narrow boat with a very
gentle slope in one direction and a very steep slope in an orthogonal
direction. Yes the cross section of the bowl can be, first cut, an ellipse
with one short axis and one long one. Sure, the axes are eigenvectors, etc.
and the ellipse is part of a local quadratic approximation. Well, gradient
descent keeps going back and forth nearly parallel to the short axis of the
ellipse and making nearly no progress on the long axis. People have known this
and known good things to do about it for, uh, at least half a century.

For the Google ML problems, might (1) tweak Newton iteration to improve the
rate of convergence to a minimum or (2) at each iteration don't get a gradient
descent but get a supporting hyperplane of the epigraph of the convex
function, as the iterations proceed, accumulate these hyperplanes, notice that
they lead to an approximation of the full epigraph, and use linear programming
or some tweak of that to minimize the hyperplane approximation to the convex
function -- there is much more that can be said here. By the way, the convex
function for that ML problem is quite special, e.g., quadratic.

A lot has long been known and well polished in regression and classification,
e.g., with TeX markup:

N.\ R.\ Draper and H.\ Smith, {\it Applied Regression Analysis,\/} John Wiley
and Sons, New York, 1968.\ \

Leo Breiman, Jerome H.\ Friedman, Richard A.\ Olshen, Charles J.\ Stone, {\it
Classification and Regression Trees,\/} ISBN 0-534-98054-6, Wadsworth \&
Brooks/Cole, Pacific Grove, California, 1984.\ \

C.\ Radhakrishna Rao, {\it Linear Statistical Inference and Its Applications:\
\ Second Edition,\/} ISBN 0-471-70823-2, John Wiley and Sons, New York, 1967.\
\

A good start on convexity is

Wendell H.\ Fleming, {\it Functions of Several Variables,\/} Addison-Wesley,
Reading, Massachusetts, 1965.\ \

Total, fun, dessert ice cream on convexity is Jensen's inequality; right away
can use it to prove a lot of classic inequalities.

Gee, look on the upside!!!! From this sample, the claims of machine learning
(ML) revolutionizing the economy are nonsense!!!! And for startups, don't much
have to worry about serious competition from Google!!!!

~~~
telchar
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.

~~~
tzs
It sounds like you are describing curves that are strictly convex. Curves that
are convex, but not strictly convex, can intersect their tangents at more than
one point, or even at every point.

I'm going by the definition of convex function given in Rudin's "Principles of
Mathematical Analysis", Apostol's "Calculus", Wikipedia, and MathWorld.

~~~
telchar
Fair enough. I suppose pointing out that the authors merely omitted "strictly"
wouldn't have served GP's point as well.

~~~
graycat
Strictly convex need have no role in this Google ML material. Just convex is
enough.

------
suyash
Is there something like this for Java programmers?

~~~
lovelearning
ML concepts are independent of programming language. I suggest not to let
language preferences stand in the way of listening to lectures and
understanding the subject.

For implementing exercises using Java, you have a bunch of good options:

1) The most direct equivalent to Pandas+Tensorflow I can think of is DL4J.
They have a good comprehensive set of concept and implementation tutorials
[1].

2) TF APIs have a Java port and can be used from java desktop and console
applications [2]. So a second but slightly more difficult option is using TF
Java port + Spark APIs.

[1]:
[https://deeplearning4j.org/documentation](https://deeplearning4j.org/documentation)

[2]:
[https://www.tensorflow.org/install/install_java](https://www.tensorflow.org/install/install_java)

------
neves
Which languages and libraries does it use? Is it based in Google libs, like
Tensor Flow?

~~~
otoburb
Clicking through to the homepage, the full title is: "Machine Learning Crash
Course with TensorFlow APIs".

------
earth2mars
They do have pre-reqs training material with reference links.
[https://developers.google.com/machine-learning/crash-
course/...](https://developers.google.com/machine-learning/crash-
course/prereqs-and-prework#prerequisites)

