Skip to content

2023 KDBC [SQL MNIST 기반 데이터 활용 소프트맥스 회귀 구현]

Notifications You must be signed in to change notification settings

R3gardless/SQL-based-Softmax-Regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL based Softmax Regression

Intro

Repository for Implementing SQL-based Softmax Regression for MNIST data paper experiment code [paper] [ppt]

Requirements

  • Ubuntu 18.04.6 LTS
  • Anaconda 23.7.2
  • PostgreSQL 16.0

Installation

Python (Hyper API)

  1. Install using environment.yml file
$ conda env create -f environment.yml
  1. Activate conda environment
$ conda activate sql-4-ml
  1. If you want to delete conda environment
$ conda env remove -n sql-4-ml

PostgreSQL

  1. Create a user and login to postgres account
$ adduser postgres
$ su - postgres
  1. Download the source code from PostgreSQL website
$ wget https://ftp.postgresql.org/pub/source/v16.0/postgresql-16.0.tar.gz
$ tar -xvzf postgresql-16.0.tar.gz
  1. Make a directory for build and configure the source tree
$ cd postgresql-16.0
$ mkdir build
$ ./configure --prefix=/home/postgres/postgrsql-16.0/build
  1. Build and install the source code (make -j = Make build faster using multiple processes)
$ make -j install
  1. Add the shared library path to ~/.bashrc
$ vim ~/.bashrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/postgres/postgresql-16.0/build/lib
export PATH=/home/postgres/postgresql-16.0/build/bin:$PATH

$ source ~/.bashrc
  • Add the shared library to .profile of postgres user
$ cd ~
$ vim .profile
PATH=$PATH:/home/postgres/postgresql-9.4.5/build/bin
export PATH
$ . ~/.profile
  1. Initialize the database storage with initdb command of postgres
$ initdb -D /home/postgres/test_data

How to Execute?

Run PostgreSQL

$ pg_ctl -D /home/postgres/test_data -l logfile start
  • Stop the PostgreSQL server
$ pg_ctl -D /home/postgres/test_data -m smart stop

Run Experiment

$ conda activate sql-4-ml
$ python3 experiment.py

References

About

2023 KDBC [SQL MNIST 기반 데이터 활용 소프트맥스 회귀 구현]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages