Releases: xdata-skylark/libskylark
Release 0.20
Installing libskylark
There are two options for quickly installing libskylark in Linux-x86_64 systems (i.e. Linux distribution independent):
- From conda channels (full installation, including FFTW-based sketching)
- From a single-file installer (not including FFTW-based sketching)
Installing libskylark from conda channels
Open a terminal and type (copy-paste):
# Get miniconda for python 2.7
curl -L -O https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
bash Miniconda2-latest-Linux-x86_64.sh -b -p ${HOME}/miniconda2
# Get the libskylark channel
curl -L -O https://github.com/xdata-skylark/libskylark/releases/download/v0.20/channel.tar.gz
cd ${HOME}; tar -xvzf channel.tar.gz
# Install fftw and libskylark conda packages
export PATH=${HOME}/miniconda2/bin:${PATH}
conda install fftw --yes --channel conda-forge
conda install libskylark --yes --channel file://${HOME}/channel
Trying the installation
Start an ipython shell:
ipython
and then input the following python snippet:
import El
from skylark import sketch
A = El.DistMatrix()
El.Uniform(A, 10, 10)
S = sketch.FJLT(10, 4)
SA = S * A
print [[SA.Get(i, j) for j in range(10)] for i in range(4)]
Congratulations! You have just sketched a 10x10 distributed matrix of uniform distribution random entries into a 4x10 sketched matrix by making use of the Fast Johnson-Lindenstrauss Transform (FJLT).
Now consider hard-wiring the installation path by appending this line
export PATH=${HOME}/miniconda2/bin:${PATH}
to your ~/.bashrc
.
Installing libskylark from a single-file installer
Open a terminal and type (copy-paste):
# Download the installer and install libskylark
curl -L -O https://github.com/xdata-skylark/libskylark/releases/download/v0.20/install.sh
bash install.sh -b -p ${HOME}/libskylark
export PATH=${HOME}/libskylark/bin:${PATH}
Trying the installation
Start an ipython shell:
ipython
and then input the following python snippet:
import El
from skylark import sketch
A = El.Matrix()
El.Uniform(A, 10, 10)
S = sketch.JLT(10, 4)
SA = S * A
print SA.ToNumPy()
Congratulations! You have just sketched a 10x10 matrix of uniform distribution random entries into a 4x10 sketched matrix by making use of the Johnson-Lindenstrauss Transform (JLT).
Now consider hard-wiring the installation path by appending this line
export PATH=${HOME}/libskylark/bin:${PATH}
to your ~/.bashrc
.
Happy sketching!