Skip to content

GUZHIXIANG/DAA_taguchi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: Please read this introduction before launching DAA program

Development environment

・Ubuntu 12/14/16 LTS
・Python2.7.*

Multipe version conexistence

install Python2.* & Python3.*
It is unnecessary if Python2 & 3 have been installed.
sudo apt-get install python2.7 python2.7-dev python3.5 python3.5-dev

install compile environment
sudo apt-get install build-essential libssl-dev libevent-dev libjpeg-dev libxml2-dev libxslt-dev

install python-tk for Python interface to Tcl/Tk
sudo apt-get install python-tk python3-tk

install pip
sudo apt-get install python-pip

install virtualenv
virtualenv is a tool to create isolated Python environments.
sudo pip install virtualenv

install Python2.7 virtualenv
virtualenv --no-site-packages -p /usr/bin/python2.7 ~/.venv/python2.7

install Python3.5 virtualenv
virtualenv --no-site-packages -p /usr/bin/python3.5 ~/.venv/python3.5

install virtualenvwrapper
virtualenvwrapper is a set of extensions to virtualenv tool, which includes wrappers for creating and deleting virtual environments and managing your development workflow.
sudo pip install virtualenvwrapper

add the following to shell launch file
echo "export WORKON_HOME=$HOME/.virtualenvs" >> ~/.bashrc
echo "export PROJECT_HOME=$HOME/Devel" >> ~/.bashrc
Normally the virualenvwrapper.sh will be /usr/local/bin/virualenvwrapper.sh, but it may be overridden with your current python environment. Please type which virualenvwrapper.sh to find the file.
echo "source /usr/local/bin/virualenvwrapper.sh" >> ~/.bashrc
then reload it
source ~/.bashrc

create a new Python2.7 virtualenv for DAA and switch to it
command reference mkvirtualenv ENVNAME -p PYTHON_VERSION
mkvirtualenv env_daa -p python2.7

Type the following when the working virtualenv is different
workon env_daa

Requirement

・numpy 1.6.1
・matplotlib 1.1.1
・scipy 0.9.0
・scikit-learn 0.10
・paver 1.2.4
・pyzmq 14.6.0
・ipython 3.2.1

Package installation

Make sure your Python is working on virtualenv of DAA, or typing workon env_daa.

install package with spectic version into DAA virtualenv
Do not type 'sudo' here, else packages will install into root environment.
command reference pip install PACKAGENAME==VERSION
pip install numpy==1.6.1 matplotlib==1.1.1 scipy==0.9.0 sckit-learn==0.10 paver==1.2.4 pyzmq==14.6.0 ipython==3.2.1

If you cannot install matplotlib as the issue 'ft2build.h no such file or directory ubuntu', try the following
sudo apt-get install libfreetype6 libfreetype6-dev

Sourcecode

create the workspace for DAA then go there
mkdir ~/workspace
cd ~/workspace

download DAA sourcecode from our gitlab or by usb flash drive
git clone https://github.com/GUZHIXIANG/DAA_taguchi.git

add the following to the shell launch file
command reference export PYTHONPATH=YOUR_DAA_PATH
echo "export PYTHONPATH=/home/gu/workspace/NPB_DAA_develop" >> ~/.bashrc

move to the DAA path and modify core amount
You can check the core amount in your PC by typing htop
htop is an ncursed-based process viewer
htop installation sudo apt-get install htop
gedit ~/workspace/NPB_DAA_develop/IPCLUSTER.sh
change the amout as below
'ipcluster start -n 8' ---> 'ipcluster start -n YOUR_CORE_AMOUNT'

Launch DAA program

Make sure your Python is working on virtualenv of DAA, or typing workon env_daa.

open a new terminal to launch htop for monitering core running
htop

open a new terminal to launch ipcluster.sh for parallel computation
sh ~/workspace/NPB_DAA_develop/HDP_HLM/SAMPLE2/IPCLUSTER.sh

open a new terminal and move to /NPB_DAA_develop/HDP_HLM/SAMPLE2
cd ~/workspace/NPB_DAA_develop/HDP_HLM/SAMPLE2

reload shell launch file (~/.bashrc)
source ~/.bashrc

launch DAA program
ipython startDAA.py

Result visualization

Make sure your Python is working on virtualenv of DAA, or typing workon env_daa.

move to the result folder named startDAA_result_n
The whole results are saved in the startDAA_result_n folder, which is named with the maximal number existed
cd ~/workspace/NPB_DAA_develop/HDP_HLM/SAMPLE2/startDAA_result_[THE_MAXIMAL_NUMBER]

launch summary.py to plot visual result
ipython ../summary.py





Original README.md

Nonparametric Bayesian Double Articulation Analyzer

This is a Python implementation for Nonparametric Bayesian Double Articulation Analyzer (NPB-DAA). The NPB-DAA can directly acquire language and acoustic models from observed continuous speech signals.

This generative model is called hiererichel Dirichlet process hidden language model (HDP-HLM), which is obtained by extending the hierarchical Dirichlet process hidden semi-Markov model (HDP-HSMM) proposed by Johnson et al. An inference procedure for the HDP-HLM is derived using the blocked Gibbs sampler originally proposed for the HDP-HSMM.

Description

・NPB_DAA/README - There is a NPB-DAA tutorial in PDF.(In Japanese. English version is coming soon.)

・NPB_DAA/HDP-HSMM - Python Library for HDP-HSMM. You can get it at [ https://github.com/mattjj/pyhsmm ]. (Please check this VERSION at README)

・NPB_DAA/HDP-HLM - Python code for NPB-DAA

Requirement

・Ubuntu 12.04.5 LTS

sudo apt-get install

・python 2.7.3

・numpy 1.6.1

・matplotlib 1.1.1rc

・scipy 0.9.0

・scikit-learn 0.10

sudo pip install

・Paver 1.2.4

・pyzmq==14.4.0/14.5.0/14.6.0 (14.6.0)

・ipython 3.2.1

Usage

前のバージョンのものですが,勉強会の資料があります. ディレクトリの構成が変更されていますので,よろしく,おねがいします.

Troubleshooting

If you are in trouble, please look at this document. You can get information about environment operability confirmed and actions on error occuring often. Troubleshooting document

References

・Taniguchi, Tadahiro, Shogo Nagasaka, and Ryo Nakashima. Nonparametric Bayesian double articulation analyzer for direct language acquisition from continuous speech signals, 2015.

・Matthew J. Johnson and Alan S. Willsky. Bayesian Nonparametric Hidden Semi-Markov Models. Journal of Machine Learning Research (JMLR), 14:673–701, 2013.

Authors

Tadahiro Taniguch, Ryo Nakashima, Nagasaka Shogo, Tada Yuki, Kaede Hayashi.

License

  • MIT
    • see LICENSE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published