@@ -4,8 +4,7 @@ description: Decompose an input vector into it's principal components
4
4
5
5
#pgml.decompose()
6
6
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.
9
8
10
9
##API
11
10
@@ -21,30 +20,10 @@ pgml.decompose(
21
20
| Parameter| Example| Description|
22
21
| ----------------| ---------------------------------| ----------------------------------------------------------|
23
22
| ` 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 vectorthat needs decomposition. |
23
+ | ` vector ` | ` ARRAY[0.1, 0.45, 1.0] ` | The feature vectorto transform. |
25
24
26
25
##Example
27
26
28
27
``` sql
29
28
SELECT pgml .decompose (' My PCA' , ARRAY[0 .1 ,2 .0 ,5 .0 ]);
30
29
```
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
- !!!