v.25.11New Feature

naiveBayesClassifier Function

Add naiveBayesClassifier function to classify text using Naive Bayes based on ngrams. #88677 (Nihal Z. Miaji).
Introduces the naiveBayesClassifier function to classify text data using a Naive Bayes algorithm based on ngrams.

Why it matters

This feature enables users to perform text classification directly within ClickHouse using a probabilistic Naive Bayes approach with ngram analysis. It solves the need for efficient, scalable in-database text classification, reducing the requirement to export data for external processing and thereby improving workflow speed and simplicity.

How to use it

Use the naiveBayesClassifier function in your SQL queries by supplying the input text and the trained ngram-based Naive Bayes model parameters. This allows classification tasks to be integrated directly into ClickHouse queries and pipelines.