Blog Archive

Friday, September 21, 2012

Failure of update the tool of WEKA


Failure of update the tool of WEKA

Question: How to solve the following question:


java.io.IOException: Server returned HTTP response code: 500 for URL: http://weka.sourceforge.net/packageMetaData/WekaODF/versions.txt



Answer:

create a file called "PackageRepository.props" in $HOME/wekafiles/props 
and add the following line to it:

weka.core.wekaPackageRepositoryURL=http://www.cs.waikato.ac.nz/ml/weka/packageMe








Source:
https://list.scms.waikato.ac.nz/pipermail/wekalist/2012-February.txt

Thursday, September 20, 2012

Perl script to covert libsvm data format into WEKA ARFF format


#!/usr/bin/perl
# perl lsvm2arff.pl inputLibSVMData.lsvm outputWeka.arff
$attNum=`head -n1 $ARGV[0] | wc -w`;
$attNum=$attNum-1;

$cmd_str="cat $ARGV[0] | perl -lane 'print \$F[0]' | sort | uniq | sort -n";
chomp($IDs=`$cmd_str`);
@classIDs=split(' ',$IDs);
#print "IDS=@classIDs, $classIDs[0]\n";
print "In this convertion code, your original class 'label' will be converted into 'class_label'; \nFor example, if class IDs are:\t1,\t\t2; \nthey will be converted into:\tclass_1,\tclass_2\n";


open(OUT, ">$ARGV[1]") || die "$!";
print OUT "\@relation libSVM2ARFF_DATA\n";
print OUT "\n";

for($i=1;$i<=$attNum;$i++){
print OUT "\@attribute attribute_${i} real\n";
}
$tmp_str="";
for($j=0;$j<@classIDs-1;$j++){
$ID=$classIDs[$j];
$tmp_str=$tmp_str."class_$ID,";
}
print OUT "\@attribute class {${tmp_str}class_$classIDs[-1]}\n";

print OUT "\n";

print OUT "\@data\n";

#print "$cmd_str\n";
#$cmd_str="cat ~/Dropbox/tmp/tst_data_D50.lsvm |  perl -lane 's|\d+:||g; print \$_' | perl -lane '\$str="";for(\$i=1;\$i<\@F;\$i++){\$str=\$str."\$F[\$i],"};print "${str}class$F[0]"'"
$cmd_str="cat $ARGV[0] |  perl -lane 's|\\d+:||g; print \$_' | perl -lane '\$len=\@F; \$str=\"\";for(\$i=1;\$i<\$len;\$i++){\$str=\$str.\"\$F[\$i],\"};print \"\${str}class_\$F[0]\"'";
#print "$cmd_str\n";
#`echo $cmd_str`;
chomp(@data=`$cmd_str`);

foreach(@data){
print OUT "$_\n";
}

close(OUT);

Tuesday, September 4, 2012

