Live data from Hacker News

You don't need ML/AI, you need SQL

cyberomin.github.io

71–80 of 87 posts

Re: You don't need ML/AI, you need SQL

#71

Earlier quoted context omitted.

Machine Learning is usually seeen as a magic black box by many people. So yes. There's a recent trend that seems to favor a machine learning first approach to solve very simple and mundane problems because people feel that they are missing some magic insight if they don't do it (FOMO). For example, the author refers to a shopping newsletter where you personalize suggestions for certain products after a customer buys…

Another fun thing is that you will learn a lot more about your customer base if you do the research and write those heuristics yourself, vs. having ML do them. A business that understands the behavior of its customers is much more competitive than one which delegates that understanding to a black box. I don't contend that ML has no valuable (even transformative) applications but it's not a substitute for personally u…

I don’t understand this at all. I’ve worked with a close to a hundred data scientists now and every one of them is an expert in the business problem they are trying to solve.

You can’t just throw an algorithm (even one like AutoML) at a problem and expect to be able to do magic with no knowledge of the domain. The technology simply doesn’t work like that.

Re: You don't need ML/AI, you need SQL

#72
post #14

Earlier quoted context omitted.

A correct machine learning solution for a non-trivial problem is very likely to have higher complexity than a traditional approach known to work. For a toy or hobby problem, all's fair, but for a business application the added complexity can have significant impact on cost, time to market, etc.

Well, I know I don't need to install GPUs on servers I install Postgres on, so there's that cost.

You don’t need GPUs for machine learning.

In fact the majority of tools in this space are exclusively CPU based.

Re: You don't need ML/AI, you need SQL

#73

sql is great but i am still waiting for the succesor to sql. sql was made for relational data. but a relational data with nested data structure kind of like postgres and jsonb built in mind from the ground up is what id really like to see.

kdb+ has a variant of SQL which is an evolution (not a revolution). The advances basically fall into three categories:

1. Shortcuts, such as "foreign key chasing" - i.e., if "a" int table x is a reference to field b in table y then "a.c" is "select c from x inner join y on (x.a=y.b)"; If you have a star schema, it cuts down queries and errors by 90% (and makes life simple for the optimizer). Of course, you can chase through as many tables as you wish in an expression, making item tables look a lot more like records.

2. Embracing order; The relational model has no ordering among tuples; SQL mostly pretends that's the case, but the order does emerge through "ORDER BY / TOP" and "ROWID" but not very usefully so. kdb+ embraces order and makes e.g. "first record that ..." very simple and intuitive (and also easier for the optimizer).

3. Embracing time series (not independent from embracing order) - when you have e.g. records with a "from .. to" validity range, it becomes exceedingly simple, as does "all records that are different from the previous one on this field".

Re: You don't need ML/AI, you need SQL

#74
post #52

Earlier quoted context omitted.

You're missing the point. Much of the "intelligence" that AI/ML is touted as solving could be accomplished through standard SQL queries on well normalized data. But no one will invest in a company because we have proper data structures and accurate SQL reports that we learn from.

That's been done for ages. The point of AI is to adapt to the world instead of having humans spend time understanding the problem set. SQL can apply a human understood model to data points. AI lets us develop new models and adapt them. AI lets us solve problems that have abstraction, or problems that change over time. You can't have SQL detect cats in an image or drive a car.

Cleaning the data, choosing the right ML algorithm, selecting the features, tuning the parameters, etc. ML also involves a lot of human time thinking to the problem.

Re: You don't need ML/AI, you need SQL

#75

> say a person bought a pair of shoe, sunglasses and a book. For their newsletter, we will show include shoes, sunglasses and books. This was a lot more relevant than sending random stuff. I agree with the general sentiment of the article, but this seems like a poor example, since a more sophisticated approach can add a lot of value to a recommendation system. How do you know whether a customer is likely to want more…

Recommend items that are bought together. Other customers who buy these sunglasses could be shown the shoe and the book.

It's a lot less stupid that recommending to buy the same item again and again.

Re: You don't need ML/AI, you need SQL

#76
The premise for this article is wrong!

The author describes using SQL to pull facts from history; who was the number one customer the last week, who abandoned online orders and so on.

The premise should instead be how to fit a model onto your business data so that you better can guess who will be the number one customer next week, what (s)he will order and so on.

The problem that ML addresses is how to arrive at that model, under the assumption that you can use historic data to pick either model or parameterise a model.

SQL has it merits, as does the relational database model, but this has nothing to do with creating models (even though we are modelling the data itself). The author gives some examples that are, frankly, trivial.

But he has a good argument around namedropping "hot" technology when your business need does not incorporate distributed trust (blockchain), modelling behaviour (or some such) using ML and so on.

Re: You don't need ML/AI, you need SQL

#77

> say a person bought a pair of shoe, sunglasses and a book. For their newsletter, we will show include shoes, sunglasses and books. This was a lot more relevant than sending random stuff. I agree with the general sentiment of the article, but this seems like a poor example, since a more sophisticated approach can add a lot of value to a recommendation system. How do you know whether a customer is likely to want more…

Obviously ML can add a lot of value here, but its questionable to me if its trivial to build such a model with available data, keep said model up to date, or train variations on it easily, cheaply and quickly enough to A/B test the result and ensure you’re actually making any tangible difference. So you know... I don’t think it’s unfair to say that for smaller vendors, the cost/effort of setting up a ML model may dwa…

All the big cloud providers are offering pre-trained models for currently popular AI/ML use cases, such as image labelling, face recognition etc. I think this will be the easiest way to apply AI/ML, combined with transfer learning so that the provider can pre-train the basic model and then provide a way for the customer to customize it further for a specific use case.

Of course this can also fail if the pre-trained generic models don't offer enough value and you end up having to develop your own models, but we'll see how it goes.

Btw, I've published a short Kindle book that aims to provide an overview of these pre-trained services currently available on various clouds, it can be found on Amazon by searching for AI ML Managed Services 2018. It attempts to save you the trouble of scanning through all the online documentation to find out what they do.

Re: You don't need ML/AI, you need SQL

#78
post #27

Or maybe you can do ML with SQL.... Postgres can do basic linear regression, I did this a couple of times for an analysis and found it pretty handy.

What? not having to choose either or, actually using good tools for the job, solving the problem instead of mindlessly following the hype? /s

Re: You don't need ML/AI, you need SQL

#79
post #31
post #10

But you don't gain ML/AI know-how by doing SQL, nor you discover previously unknown potential about your product buy sticking to your usual toolset. Not that I necessarily disagree with the OP but I find it deeply uninspirational. What's the difference between using ML/AI for problems traditionally solved by some other tool and using any other tool to solve the same problem unconventionally? Both can be "hacking". I…

I think the OP just meant that you can get a lot done with databases queries and a bit of automation. There's no need to call that ML/AI.

Something I hate about the business side of the tech world: the fad-chasing.

From the article:

> I hear these days for you to close that funding round quickly and early enough, you must throw in “Blockchain” even if it has no relevance in the grand scheme of things. A while ago, it was Machine learning and Artificial Intelligence.

Right on. No, blockchain won't help you with your corrupt voting system. If you don't understand the technology, you can't reason about its applicability, and there are more buzzword-chasers than serious technologists.

Re: You don't need ML/AI, you need SQL

#80

The premise for this article is wrong! The author describes using SQL to pull facts from history; who was the number one customer the last week, who abandoned online orders and so on. The premise should instead be how to fit a model onto your business data so that you better can guess who will be the number one customer next week, what (s)he will order and so on. The problem that ML addresses is how to arrive at that…

[deleted]
Post reply on HN