Skip to content

Applying Catboost model with text feature in Clickhouse #17713

@llfelicilda

Description

@llfelicilda

I wanted to integrate a CatBoost Classifier that accepts regular text as feature into ClickHouse and run the model inference from SQL. I followed necessary steps to load the model to clickhouse but when I ran the query for prediction:

select target,
       modelEvaluate('cat_model',
                     text)      AS prediction,
       1. / (1 + exp(-prediction)) AS probability
from test
limit 10;

I get this error:
Code: 36, e.displayText() = DB::Exception: Number of columns is different with number of features: 1 vs 0 + 0 (version 20.9.2.20 (official build))

This is how my test table looks like:
Screenshot 2020-12-02 at 3 18 51 PM

What's the right way to do it? Thanks.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions