PDA

View Full Version : select attributes



Sabrina
02-19-2009, 03:52 AM
Hi,
I have 500 files and each of them represents the transactions of a customer. I want to do a select attributes for each file but I want to avoid doing it one at a time. Is it possible in experimenter to obtain the results of all files at the same time? Or is there another way of obtaining these results?
Thank you very much.
Sabrina

tdidomenico
02-19-2009, 08:44 AM
Well, you could use Kettle to create Arff files from your datasets:

-Download Kettle: http://voxel.dl.sourceforge.net/sourceforge/pentaho/pdi-open-3.1.0-826.zip

-Install the Arff output plugin: http://wiki.pentaho.com/download/attachments/1049091/ArffOutput.zip?version=4

Cheers!

Sabrina
02-20-2009, 04:33 AM
Hi,
I have just created 500 Arff files from my dataset. My problem is that I want to do a select attribute for each file at the same time.
Regards,
Sabrina

tdidomenico
02-20-2009, 10:34 AM
Well, you could probably just create a shell script to directly use the weka classes and have it iterate through your ARFF files.

Are you familiar with shell scripting? If not, what operating system are you using?

Cheers!

Sabrina
02-20-2009, 03:51 PM
I am not familiar with shell scripting. The operating system that I use is Windows Vista.

Regards,

Sabrina

tdidomenico
02-21-2009, 08:00 AM
Ok, I'm attaching a batch file that (hopefully) should work :P

First you should edit it and modify the first four lines: the first one is the location of your weka.jar file. The second one the location of your java bin file (will probably work as it is). Third and fourth are the WEKA Evaluator and Search configurations for the AttributeSelection filter, which you can copy from Explorer once you're done choosing your options.

Once you've done this just copy the .bat file to the directory where you've got your arff files and after running it you should get the same amount of ".as.arff" files, already filtered.

Please take into account that I don't usually use Windows, so this may take more than one shot :P

Cheers!

Sabrina
02-21-2009, 11:18 AM
Thank you very much!!!
Regards,

Sabrina

Sabrina
02-23-2009, 11:04 AM
Hi,
I am sorry to trouble you again. The batch file works :). But is it possible to obtain the result of each ".as.arff" file in a single file? In other words, I would like to have a file where I have the attribute that gives the greatest gain of information for each id_customer(each of my arff files represents a customer), so that I avoid to open each file one at a time.
Thank you very much,

Sabrina

tdidomenico
02-24-2009, 12:19 PM
But I would think it's not very likely that you get the same attributes after applying the filter to each customer. And if each single arff file has a different set of attributes you will not be able to merge them...