Home / Companies / ClickHouse / Blog / Post Details
Content Deep Dive

Linear Regression Using ClickHouse Machine Learning Functions

Blog post from ClickHouse

Post Details
Company
Date Published
Author
Ensemble
Word Count
1,514
Company Posts That Month
6
Language
English
Hacker News Points
-
Post removed?
No
Summary

This article demonstrates how to use a simple linear regression function within ClickHouse to predict delivery times based on two variables: distance of delivery and pickup hour. The dataset used is a subset of the last-mile delivery dataset by Hugging Face, containing 2,293 orders delivered by a single courier in Jilin, China. The model takes into account both distance and pickup hour as input variables, with the goal of predicting the time elapsed between pickup and delivery. The article showcases how to prepare the data, train the model using ClickHouse's stochasticLinearRegression function, evaluate its performance, and visualize the results. The model performs reasonably well for shorter distances but begins to break down for longer journeys. Despite this, it shows some predictive capability and may perform better in other datasets and domains.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
AI Guardrails 1 44 24 15 -71%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.