Question: `require': no such file to load -- peach



sudo jruby -S gem list --local

*** LOCAL GEMS ***

sources (0.0.1)

$ which jruby
/usr/bin/jruby
$ ll /usr/bin/jruby
lrwxrwxrwx 1 root root 23 2012-06-29 21:30 /usr/bin/jruby -> /etc/alternatives/jruby*
$ ruby helloWorld.rb
helloWorld.rb:3:in `require': no such file to load -- java (LoadError)
from helloWorld.rb:3
$ jruby helloWorld.rb
helloWorld.rb:4:in `require': no such file to load -- peach (LoadError)
from helloWorld.rb:4

$ gem query

*** LOCAL GEMS ***


#helloWorld.rb
require 'yaml'
require 'java'
require 'peach'

puts 'hello world'

#dataset = ENV['DATASET'] 
#puts "dataset " + dataset

Thursday, August 23, 2012

11-755 MACHINE LEARNING FOR SIGNAL PROCESSING



http://mlsp.cs.cmu.edu/courses/fall2009/


(ECE number: 18-797)

Instructor: Bhiksha Raj

This course is an elective in LTI, MLD and ECE
Credits:12
Timings:4.30-5.50pm, Tuesdays and Thursdays
Location:Porter Hall 125C
Prerequisites:
Mandatory:  Linear Algebra. Basic Probability Theory.
Recommended:  Signal Processing. Machine Learning.
Also Recommended:  18-799 by Joy Zhang would be an excellent course to take in parallel. This is also being conducted this fall.
LIST Of PROJECTS

Signal Processing is the science that deals with extraction of information from signals of various kinds. This has two distinct aspects -- characterization and categorization. Traditionally, signal characterization has been performed with mathematically-driven transforms, while categorization and classification are achieved using statistical tools.
Machine learning aims to design algorithms that learn about the state of the world directly from data.
A increasingly popular trend has been to develop and apply machine learning techniques to both aspects of signal processing, often blurring the distinction between the two.
This course discusses the use of machine learning techniques to process signals. We cover a variety of topics, from data driven approaches for characterization of signals such as audio including speech, images and video, and machine learning methods for a variety of speech and image processing problems.
The course will roughly follow the following outline.
There will be several guest lectures. These will be announced as dates are finalized.
Grading will be based on performance in course assignments and a final project.
Outline
Class 1, 25 Aug 2009Introduction. Basics: Representing audio and image data.SlidesAdditional material
Class 2, 27 Aug 2009Linear Algebra RefresherSlidesAdditional material
Class 3, 1 Sep 2009Linear Algebra Refresher, Part IISlidesHomework Problem
Class 4, 3 Sep 2009DSP Refresher. Representing Sounds and Images.SlidesAdditional Material
Class 5, 8 Sep 2009No class
Class 6, 10 Sep 2009No class
Class 7, 15 Sep 2009Eigen faces. Boosting. Face detectionSlidesHomework ProblemHomework Problem No 2.
Class 8, 17 Sep 2009Component Analysis (Guest Lecture, De la Torre)Slides
Class 9, 22 Sep 2009Project Ideas (with Guests Speakers)SlidesEakta Jain's SlidesAvidan's Seamcarving video
Class 10, 24 Sep 2009Speech synthesis, voice transformations (Guest Lecture, Black)Slides
Class 11, 29 Sep 2009Boosting, Face detection, Recaps.SlidesAdditional Material
Class 12, 1 Oct 2009Independent Component Analysis (Guest Lecture, Smaragdis)Slides Handout
Class 13, 6 Oct 2009Latent variabe decomposition of audio signalsSlidesAdditional Material
Class 14, 8 Oct 2009Musical Onset Detection and Applications (Guest Lecture, Dannenberg)Slides
Class 15, 13 Oct 2009Overcomplete decompositions. Nearest-neighbor decomposition. Shift-invariant and transform invariant models.Slides
Class 16, 15 Oct 2009Non-negative matrix factorization and its application to audio (Guest Lec., Virtanen)Slides
Class 17, 20 Oct 2009Pitch estimation, voice distortion (Guest Lecture, Black)Slides
Class 18, 22 Oct 2009Shift-invariant decompositions; audio denoising.Slides
Class 19, 27 Oct 2009Music Identification (Guest Lecture, Sukthankar)Slides
Class 20, 29 Oct 2009Advanced component analysis (Guest Lecture, De la Torre)Slides
Class 21, 3 Nov 2009Iris recognition (Guest Lecture, Kumar)Slides
Class 22, 5 Nov 2009Automatic Speech Recognition in an Hour.Slides
Class 23, 10 Nov 2009Sparse and overcomplete representationsSlides
Class 24, 12 Nov 2009Compressive Sensing (Boufonos)Slides
Class 25, 17 Nov 2009Microphone array processingSlides
Class 26, 19 Nov 2009Array processing -- maximum likelihood techniques, tracking, audio-visual tracing.Slides
Class 27, 24 Nov 2009Project presentationsSlides
Class 28, 1 Dec 2009Project presentationsSlides
Class 29, 3 Dec 2009Project presentationsSlides

Wednesday, August 15, 2012

HOW TO DISABLE DISABLE CPU FREQUENCY SCALING IN UBUNTU JAUNTY AND KARMIC

source:   http://www.webupd8.org/2009/10/how-to-disable-disable-cpu-frequency.html


Dynamic frequency scaling (also known as CPU throttling) is a technique in computer architecture where a processor is run at a less-than-maximum frequency in order to conserve power. Dynamic frequency scaling is commonly used in laptops and other mobile devices, where energy comes from a battery and thus is limited. It is also used in quiet computing settings and to decrease energy and cooling costs for lightly loaded machines.

If you have a desktop PC, you may want to turn it off. The old sudo dpkg-reconfigure gnome-applets method does not work anymore, so here's what you need to do to disable CPU frequency scaling so that you CPU always runs at full capacity:


Open a terminal and type this:
sudo apt-get install rcconf

This installs rcconf which we now need to run so again in a terminal, type:
sudo rcconf

For cpu scaling, look for "ONDEMAND" and once at the entry, with the space bar un-check the box. To save the configuration hit the tab key so that "OK" is highlighted then enter to save and reboot.

Now, right click your panel and select "Add to Panel" and add CPU Frequency Scaling Monitor, then click it and select "Performance":

Image and video hosting by TinyPic


Reboot and that's it.

==========


Disable “ondemand” CPU scaling daemon


To make all CPUs run at maximum performance continually on a Ubuntu desktop or server, run:
sudo chmod -x /etc/init.d/ondemand
at the shell prompt and enter your password. This disables the shell script that makes all CPUs run at speed "OnDemand", making them default to full speed (Performance). You will need to reboot for this to take effect.
I have only tested this in Ubuntu Jaunty 9.04, but it should work and not cause any problems on any version of Ubuntu.
I think the Ubuntu defaults are strange for this. A desktop or server should run at full speed, in my opinion.
Regards, George