We want to do the cross_validation of a binary classification task by using the scikit-learn SVM
-
we log firstly into hpc
ssh user_name@hpc.dtic.upf.edu
-
change the python environment to PYTHON/2.7.5, for some reason I don't know, I can't install any python packages on default PYTHON 2.7.3 environment
module load PYTHON/2.7.5
-
make a virtual environment, enter into this environment, and install scikit-learn
virtualenv yourenv
source yourenv/bin/activate
pip install --upgrade pip
pip install numpy,scipy,scikit-learn -
there should be four files in your working folder, they are:
- boundaryPatternClassification.sh: bash which execute jobs in HPC
- svm_cv.py: python script for running the cross validation of the scikit-learn SVM
- fv_train.npy: feature vectors for training the SVM model download it
- target_train.npy: target vector for training the SVM model download it
-
the explaination of the .sh and .py are inside the scripts.
-
to run this recipe:
qsub boundaryPatternClassification.sh
-
to view the stat of the running jobs, use
qstat
. The error log and output log will appear in your directory as .err and .out.