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: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1105,7 +1105,7 @@ pgml: SELECT logs->>'epoch' AS epoch, logs->>'step' AS step, logs->>'loss' AS lo
1105
1105
During training, model is periodically uploaded to Hugging Face Hub. You will find the model at `https://huggingface.co/<username>/<project_name>`. An example model that was automatically pushed to Hugging Face Hub is [here](https://huggingface.co/santiadavani/imdb_review_sentiement).
1106
1106
1107
1107
### 6. Inference using fine-tuned model
1108
-
Now, that we have fine-tuned model on Hugging Face Hub, we can use [`pgml.transform`](/docs/open-source/pgml/guides/llms/text-classification) to perform real-time predictions as well as batch predictions.
1108
+
Now, that we have fine-tuned model on Hugging Face Hub, we can use [`pgml.transform`](/docs/open-source/pgml/api/pgml.transform) to perform real-time predictions as well as batch predictions.
Copy file name to clipboardExpand all lines: pgml-cms/blog/sentiment-analysis-using-express-js-and-postgresml.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Express is a mature JS backend framework touted as being fast and flexible. It i
24
24
25
25
Sentiment analysis is a valuable tool for understanding the emotional polarity of text. You can determine if the text is positive, negative, or neutral. Common use cases include understanding product reviews, survey questions, and social media posts.
26
26
27
-
In this application, we'll be applying sentiment analysis to note taking. Note taking and journaling can be an excellent practice for work efficiency and self improvement. However, if you are like me, it quickly becomes impossible to find and make use of anything I've written down. Notes that are useful must be easy to navigate. With this motivation, let's create a demo that can record notes throughout the day. Each day will have a summary and sentiment score. That way, if I'm looking for that time a few weeks ago when we were frustrated with our old MLOps platform — it will be easy to find. 
27
+
In this application, we'll be applying sentiment analysis to note taking. Note taking and journaling can be an excellent practice for work efficiency and self improvement. However, if you are like me, it quickly becomes impossible to find and make use of anything I've written down. Notes that are useful must be easy to navigate. With this motivation, let's create a demo that can record notes throughout the day. Each day will have a summary and sentiment score. That way, if I'm looking for that time a few weeks ago when we were frustrated with our old MLOps platform — it will be easy to find.
28
28
29
29
We will perform all the Machine Learning heavy lifting with the pgml extension function `pgml.transform()`. This brings Hugging Face Transformers into our data layer.
30
30
@@ -36,7 +36,7 @@ You can see the full code on [GitHub](https://github.com/postgresml/example-expr
36
36
37
37
This app is composed of three main parts, reading and writing to a database, performing sentiment analysis on entries, and creating a summary.
38
38
39
-
We are going to use [postgresql-client](https://www.npmjs.com/package/postgresql-client) to connect to our DB. 
39
+
We are going to use [postgresql-client](https://www.npmjs.com/package/postgresql-client) to connect to our DB.
40
40
41
41
When the application builds we ensure we have two tables, one for notes and one for the the daily summary and sentiment score.
42
42
@@ -62,7 +62,7 @@ const day = await connection.execute(`
62
62
63
63
We also have three endpoints to hit:
64
64
65
-
*`app.get(“/", async (req, res, next)` which returns all the notes for that day and the daily summary. 
65
+
*`app.get(“/", async (req, res, next)` which returns all the notes for that day and the daily summary.
66
66
*`app.post(“/add", async (req, res, next)` which accepts a new note entry and performs a sentiment analysis. We simplify the score by converting it to 1, 0, -1 for positive, neutral, negative and save it in our notes table.
67
67
68
68
```postgresql
@@ -146,8 +146,8 @@ not bad for less than an hour of coding.
146
146
147
147
### Final Thoughts
148
148
149
-
This app is far from complete but does show an easy and scalable way to get started with ML in Express. From here I encourage you to head over to our [docs](https://postgresml.org/docs/) and see what other features could be added.
149
+
This app is far from complete but does show an easy and scalable way to get started with ML in Express. From here I encourage you to head over to our [docs](https://postgresml.org/docs) and see what other features could be added.
150
150
151
-
If SQL is not your thing, no worries. Check out or [JS SDK](https://postgresml.org/docs/open-source/korvus) to streamline all our best practices with simple JavaScript. 
151
+
If SQL is not your thing, no worries. Check out or [JS SDK](https://postgresml.org/docs/open-source/korvus/) to streamline all our best practices with simple JavaScript.
152
152
153
-
We love hearing from you —please reach out to us on [Discord ](https://discord.gg/DmyJP3qJ7U)or simply [Contact Us](https://postgresml.org/contact) here if you have any questions or feedback. 
153
+
We love hearing from you —please reach out to us on [Discord ](https://discord.gg/DmyJP3qJ7U)or simply [Contact Us](https://postgresml.org/contact) here if you have any questions or feedback.
|[pgml.train()](api/pgml.train)| Train a model on PostgreSQL tables or views using any algorithm from Scikit-learn, with the additional support for XGBoost, LightGBM and Catboost. |
42
-
|[pgml.predict()](api/pgml.predict/)| Run inference on live application data using a model trained with [pgml.train()](pgml.train). |
43
-
|[pgml.deploy()](api/pgml.deploy)| Deploy a specific version of a model trained with pgml.train(), using your own accuracy metrics. |
44
-
|[pgml.load_dataset()](api/pgml.load_dataset)| Load any of the toy datasets from Scikit-learn or any dataset from Hugging Face. |
42
+
|[pgml.predict()](api/pgml.predict/)| Run inference on live application data using a model trained with [pgml.train()](api/pgml.train).|
43
+
|[pgml.deploy()](api/pgml.deploy)| Deploy a specific version of a model trained with pgml.train(), using your own accuracy metrics. |
44
+
|[pgml.load_dataset()](api/pgml.load_dataset)| Load any of the toy datasets from Scikit-learn or any dataset from Hugging Face. |
Copy file name to clipboardExpand all lines: pgml-cms/docs/open-source/pgml/api/pgml.predict/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ description: >-
11
11
The `pgml.predict()` function is the key value proposition of PostgresML. It provides online predictions using the best, automatically deployed model for a project. The API for predictions is very simple and only requires two arguments: the project name and the features used for prediction.
Copy file name to clipboardExpand all lines: pgml-cms/docs/open-source/pgml/guides/supervised-learning/clustering.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ LIMIT 10;
27
27
28
28
## Algorithms
29
29
30
-
All clustering algorithms implemented by PostgresML are online versions. You may use the [pgml.predict](/docs/open-source/pgml/api/pgml.predict"mention")function to cluster novel data points after the clustering model has been trained.
30
+
All clustering algorithms implemented by PostgresML are online versions. You may use the [pgml.predict](/docs/open-source/pgml/api/pgml.predict/"mention")function to cluster novel data points after the clustering model has been trained.
Copy file name to clipboardExpand all lines: pgml-cms/docs/open-source/pgml/guides/vector-database.md
+12-21Lines changed: 12 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ In Postgres, a vector is just another data type that can be stored in regular ta
10
10
11
11
### Installing pgvector
12
12
13
-
If you're using our [cloud](https://postgresml.org/signup) or our Docker image, your database has _pgvector_ installed already. If you're self-hosting PostgresML, take a look at our [Self-hosting](/docs/open-source/pgml/developers/self-hosting/README) documentation.
13
+
If you're using our [cloud](https://postgresml.org/signup) or our Docker image, your database has _pgvector_ installed already. If you're self-hosting PostgresML, take a look at our [Self-hosting](/docs/open-source/pgml/developers/self-hosting/) documentation.
14
14
15
15
### Working with vectors
16
16
@@ -24,10 +24,8 @@ Using the example from [Tabular data](../../../introduction/import-your-data/sto
24
24
{% tab title="SQL" %}
25
25
26
26
```postgresql
27
-
ALTER TABLE
28
-
usa_house_prices
29
-
ADD COLUMN
30
-
embedding VECTOR(384);
27
+
ALTER TABLE usa_house_prices
28
+
ADD COLUMN embedding VECTOR(384);
31
29
```
32
30
33
31
{% endtab %}
@@ -49,8 +47,7 @@ At first, the column is empty. To generate embeddings, we can use the PostgresML
0 commit comments