> ## Content Index
> Fetch the complete content index at: https://bongholee.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Presto SQL 에서 회귀분석하기.
- URL: https://bongholee.com/presto-sql-eseo-hoegwibunseoghagi/
- Published: 2021-06-18T15:00:00.000Z
- Updated: 2022-04-23T02:53:47.000Z
- Author: Bongho Lee
- Tags: Data, SQL, #Import 2026-11-22 06:32

## Presto Version

- 0.241

## 선형회귀 기반 회귀계수 도출 방법

```sql
SELECT regr_intercept(y,x) intercept, regr_slope(y,x) slope
FROM (values (30,73),(20,50),(60,128),(80,170),(40,87),(50,108),(60,135),(30,69),(70,148),(60,132)) data(X,Y)
```

## SVM 기반 선형 에측

```sql
SELECT 
	regress(features(5), model_bh_210618) AS predicted_target 
FROM
( 
	SELECT learn_regressor(y,features(x)) as model_bh_210618
    FROM  (values (30,73),(20,50),(60,128),(80,170),(40,87),(50,108),(60,135),(30,69),(70,148),(60,132)) data(X,Y) 
) 
```