File tree Expand file tree Collapse file tree 1 file changed +2
-23
lines changed
pgml-cms/docs/api/sql-extension Expand file tree Collapse file tree 1 file changed +2
-23
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,7 @@ description: Decompose an input vector into it's principal components
44
55# pgml.decompose()
66
7-
8- Chunks are pieces of documents split using some specified splitter. This is typically done before embedding.
7+ Matrix decomposition reduces the number of dimensions in a vector, to improve relevance and reduce computation required.
98
109## API
1110
@@ -21,30 +20,10 @@ pgml.decompose(
2120| Parameter | Example | Description |
2221| ----------------| ---------------------------------| ----------------------------------------------------------|
2322| ` project_name ` | ` 'My First PostgresML Project' ` | The project name used to train models in ` pgml.train() ` . |
24- | ` vector ` | ` ARRAY[0.1, 0.45, 1.0] ` | The feature vector that needs decomposition. |
23+ | ` vector ` | ` ARRAY[0.1, 0.45, 1.0] ` | The feature vector to transform. |
2524
2625## Example
2726
2827``` sql
2928SELECT pgml .decompose (' My PCA' , ARRAY[0 .1 , 2 .0 , 5 .0 ]);
3029```
31-
32- !!! example
33-
34- ``` sql
35- SELECT * ,
36- pgml .decompose (
37- ' Buy it Again' ,
38- ARRAY[
39- user .location_id ,
40- NOW() - user .created_at ,
41- user .total_purchases_in_dollars
42- ]
43- ) AS buying_score
44- FROM users
45- WHERE tenant_id = 5
46- ORDER BY buying_score
47- LIMIT 25 ;
48- ```
49-
50- !!!
You can’t perform that action at this time.
0 commit comments