mark-blacher / sql-algorithms

This repository contains supplementary code for the paper: Machine Learning, Linear Algebra and More: Is SQL All You Need?
MIT License
8 stars 1 forks source link

Supplement for the paper - Machine Learning, Linear Algebra, and More: Is SQL All You Need?

Structure of the Repository

.
├── LP_solver                  # A Linear Programming solver written in SQL
├── case_study                 # Case study and experiments for the paper using logistic regression
│   ├── demonstration          # Stand alone files for logistic regression
│   └── experiments            # Experimental files to reproduce the results of the paper
├── more_algorithmic_examples  # additional SQL-only algorithms not mentioned in the paper
├── primitives                 # Stand alone files for the primitives of chapter 3 
│   ├── conditions             # Implementation of conditions
│   ├── errors                 # Catching and handling errors
│   ├── loops                  # Implementation of loops
│   ├── functions              # Using functions
└── └── variables              # Variable declaration and usage

See each folder for more information.

Requirements

Python and Anaconda

All files were tested using Python version 3.8 and Anaconda version 4.9.2

Further we require the following Python packages.

All packages can be installed using Anaconda and the yaml file with

conda env create -f environment.yml

after this the environment is activated with

conda activate exql

and can be deleted with

conda env remove -n exql.

Postgres

The experiments further need a postgres DBMS installation. We used psql version 12.7. You can install postgres on linux using

sudo apt-get install postgresql-12.7 postgresql-contrib-12.7

The postgres installation should have a database with the following configuaration: