mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
37 lines
1.6 KiB
XML
37 lines
1.6 KiB
XML
<test>
|
|
<type>loop</type>
|
|
|
|
<stop_conditions>
|
|
<any_of>
|
|
<average_speed_not_changing_for_ms>3000</average_speed_not_changing_for_ms>
|
|
<total_time_ms>10000</total_time_ms>
|
|
</any_of>
|
|
</stop_conditions>
|
|
|
|
<preconditions>
|
|
<table_exists>test.hits</table_exists>
|
|
</preconditions>
|
|
|
|
<main_metric>
|
|
<min_time/>
|
|
</main_metric>
|
|
|
|
<create_query>DROP TABLE IF EXISTS test_model</create_query>
|
|
<create_query>CREATE TABLE test_model engine = Memory as select stochasticLinearRegressionState(0.0001)(Age, Income, ParamPrice, Robotness, RefererHash) as state from test.hits</create_query>
|
|
|
|
<!-- Check model fit-->
|
|
<query>WITH (SELECT stochasticLinearRegressionState(0.0001, 0, 15)(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) AS model SELECT 1</query>
|
|
<query>SELECT stochasticLinearRegression(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits</query>
|
|
|
|
<!-- Check model fit with Momentum-->
|
|
<query>WITH (SELECT stochasticLinearRegressionState(0.0001, 0, 15, 'Momentum')(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) AS model SELECT 1</query>
|
|
|
|
<!-- Check model fit with Nesterov-->
|
|
<query>WITH (SELECT stochasticLinearRegressionState(0.0001, 0, 15, 'Nesterov')(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) AS model SELECT 1</query>
|
|
|
|
<!-- Check model predict-->
|
|
<query>with (SELECT state FROM test_model) as model select evalMLMethod(model, Income, ParamPrice, Robotness, RefererHash) from test.hits</query>
|
|
|
|
<drop_query>DROP TABLE IF EXISTS test_model</drop_query>
|
|
</test>
|