CSV → ClickHouse (RAW) → dbt (Staging → Intermediate → Marts) → ML-модельwith secondary_market as (
select listing_id, 'secondary' as listing_type, ...
from {{ ref('stg_secondary_market') }}
),
rentals as (
select listing_id, 'rental' as listing_type, ...
from {{ ref('stg_rentals') }}
)
select * from secondary_market
union all
select * from rentalscase
when metro_distance_min <= 15 and metro_distance_type = 'transport'
then 'walk_<15min'
when metro_distance_min <= 30 and metro_distance_type = 'transport'
then 'walk_15-30min'
else 'by_car'
end as metro_accessibilityfrom sklearn.ensemble import RandomForestRegressor
model = RandomForestRegressor(n_estimators=100, max_depth=15)
model.fit(X_train, y_train)
# R² на тесте: 0.85
# Важность признаков: to_center_km — 60.7%