As someone who works with a lot of people new to machine learning, I appreciate guides like this. I especially like the early slides that help frame AI vs ML vs DL so that people can have a realistic understanding of what these technologies are for.
For my part, one of the biggest realization I had after many years of applying machine learning was that I got too caught up in the machine learning algorithms themselves. I was often way too eager to guess and check across different algorithms and parameters in search of higher accuracy. Fortunately, there are new automated tools today that can do that automatically.
However, the key piece of advice I'd give someone new to machine learning is not to get caught up in the different machine learning techniques (SVM vs random forrest vs neural network, etc). Instead (1) spend more time on translating your problem into terms a machine can understand (i.e how are you defining and generating your labels) and (2) how do you perform feature engineering so the the right variables are available for machine learning to use. Focusing on these two things helped me build more accurate models that were more likely to be deployed in the real world.
Feature engineering in particular has become a bit of a passion of mine since that realization. I currently work on an open source project called Featuretools (https://github.com/featuretools/featuretools/) that aims help people apply feature engineering to transactional or relational datasets. We just put out a tutorial on building models to predict what product a customer will buy next, which is a good hands on example to learn from https://github.com/featuretools/predict_next_purchase for beginners.
Don't you think people are, sometimes, just applying ML to their problem "because of hype" ?
One example I have in mind, was a contest where participants were given a series of satellite pictures and asked to write a classifier to detect icebergs and cargo ships (the two are quite similar). As someone else pointed out, trying to use classical computer vision and machine learning on these images will always have some error rate during identification. However, if we were able to extract speed and trajectory of all objects in the picture and mixing them with AIS data, finding which ones are ships, which ones are giant pieces of ice, and which one are non-moving structures to be avoided, becomes easy.
So, you have to choose between a black box that will give you potential results with a given error-rate, and a predictable algorithm that anyone can audit. Seems like a no-brainer situation to me. For what other reason would you choose the first solution, except hype-related decisions ?
Your comparison seems like a false dichotomy, and I think you are agreeing with OP. OP says, spend less time worrying about the algorithm and more time worrying about what data you are feeding the algorithm. You are saying, what if you had to choose between dataset A with algorithm A and dataset B with algorithm B.
You claim, (probably correctly) that dataset B, which includes velocity and trajectory, is more correct for the problem at hand, and given dataset B, I would suggest that either algorithm A or B would probably do just fine.
You also claim that algorithm A has "some error rate during identification." But so will algorithm B, and so will either algorithm on dataset A and B!
The question you should ask is, how much do I care about "black box" vs. "white box", and is there are trade-off? If the black-box solution (algorithm A, the "ML" solution) gives you 10% higher accuracy, and that accuracy is going to save lives, you bet I'd choose it. Or maybe I decide that interpretability is really important due to external audit reasons, so I need the white-box solution. But maybe I'd choose both, the interpretable one, and use the uninterpretable one as a flag for "a human should look at this." Or maybe I'd combine the results of both algorithms to get even higher accuracy.
There are just so many ways to configure a solution to the problem you propose, and you are only distinguishing between two of them. In the end the appropriate choice depends on context.
The thing is if you know exactly what you are looking for, like in your example, or a QR code, or a barcode, it makes sense to tailor an algorithm. But you may not want to have to maintain a complex algorithm every time a small change happens (say new kind of ships appear). Or you might want a generic approach (recognise any objects, including objects that did not even exist at the time the code is written, but will appear in the data). In such case I can see ML being a good choice.
> I especially like the early slides that help frame AI vs ML vs DL so that people can have a realistic understanding of what these technologies are for.
But they're wrong! I read "Deep learning drives machine learning which drives artificial intelligence." This is very wrong. I stopped reading.
If endocrinology was the most talked-about, hyped, and invested-in form of medicine I think it would be fair. DL is where an enormous amount of AI growth and progress is.
hyped things are made hype from a belief that it can be 'done' therefore invested in, but that can be done in one part of ML, which doesn't give any reason to say it generates all intelligence for a machine for human tasks.
My understanding is that Deep Learning is a type of Machine Learning. Artificial Intelligence is the idea that a machine performs similarly or better than a human for a specific task. Artificial General Intelligence is when a machine performs similarly to a human in many different kinds of tasks.
Really thanks for this.
I've recently dived into ML & DL and have slowly but surely realized the importance of feature engineering(FE).
Though I've taken a few MOOCs, I haven't found one that truly focuses on FE and still looking.
For sure, usually the algorithms aren't the interesting part, but rather how you frame the problem and most importantly what data you have.
I wish I could say I was passionate about feature engineering. I enjoy where deep learning is heading right now - where that kind of finicky, more-art-than-science approach becomes unnecessary, and the model does a better job detecting features than humans.
Additionally, my company (link in profile) builds a commercial product to help people define and iterate on prediction problems in a structured way based off of the ideas in that paper.
You need a good random sample and lots of manpower to manually label them. Mechanical Turk [0] is one place to go for that man power if you don't have a "grunt work" team and are not willing to spend a few days doing it yourself.
There are also some methodologies out there that can help you label data sets more efficiently. I don't often see them used, but they exist. Look up "active learning" and "semi-supervised learning".
There were some folks in this area targeting generating annotation tools of various kinds. I believe the focus was on something reducible to a web interface but if you can label things going that route check it out https://en.wikipedia.org/wiki/CrowdFlower
One very old tool for such things was called "stepwise regression". IIRC J. Tukey was partially involved in that. It appears that the AI/ML work is close to the regression and curve fitting going back strongly to the early days of computers in the 1960s and a lot in the social sciences back to the 1940s and even about 1900.
A lot is known. E.g., there's the now classic Draper and Smith, Applied Regression Analysis. Software IBM Scientific Subroutine Package (SSP), SPSS (Statistical Package for the Social Sciences), SAS (Statistical Analysis System), etc. does the arithmetic for texts such as Draper and Smith. For some decades some of the best users of such applied math were the empirical macro economic model builders. E.g., once at a hearing in Congress I heard a guy, IIRC, Adams talking about that.
Lesson: If are going to do curve fitting for model building, then a lot is known. Maybe what is new is working with millions of independent variables and trillions of bytes of data. But it stands to reason that there will also be problems with 1, 2, 1 dozen, 2 dozen variables and some thousands or millions of bytes of data, and people have been doing a lot of work like that for over half a century. Sometimes they did good work. If want to do model building on that more modest and common scale, my guess is that should look mostly at the old very well done work. Here is just a really short sampling of some of that old work:
Stephen E. Fienberg,
The Analysis of Cross-Classified Data,
ISBN 0-262-06063-9,
MIT Press,
Cambridge, Massachusetts,
1979.
Yvonne M. M. Bishop,
Stephen E. Fienberg,
Paul W. Holland,
Discrete Multivariate Analysis:
Theory and Practice,
ISBN 0-262-52040-0,
MIT Press,
Cambridge, Massachusetts,
1979.
Shelby J. Haberman,
Analysis of Qualitative Data,
Volume 1,
Introductory Topics,
ISBN 0-12-312501-4,
Academic-Press,
1978.
Shelby J. Haberman,
Analysis of Qualitative Data,
Volume 2,
New Developments,
ISBN 0-12-312502-2,
Academic-Press,
1979.
Henry Scheffe,
Analysis of Variance,
John Wiley and Sons,
New York,
1967.
C. Radhakrishna Rao,
Linear Statistical Inference and
Its Applications:
Second Edition,
ISBN 0-471-70823-2,
John Wiley and Sons,
New York,
1967.
N. R. Draper and
H. Smith,
Applied Regression Analysis,
John Wiley and Sons,
New York,
1968.
Leo Breiman,
Jerome H. Friedman,
Richard A. Olshen,
Charles J. Stone,
Classification and Regression Trees,
ISBN 0-534-98054-6,
Wadsworth & Brooks/Cole,
Pacific Grove, California,
1984.
There is a lesson about curve fitting: There was the ancient Greek Ptolemy who took data on the motions of the planets and fitted circles and circles inside circles, etc. and supposedly, except for some use of Kelly's Variable Constant and Finkel's Fudge Factor, got good fits. The problem, his circles had next to nothing to do with planetary motion; instead, that's based on ellipses and that was from more observations, Kepler, and Newton. Lesson: Empirical curve fitting is not the only approach.
Actually the more mathematical
statistics texts, e.g, the ones with theorems and proofs, say, "We KNOW that our system is linear and has just these variables and we KNOW about the statistical properties of our data, e.g., Gaussian errors, independent and identically distributed, and ALL we want to do is just get some good estimates of the coefficients with confidence intervals and t-tests and confidence intervals on predicted values. Then, can go through all that statistics and see how to do that. But notice the assumptions at the beginning: We KNOW the system is linear, etc. and are ONLY trying to estimate the coefficients that we KNOW exist. That's long been a bit distant from practice and is apparently still farther from current ML practice.
Okay, ML for image processing. Okay. I am unsure about how much image processing there is to do where there is enough good data for the ML techniques to do well.
Generally there is much, much more to what can be done with applied math, applied probability, and statistics than curve fitting. My view is that the real opportunities are in this much larger area and not in the recent comparatively small area of ML.
E.g., my startup has some original work in applied probability. Some of that work does some things some people in statistics said could not be done. No, it's doable: But it's not in the books. What is in the books is asking too much from my data. So, the books are trying for too much, and with my data that's impossible. But I'm asking for less than is in the books, and that is possible and from my data. I can't go into details in public, but my lesson is this:
There a lot in applied math and applications that is really powerful and not currently popular, canned, etc.
My view is that currently there is a lot
of content on the Internet and the total
is growing quickly. So, there is a need
-- people finding what content they will
like for each of their interests.
My view is that current means
for this need do well on (rough ballpark
guesstimate) about 1/3rd of the content,
searches people want to do, and results
they want to find. My work is for the
"safe for work" parts of the other 2/3rds.
The user interface is really simple; the
user experience should be fun, engaging,
and rewarding. The user interface, data
used, etc. are all very different from
anything else I know about.
The crucial, enabling core of the work,
the "how to do that", the "secret sauce",
is some applied math I derived. It's fair
to say that I used some advanced pure math
prerequisites.
To the users, my solution is just a Web
site. I wrote the code in Microsoft's
Visual Basic .NET 4.0 using ASP.NET for
the Web pages and ADO.NET for the use of
SQL Server.
The monetization is just from ads, at
first with relatively good user
demographics and later with my own ad
targeting math.
The Web pages are elementary HTML and CSS.
I wrote no JavaScript, but Microsoft's
ASP.NET wrote a little for me, maybe for
some cursor positioning or some such.
The Web pages should look fine on anything
from a smart phone to a high end work
station. The pages should be usable in a
window as narrow as 300 pixels. For
smaller screens, the pages have both
horizontal and vertical scroll bars. The
layout is simple, just from HTML tables
and with no DIV elements. The fonts are
comparatively large. The contrast is
high. There are no icons, pull-downs,
pop-ups, roll-overs, overlays, etc. Only
simple HTML links and controls are used.
Users don't log in. There is no use of
cookies. Users are essentially anonymous
and have some of the best privacy. For
the user to enable JavaScript in their Web
browser is optional; the site works fine
without JavaScript -- without JavaScript
maybe sometimes users will have to use
their pointing device to position the
cursor.
There is some code for off-line "batch"
processing of some of the data. The code
for the on-line work is about 24,000
programming language statements in about
100,000 lines of typing. I typed in all
the code with just my favorite text editor
KEdit.
There is a little C code, and otherwise
all the code is in Microsoft's Visual
Basic .NET. This is not the old Visual
Basic 6 or some such (which I never used)
and, instead, is the newer Visual Basic
part of .NET. This newer version appears
to be just a particular flavor of
syntactic sugar and otherwise as good a
way as any to use the .NET classes and the
common language runtime (CLR), that is,
essentially equivalent to C#.
The code appears to run as intended. The
code should have more testing, but so far
I know of no bugs. I intend alpha testing
soon and then a lot of beta testing
announced on Hacker News, AVC.COM, and
Twitter.
For the server farm architecture, there
is a Web server, a Web session state
server, SQL Server, and two servers for
the core applied math and search.
I wrote the session state server using
just TCP/IP socket communications sending
and receiving byte arrays containing
serialized object instances. The core
work of the Web session state server is
from two instances of a standard Microsoft
.NET collection class, hopefully based on
AVL or red-black balanced binary trees or
something equally good.
The Web servers do not have user
affinity: That is, when a user does an
HTTP POST back to the server farm, any of
many parallel Web servers can receive and
process the POST. So, the Web servers are
easily scalable. IIRC, Cisco has a box
that will do load leveling of such
parallel Web servers. Of course, with the
Windows software stack, the Web servers
use Microsoft's Internet Information
Server (IIS). Then IIS starts and runs my
Visual Basic .NET code.
Of course the reason for this lack of user
affinity and easy scalability is the
session state server I wrote. For easy
scalability, it would be easy to run
hundreds of such servers in parallel.
I have a few code changes in mind. One of
them is to replace the Windows facilities
for system logs with my own log server.
For that, I'll just start with my code
for the session state server and
essentially just replace the use of the
collection class instances with a simple
file write statement.
I wrote no prototype code. I wrote no
code intended as only for a "minimum
viable product". So far I see no need to
refactor the code.
The code is awash in internal comments.
For more comments, some long and deep,
external to the code, often there are tree
names in the code to the external
comments, and then one keystroke with my
favorite editor displays the external
comments. I have about 6000 files of
Windows documentation, mostly from MSDN,
and most of the tree names in the comments
are to the HTML files of that
documentation.
I have a little macro that inserts
time-date stamp comments in the code,
e.g.,
Modified at 23:19:07 on Thursday, December 14th, 2017.
and I have some simple editor macros that
let those comment lines serve as keys in
cross references. That helps.
The code I have is intended for production
up to maybe 20 users a second.
For another factor of 10 or 20, there will
have to be some tweaks in some parts of
the code for more scaling, but some of
that scaling functionality is in the code
now.
For some of the data, a solid state drive
(SSD), written maybe once a week and
otherwise essentially read-only, many
thousands of times a day, would do wonders
for users served per second. Several of
the recent 14 TB SSDs could be the core
hardware for a significant business.
Current work is sad -- system management
mud wrestling with apparently an unstable
motherboard. At some effort, I finally
got what appears to be a good backup of
all the files to an external hard disk
with a USB interface. So, that work is
safe.
Now I'm about to plug together another
computer for the rest of the development,
gathering data, etc.
I'm thinking of a last generation
approach, AMD FX series processor, DDR3
ECC main memory, SATA hard disks, USB
ports for DVD, etc., Windows 7
Professional 64 bit, Windows Server, IIS,
and SQL Server.
I want my next side project to use machine learning. Not sure what to do though. Thanks for posting your project. I'll be checking it out. Feature engineering sounds interesting.
Deep Learning frees you from the need to do "feature engineering" and usually works much better than methods which require such process. I'd instead recommend everyone to "dive deep" into deep learning and once they master it, get acquainted with classical methods that still might get used here and there. I understand it's difficult to let go of what you worked very hard to understand when you were studying ML, but such is life, "sunk cost fallacy" should not you blind from seeing 95% success rate of DL while observing paltry 60% success rate with SVM/HMM on the same problem. Just let it go.
This might be true for CV and speech recognition and synthesis, but there are huge categories of problems (dare I say, the majority of industry use of ML) that are either working with time series data (which DL hasn’t had great success with) or must be highly explainable and tunable.
I both make most of my money from time series data and use deep learning and work with data with no labels. Here's a recent presentation I did on some of this work and a companion presentation I encourage people to read on how to use this effectively in production.
While you are right that some feature engineering is needed, there's no reason DL can't be a part of your workflow.
> While you are right that some feature engineering is needed, there's no reason DL can't be a part of your workflow.
I (and, I believe, the earlier poster, too) never implied you can't use deep learning on such examples. What we (I think, both) were referring to was the claim that it would absolve you from feature engineering. (Which I understand you also refute.)
> For more of the basics, my book on deep learning might help as well
Congratulations on your book, I know how much hard work that is!
Disclaimer: I make money with deep learning, too... ;-)
A lot of people make money with deep learning with images ;).
I guess what I wanted to do was add a bit of nuance. It can help reduce the amount of feature engineering needed. Of course you still need a baseline representation though. More feature engineering also doesn't hurt. I always think of deep learning in the time series context as a neat SVM kernel with some compression built in. With the right tuning it can give you a better representation which you can use with clustering and whatever else you'd like.
I work with language, not images. There, clever feature engineering isn't just better, it's essential to get anything that is production worthy. In fact, it will even be embedded in some expert system process if your system needs to understand very complex relationships. AI around the corner my ass... :-)
Agreed :). Workflow matters a lot more than the hype Sandhill road and google's marketing team are perpetuating. Good on you for making it work in the real world for something outside of vision/speech!
Do you have an opinion on the fast.ai and deeplearning.ai courses?
I finally have some time to work through these and since the deeplearning.ai series starts on December 18th, I'm wondering which one to dive into since I can't tell from the outside how they compare.
While I agree with others that more is better, if you can take only one course, I strongly recommend taking Andrew Ng's. While it is true that you don't need to be able to design and understand 'nets from scratch to be able to use them, I agree with most of the brightest minds in DL that you won't get too far if you don't at least have an intuition for the math behind it. And Ng's course really only gives you that - an intuition. It does an excellent job at ensuring participants understand the bare minimum to do any kind of serious work. Learning ${your favorite framework}'s API will be a breeze if you understand the "why" already.
I would take both. deeplearning.ai focuses more on math fundamentals, fast.ai takes a more coding oriented approach. It also has 2 classes: a beginner and advanced one. I personally prefer the fast.ai approach.
Add Udacity's DLF ND to the mix and do all 3 of them, they are all a bit different. Udacity's one has the inventor of GANs doing lectures there, so it's pretty top notch as well.
For my part, one of the biggest realization I had after many years of applying machine learning was that I got too caught up in the machine learning algorithms themselves. I was often way too eager to guess and check across different algorithms and parameters in search of higher accuracy. Fortunately, there are new automated tools today that can do that automatically.
However, the key piece of advice I'd give someone new to machine learning is not to get caught up in the different machine learning techniques (SVM vs random forrest vs neural network, etc). Instead (1) spend more time on translating your problem into terms a machine can understand (i.e how are you defining and generating your labels) and (2) how do you perform feature engineering so the the right variables are available for machine learning to use. Focusing on these two things helped me build more accurate models that were more likely to be deployed in the real world.
Feature engineering in particular has become a bit of a passion of mine since that realization. I currently work on an open source project called Featuretools (https://github.com/featuretools/featuretools/) that aims help people apply feature engineering to transactional or relational datasets. We just put out a tutorial on building models to predict what product a customer will buy next, which is a good hands on example to learn from https://github.com/featuretools/predict_next_purchase for beginners.