how to solve "libsvm classes are not in classpath" in weka? show me with picture please - svm

I'M using weka 3.6.9 & libsvm or liblinear shows "libsvm classes are not in classpath" can you please sho with picture to me how to solve it?

It will be easier to use Weka 3.8.x or 3.9.x, as you can use its package manager. Below are instructions for both.
Weka 3.6.9
Download the libsvm zip file from the libsvm project page
Decompress the archive
Copy libsvm.jar from inside the java directory into the directory where your weka.jar is located
Open a terminal and go to the directory where your weka.jar is located
Start Weka like this on Linux (under Windows, use ; instead of :):
java -cp weka.jar:libsvm.jar weka.gui.GUIChooser
Use the weka.classifiers.functions.LibSVM classifier
Weka 3.8.x/3.9.x
Open the package manager
Search for libsvm
Install the libSVM package
Restart Weka and use the weka.classifiers.functions.LibSVM classifier

Related

How to run Tutorial: Simple LSTM on fairseq

While trying to learn fairseq, I was following the tutorials on the website and implementing:
https://fairseq.readthedocs.io/en/latest/tutorial_simple_lstm.html#training-the-model
However, after following all the steps, when I try to train the model using the following:
! fairseq-train data-bin/iwslt14.tokenized.de-en \ --arch tutorial_simple_lstm \ --encoder-dropout 0.2 --decoder-dropout 0.2 \ --optimizer adam --lr 0.005 --lr-shrink 0.5 \ --max-tokens 12000
I receive an error:
`fairseq-train: error: argument --arch/-a: invalid choice: 'tutorial_simple_lstm' (choose from 'fconv', 'fconv_iwslt_de_en', 'fconv_wmt_en_ro', 'fconv_wmt_en_de', 'fconv_wmt_en_fr', 'fconv_lm', 'fconv_lm_dauphin_wikitext103', 'fconv_lm_dauphin_gbw', 'transformer', 'transformer_iwslt_de_en', 'transformer_wmt_en_de', 'transformer_vaswani_wmt_en_de_big', 'transformer_vaswani_wmt_en_fr_big', 'transformer_wmt_en_de_big', 'transformer_wmt_en_de_big_t2t', 'bart_large', 'bart_base', 'mbart_large', 'mbart_base', 'mbart_base_wmt20', 'nonautoregressive_transformer', 'nonautoregressive_transformer_wmt_en_de', 'nacrf_transformer', 'iterative_nonautoregressive_transformer', 'iterative_nonautoregressive_transformer_wmt_en_de', 'cmlm_transformer', 'cmlm_transformer_wmt_en_de', 'levenshtein_transformer', 'levenshtein_transformer_wmt_en_de', 'levenshtein_transformer_vaswani_wmt_en_de_big',....
Some additional info: I am using google colab. And I am writing the entire code until train step into .py file and uploading it to fairseq/models/... path as per my interpretation of the instructions. I am following the exact tutorial in the link.
And, before running it on colab, I am installing fairseq using:
!git clone https://github.com/pytorch/fairseq %cd fairseq !pip install --editable ./
I think this error happens because the command line argument created as per the tutorial has not been set properly.
Can anyone please explain if on any step I would need to do something else.
I would be grateful for your inputs as for a beginner learner such help from the community goes a long way.
Seems you didn't register the SimpleLSTMModel architecture as follow. Once the model is registered you can use it with the existing Command-line Tools.
#register_model('simple_lstm')
class SimpleLSTMModel(FairseqEncoderDecoderModel):
...
.
.
...
Please note that copying .py files doesn't mean you have registered the model. To do so, you need to execute the .py file that includes abovementioned lines of code. Then, you'll be able to run the training process using existing command-line tools.
You should put your .py into:
fairseq/fairseq/models
not to fairseq/models

DataStax Bulk Loader for Apache Cassandra isn't installing on Windows

I'm trying to install DataStax Bulk Loader on my Windows machine in order to import json file to Cassandra databse. I just follow the installation instructions from the official webstie. It's just unpack the folder. Printing dsbulkfrom any catalogue into cmd prints the following result: "dsbulk" is not internal or external command, executable program, or batch file. However I added C:\DSBulk\dsbulk-1.7.0\bin into PATH variables. Anyone who faced with this problem what did you do? Thanks :D
Change into the bin/ directory where you unzipped the package. For example:
C:> cd C:\DSBulk\dsbulk-1.7.0\bin
Then run the dsbulk.cmd from there.
NOTE: Make sure you have both the classpath and Java home set in your environment. Cheers!

how to convert .lm file(language model) to .lm.bin(binary file)?

I am using pocketsphinx for offline speech recognition. I use lmtool to get language model and dictionary.But the language model has extension .lm but pocketsphinx requires .lm.bin file. So, how can I convert this?
You just need to:
1. Download http://sourceforge.net/projects/cmusphinx/files/sphinxbase/0.8/sphinxbase-0.8-win32.zip
Unpackage sphinxbase-0.8-win32.zip. The folder will be PATH\
In my case thats C:\Users\carope9\Desktop\
Move lm file to PATH\sphinxbase-0.8-win32\bin\Release
Open CMD and write cd PATH\sphinxbase-0.8-win32\bin\Release
Write sphinx_lm_convert -i YOUR_LM_FILE -o YOUR_LM.BIN_FILE
example: sphinx_lm_convert -i es_ES.lm -o es_ES.lm.bin
Your new lm.bin file will be into PATH\sphinxbase-0.8-win32\bin\Release
If you don't use Windows need to download source files from http://sourceforge.net/projects/cmusphinx/files/sphinxbase/0.8/sphinxbase-0.8.tar.gz but I don't know how to install it I'm reading https://sourceforge.net/p/cmusphinx/discussion/help/thread/c67930c0/?limit=25
P/D: According to some people this doesn't work, it worked for me and I don't know how to correct their error. Hope it helps you.

Linux LibreOfice Headless Conversion no Output?

I am trying to convert a .docx file to PDF using LibreOffice 4.3 on RHEL 6.5 (corporate server).
For some reason, there is no output at all:
../program/soffice --headless --convert-to pdf --outdir . lock.docx
I am running the command as root, so I don't see any problems with permissions.
This is similar to this question, but I cannot convert ANY MS Office documents.
I installed LO on an EC2 instance, and it converts .docx to PDF just fine.
What areas could be causing the issue? Any suggestions on what I should be looking at?
Thanks!
Turns out I needed a whole set of dependent RPMs installed first, culminating in libGLU. I've included my additional RPM dependency tree if it will be of use:
libIDL-0.8.13-2.1.el6.x86_64.rpm
ORBit2-2.14.17-5.el6.x86_64.rpm
sgml-common-0.6.3-33.el6.noarch.rpm
GConf2-2.28.0-6.el6.x86_64.rpm
avahi-glib-0.6.25-15.el6.x86_64.rpm
gnome-vfs2-2.24.2-6.el6.x86_64.rpm
libXxf86vm-1.1.2-2.el6.x86_64.rpm
mesa-dri-filesystem-9.2-0.5.el6_5.2.x86_64.rpm
mesa-private-llvm-3.3-0.3.rc3.el6.x86_64.rpm
mesa-dri1-drivers-7.11-8.el6.x86_64.rpm (--nodeps)
mesa-dri-drivers-9.2-0.5.el6_5.2.x86_64.rpm
mesa-libGL-9.2-0.5.el6_5.2.x86_64.rpm
mesa-libGLU-9.2-0.5.el6_5.2.x86_64.rpm

preparing data for haar training OpenCV

i want to make my own haar classifier for detection of hand, so i was following the toutorial given at
Naotoshi Seo. In this tutorial various linux command are used and i don't have linux.
some command are:
$ find [image dir] -name '*.[image ext]' > [description file]
$ createsamples -info samples.dat -vec samples.vec -w 20 -h 20
so how can i use these command on my windows
The "find" command creates a text file with the names of your image files. You can do that by hand if you want.
The second one is not a standard Linux command, but, I assume, one of the tools you need to create the classifier. If you want to use Windows you will have to download the Windows version of the tools in that tutorial. He uses Cygwin so you will need to install that as well.
Another option is to download the Ubuntu Live distribution and install it on a USB memory stick. You can then boot from the USB stick, create your classifier in Linux, then go beck to Widows when you're done.

Resources