未验证 提交 f91fa4c6 编写于 作者: A alexey-milovidov 提交者: GitHub

Merge pull request #5457 from yandex/ml-method-tiny-fixes

Tiny fixes for ML methods.
......@@ -165,12 +165,10 @@ void LinearModelData::returnWeights(IColumn & to) const
= static_cast<ColumnFloat64 &>(arr_to.getData()).getData();
val_to.reserve(old_size + size);
size_t i = 0;
while (i < weights.size())
{
for (size_t i = 0; i + 1 < size; ++i)
val_to.push_back(weights[i]);
i++;
}
val_to.push_back(bias);
}
......
......@@ -47,6 +47,8 @@ public:
/// Get the result type.
virtual DataTypePtr getReturnType() const = 0;
/// Get type which will be used for prediction result in case if function is an ML method.
virtual DataTypePtr getReturnTypeToPredict() const
{
throw Exception("Prediction is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册