You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pgml-docs/docs/user_guides/training/preprocessing.md
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ There are 3 steps to preprocessing data:
29
29
These preprocessing steps may be specified on a per-column basis to the[train()](/user_guides/training/overview/) function. By default, PostgresML does minimal preprocessing on training data, and will raise an error during analysis if NULL values are encountered without a preprocessor. All types other than`TEXT` are treated as quantitative variables and cast to floating point representations before passing them to the underlying algorithm implementations.
30
30
31
31
```postgresql title="pgml.train()"
32
-
select pgml.train(
32
+
SELECT pgml.train(
33
33
project_name => 'preprocessed_model',
34
34
task => 'classification',
35
35
relation_name => 'weather_data',
@@ -52,6 +52,14 @@ In some cases, it may make sense to use multiple steps for a single column. For
52
52
!!! note
53
53
TEXT is used in this document to also refer to VARCHAR and CHAR(N) types.
54
54
55
+
##Predicting with Preprocessors
56
+
57
+
A model that has been trained with preprocessors should use a Postgres tuple for prediction, rather than a`FLOAT4[]`. Tuples may contain multiple different types (like`TEXT` and`BIGINT`), while an ARRAY may only contain a single type. You can use parenthesis around values to create a Postgres tuple.