Pandas AI

Pandas AI is an interesting and somewhat natural direction for embedding large language models into data science/analytics. This is less of a black box than automated exploratory data analysis tools, but still makes things easier.

We will likely see more ideas like Gabriele Venturi‘s here. For any serious project, though, we’ll still need skilled humans who can understand how the algorithm is responding to queries, and can check and confirm that it’s responding as expected.

Source

Experimental data analysis and the importance of conceptual models

In this new post, Duygu Dagli and I took a quick look at the analysis of experimental data. I really enjoyed writing this piece because Lord’s revelation is one of my favorites (pardon the pun).

Lord’s paradox is related to the better known Simpson’s paradox and it highlights the importance of constructing the right conceptual model before moving on to modeling the data. In the post, I speculated about one potential conceptual model and discussed its implications for modeling the data at hand.

Frankly, the example in the post had much to unpack. I just picked up on the part that relates to causal models and Lord’s paradox. I also ended up touching on an interesting discussion around the use of diff-in-diff vs. lagged regression models.

After running an experiment, how do you estimate the average treatment effect (ATE)? Which model do you choose to use? In this post, we use five different models with different assumptions to answer the same question. We find five different ATEs… Which one is the correct average treatment effect in this experiment? How do we decide?

In this post, Gorkem Turgut Ozer and I explore these questions (and more) by discussing the differences across models and potential implications. We ended up covering an interesting paradox I enjoyed learning about!

To me, a main takeaway is, business value from data is maximized when the right conceptual model meets the right method. For this to happen more often, data science and pricing leaders need the technical skills to be able to ask the right questions. They also need to build a trusting relationship with their teams to delegate and learn from them.

Source

Human learner vs. ChatGPT in taking tests designed for humans

Across the board, ChatGPT is passing exams by answering a mix of short-answer, essay, and multiple choice questions:

– U.S. medical licensing exam (says the attached study)
– Wharton School MBA exam on Operations Management
– University of Minnesota Law School exams in Constitutional Law, Employee Benefits, Taxation, and Torts

If ChatGPT is able to pass these exams, it is not because ChatGPT is revolutionary (while it is surely impressive) but because they are just bad exams. These exams must be lacking enough components that require some form of creative thinking and use of imagination.

Source

ChatGPT excitement

What is demonstrated here is a successful translation from human language to code. OpenAI has another project for this purpose: Codex. Microsoft’s GitHub Copilot serves as a specialized version (both are descendents of GPT-3). DeepMind’s AlphaCode and the open source PolyCoder also target English to code translation.

What is missing (and provided by Marco) is the articulation of a solution that stems from a conceptual model, which in turn, is informed by causal links. For example: diversification reduces asset-specific risk.

Unless ChatGPT reasonably limits the weights of each individual stock based only on the objective at the beginning (minimize SD) without being explicitly instructed, we’d better curb our enthusiasm here.

Source

Just tried out ChatGPT…

Just tried out ChatGPT, the new large language model trained by OpenAI, and I was blown away by its capabilities! It can generate human-like text responses to any prompt, making it a powerful tool for conversation simulation, language translation, and more.

I also had a chance to play around with the code, and it’s surprisingly simple to use. Here’s a quick example of how to generate a response from ChatGPT using the Python API:

Not bad but a bit too excited (blown away, really?). Also the shameless self-promotion using my voice without any disclosure. We’re not off to a good, trusting relationship.

“Life’s most important questions are, for the most part, nothing but probability problems.”

Pierre-Simon Laplace in Théorie Analytique Des Probabilités

We need more decision / data scientists to ask “What is the probability of sun rising tomorrow?” yet we don’t seem to put a strong emphasis on probability theory for several reasons.

Probability is not thoroughly covered (ideally as a standalone course) in most data science / business analytics programs. In predictive analytics, common packages/libraries for ensemble methods focus on classifications, almost hiding the probability calculations (which are distorted in some anyway). Most frequentist reporting are limited to point estimates and errors, again hiding the underlying probabilistic assumptions. Et Cetera.

In search of a short reading to share with my students, I’ve come across a recent book (updated in May, 2022) by Dirk P. Kroese, Zdravko Botev, Thomas Taimre, Radislav (Slava) Vaisman Ph.D. The book is open access and the appendices serve as a nice refresher. Appendix C is a little primer on probability for example.

Source

Have you heard of a synthetic control method but you’re not exactly sure what it is and what kind of problems it may help solve?

In this latest collaboration with Duygu Dagli, we shed some light on it and soon other topics. We plan to bridge conceptual and applied takes on statistical modeling and machine learning methods and the business problems they may help solve. We’ll likely touch on causal inference, predictive analytics, and how firms can organize to be more data centric. Check it out and stay tuned for the upcoming pieces on experiments and the analysis of experimental data.

Source

Overcorrecting the overcorrected

Jeremy Siegel almost loses it here for good reason. The Federal Reserve Board called it transitory inflation when prices were skyrocketing last Fall. When the same Fed (except a couple members) now argues that inflation is not yet slowing at a reasonable pace despite the price contractions recent data shows, questions arise. Fed gives the impression that it is now overcorrecting what it overcorrected earlier by loosening the monetary policy too much and for too long.

In case after case, our data modeling and inference practices are tested against lags in data. Lack of a high predictive power, we resort to overcorrections. Overcorrecting is doing more than enough (vs. not doing enough) and sounds better than coming short. But then, the pendulum swings back a little harder.

What do we learn from such swings? Well, one rather obvious takeaway is to put more emphasis on correctly understanding and modeling lags in time series. Another one is to be content with coming short occasionally, especially when the cost of overcorrecting is much higher than the cost of coming short.

Source

Killing fish the right way using computer vision

The commercial refrigerator/shelf looking device in the picture is an ikejime machine. Ikejime is considered the fastest and most humane method of killing fish. The method also leads to the best taste of fish because fish are killed instantly before their bodies go into distress and produce lactic acid and ammonia into their muscles. Ikejime involves the insertion of a spike quickly and directly into the hindbrain, causing immediate brain death.

That is, if fishermen know where the hindbrain exactly is for each species, and can insert the spike quickly and precisely within minutes of catching a fish, and have time to do so repeatedly. Well, that’s what robots are for.

Shinkei Systems’ machine is a combination of hardware and an edge detection algorithm, the engine behind object recognition in convolutional neural networks. Challenges abound. The machine operates on a fishing boat that tilts around even at zero speed. Apparently, “even in the same species, even with the same contour, the brain can be in a different location” as well.

Working with fishermen in Maine, New Hampshire and Cape Cod, Shinkei Systems seems to have been accomplishing the task on fresh-caught fish at a rate of one every 10-15 seconds. Moving forward, accuracy should increase and time to complete the task should decrease, leading to further opportunities.

Source

BLOOM, the first truly open-science, open-access, and multilingual large language model

“We wanted to make sure people with proximity to the data, their country, the language they speak, had a hand in choosing what language came into the model’s training,” says Jernite.

BLOOM, the first truly open-science, open-access, and multilingual (46 languages) large language model with 176B parameters (slightly larger than GPT-3) will soon be released as a complete pretrained model. Behind the project is BigScience, a wide-scale collaboration of over 1,000 researchers.

The project is quite impressive overall, both for the extent of collaboration and outcome. It’s also an engineering delight to watch. The model has been trained using 384 A100 GPUs (with 80 GB of memory each) since March 11, 2022.

BigScience provides updates on training every day (having hit its initial target earlier than planned, the model is currently being trained for “a few more days”). See the links in the comments to follow the updates and download the model. The full model will be released on HuggingFace (also a partner of the project).

This is a significant step forward for at least two reasons: the way the training data was collected and the core values behind the initiative. BigScience seems to have prioritized data quality by hand crafting the training data. In a world of models that favor kitchen sink approaches (because they can!), this is a progress. More obviously, BLOOM paves the way for a true democratization by removing the strings that have been attached to the use of such models by OpenScience, Google, and Facebook (apply for API access, accredited researcher only etc.).

Source