2019-05-24 22:41:33 +00:00
<test >
<name > linear_regression</name>
<type > loop</type>
<stop_conditions >
<any_of >
<average_speed_not_changing_for_ms > 3000</average_speed_not_changing_for_ms>
2019-05-27 20:14:23 +00:00
<total_time_ms > 10000</total_time_ms>
2019-05-24 22:41:33 +00:00
</any_of>
</stop_conditions>
2019-05-27 20:14:23 +00:00
<preconditions >
<table_exists > test.hits</table_exists>
</preconditions>
2019-05-24 22:41:33 +00:00
<main_metric >
<min_time />
</main_metric>
2019-05-27 20:14:23 +00:00
<create_query > CREATE TABLE test_model engine = Memory as select linearRegressionState(0.0001)(Age, Income, ParamPrice, Robotness, RefererHash) as state from test.hits</create_query>
2019-05-24 22:41:33 +00:00
2019-05-25 18:41:58 +00:00
<!-- Check model fit -->
2019-05-27 20:14:23 +00:00
<query > with (SELECT linearRegressionState(0.0001, 0, 15)(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) as model select toColumnTypeName(model)</query>
2019-05-24 22:41:33 +00:00
2019-05-27 20:14:23 +00:00
<!-- Check model fit with Momentum -->
<query > with (SELECT linearRegressionState(0.0001, 0, 15, 'Momentum')(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) as model select toColumnTypeName(model)</query>
2019-05-24 22:41:33 +00:00
2019-05-27 20:14:23 +00:00
<!-- Check model fit with Nesterov -->
<query > with (SELECT linearRegressionState(0.0001, 0, 15, 'Nesterov')(Age, Income, ParamPrice, Robotness, RefererHash) FROM test.hits) as model select toColumnTypeName(model)</query>
2019-05-24 22:41:33 +00:00
2019-05-25 18:41:58 +00:00
<!-- Check model predict -->
2019-05-27 20:14:23 +00:00
<query > with (SELECT state FROM test_model) as model select evalMLMethod(model, Income, ParamPrice, Robotness, RefererHash) from test.hits</query>
2019-05-24 22:41:33 +00:00
<drop_query > DROP TABLE IF EXISTS train_dataset</drop_query>
<drop_query > DROP TABLE IF EXISTS test_dataset</drop_query>
<drop_query > DROP TABLE IF EXISTS test_model</drop_query>
</test>