Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cleanup installation instructions#13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
montanalow merged 1 commit intomasterfrommontana/readme
Apr 17, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 2 additions & 62 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -195,69 +195,9 @@ Colocating the compute with the data inside the database removes one of the most



###Installation in WSL or Ubuntu
###Development

Install Python3, pip, and Pl/Python3:

```bash
sudo apt update
sudo apt install -y postgresql-plpython3-12 python3 python3-pip
```

Restart the Postgres server:

```bash
sudo service postgresql restart
```

Create the extension:

```sql
CREATE EXTENSION plpython3u;
```

Install Scikit globally (I didn't bother setup Postgres with a virtualenv, but it's possible):

```
sudo pip3 install sklearn
```

### Run the example

```bash
psql -f scikit_train_and_predict.sql
```

Example output:

```
psql:scikit_train_and_predict.sql:4: NOTICE: drop cascades to view scikit_train_view
DROP TABLE
CREATE TABLE
psql:scikit_train_and_predict.sql:14: NOTICE: view "scikit_train_view" does not exist, skipping
DROP VIEW
CREATE VIEW
INSERT 0 500
CREATE FUNCTION
scikit_learn_train_example
----------------------------
OK
(1 row)

CREATE FUNCTION
value | weight | prediction
-------+--------+------------
1 | 5 | 5
2 | 5 | 5
3 | 5 | 5
4 | 5 | 5
5 | 5 | 5
(5 rows)
```

### Run the linear model

Install our PgML package globally:
Follow the installation instructions to create a local working Postgres environment, then install your PgML package from the git repository:

```
cd pgml
Expand Down
10 changes: 0 additions & 10 deletionsscikit_import.sql
View file
Open in desktop

This file was deleted.

71 changes: 0 additions & 71 deletionsscikit_train_and_predict.sql
View file
Open in desktop

This file was deleted.

File renamed without changes.

[8]ページ先頭

©2009-2025 Movatter.jp