Live data from Hacker News

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

cyberomin.github.io

41–50 of 87 posts

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

#41
post #6

Maybe I'm niave, but are there really people who want to hop on the AI bandwagon just to do mundane lookups like this? When I worked with machine learning many years ago, we learned that it was no better than the heuristics already in place. The thing is, it's much easier to diagnose a well written and understood heuristic than a machine learning model.

People mentioned resume building and FOMO, I'll add to this: funding and sales. Investors and corporate managers are into this hype as much as engineers - if not more, so AI/ML is a label people want to use to get more money.

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

#42

> 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…

> but this seems like a poor example

In fact this is a perfect example of how NOT to do purchase-history-based suggestions, which unfortunately also seems to be how most companies do it. They see a big purchase (or search terms relating to one) and spam you with options for that purchase. But if I just bought a car, or a drone, or a laptop, then the last thing I want to see is ads for other cars or drones or laptops.

Even applying just a little intelligence and showing ads for accessories (floor mats? spare batteries? bluetooth mice?) would make things substantially more useful.

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

#43

> 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…

Speaking of their examples, and given they send promotional letters not too frequently, I'm sure there are many people around me who will buy many sunglasses, shoes, or clothes for different styles. I just don't want to be advertised toaster and bathroom stuffs together. IMO you have to do research on items those can be matched together for each group of users.

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

#44
Good post, but I couldn't disagree more. Regardless of your business size, it will always be valuable to know information such as:

* How does every additional coupon-dollar affect the total amount a customer buys?

* What is the relationship between customer age and retention for my store?

* Does giving a customer more purchase options help or hurt their chances of making a purchase?

My experience is that each of these questions can be solved, in part, using 3 lines of Python code:

    from sklearn.linear_model import LinearRegression
    lr = LinearRegression()
    lr.fit(X,y)
Then look at the beta coefficients of the model, and you have a rough idea of how different features are correlated. Doing something like this in SQL sounds difficult. If you have data to interpret, it makes sense to use similar methods. I can't think of an example where you have data but refuse to look at it until your company is "bigger".

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

#45
post #6

Maybe I'm niave, but are there really people who want to hop on the AI bandwagon just to do mundane lookups like this? When I worked with machine learning many years ago, we learned that it was no better than the heuristics already in place. The thing is, it's much easier to diagnose a well written and understood heuristic than a machine learning model.

They are, and they are getting VC funds to do it. They may just be on the bandwagon to get the funding, but they still need to 'do AI' in order to satisfy their investors.

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

#46
post #6

Maybe I'm niave, but are there really people who want to hop on the AI bandwagon just to do mundane lookups like this? When I worked with machine learning many years ago, we learned that it was no better than the heuristics already in place. The thing is, it's much easier to diagnose a well written and understood heuristic than a machine learning model.

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

The comment lists at least two "questions" that can be answered easily with SQL and a graph and even in ways that give more nuance than linear regression can capture.

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

#47
post #6

Maybe I'm niave, but are there really people who want to hop on the AI bandwagon just to do mundane lookups like this? When I worked with machine learning many years ago, we learned that it was no better than the heuristics already in place. The thing is, it's much easier to diagnose a well written and understood heuristic than a machine learning model.

People mentioned resume building and FOMO, I'll add to this: funding and sales. Investors and corporate managers are into this hype as much as engineers - if not more, so AI/ML is a label people want to use to get more money.

Yeah, I think in most cases if an organization says they are doing AI then their user base is probably rather unsophisticated in regards to tech.

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

#48

Good post, but I couldn't disagree more. Regardless of your business size, it will always be valuable to know information such as: * How does every additional coupon-dollar affect the total amount a customer buys? * What is the relationship between customer age and retention for my store? * Does giving a customer more purchase options help or hurt their chances of making a purchase? My experience is that each of thes…

I overall agree that ML is needed over 'just SQL' in a lot of cases (though SQL + good visualizations / exploratory analysis can answer a lot of those questions qualitatively). I would also be careful with the linear model approach. Multicollinearity can hide how important a feature is (or reverse sign of a feature) when trying to use coefficients to interpret importance, so using a linear model like that isn't as straightforward as it seems.

As a workaround, you could look for high VIF to detection multicollinearity, use some sort of stepwise selection / penalized regression, or use something like relaimpo (https://cran.r-project.org/web/packages/relaimpo/index.html) - not sure of a Python equivalent - to judge overall feature importance in the model.

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

#49

I like to think I'm not too nitpicky about fonts, but that st ligature is incredibly distracting. It's the second article I've seen here that uses it over the last few days, but I'm not sure if it's the same site or not.

In the modern age Latin script, the only acceptable ligature is "fi" in a proportional type, because the top curve of the F usually comes very close to the dot of the I already. For the rest, they're totally useless because we don't use moveable type anymore.

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

#50

> 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 dwarf the fractional improvement it offers over just having one person doing human generated SQL queries.

The point is this isn’t like machine vision or voice, where its almost expontentionally better than traditional approaches.

It’s just... a bit better. Which is worth it only if the fractional improvement pays for the setup cost.

Post reply on HN