Debellor-Rseslib data conversion

All other topics related to TunedIT, data mining, machine learning, research, applications, ...

Debellor-Rseslib data conversion

Postby sebov » Fri Oct 16, 2009 11:51 am

Hi.
I have a question regarding data conversion between Debellor and Rseslib. I see there is DataConverter class and its methods but how can i obtain Header object needed for doubledataFrom() method and how can I do the conversion in the opposite side.

Sebastian Stawicki
sebov
 
Posts: 5
Joined: Fri Oct 09, 2009 6:45 pm

Re: Debellor-Rseslib data conversion

Postby Marcin » Fri Oct 16, 2009 12:11 pm

Sebastian,
Thanks for your question. You can get an Rseslib Header instance using method headerFrom(SampleType ...). And SampleType can be found in the input stream that you received from Cell.openInputStream(). For example, in your cell you can write:

Code: Select all
   Stream input = openInputStream();
   Header rseslibHeader = headerFrom( input.sampleType );

As to opposite conversion, it's not implemented, yet - it wasn't needed till now. If you think it's worth to have I'll put it on our TODO list.

Cheers, Marcin
Marcin
 
Posts: 115
Joined: Fri Oct 09, 2009 6:45 pm

Re: Debellor-Rseslib data conversion

Postby sebov » Fri Oct 16, 2009 12:44 pm

Thanks for your replay.
No, I am not stating it is worth to implement the opposite conversion - as for now I don't have opinion on that.
In the meantime I have found out what I really need - I wanted to get decision value from Rseslib and translate it into Debellor's format. I am convinced that with attrFromRseslibValue() I can do this.

Regards,
Sebastian
sebov
 
Posts: 5
Joined: Fri Oct 09, 2009 6:45 pm

Re: Debellor-Rseslib data conversion

Postby zia » Tue Apr 19, 2011 8:48 pm

First of all i would like to thank you for this great effort, Debellor really helpfull for understanding the Data streams.
My question is that, how would we read the data for stream.
as in example you mentioned the way how to read the Arff file in a cell should we use that cell for stream. e.g.

Code: Select all
Cell arff = new ArffReader();
rff.set("filename", "data/glass.arff");
arff.set("decisionAttr", "last");

Cell streamCell.setSource(arff);
streamCell.set("windowLength", 100);


do you think its the right way
i did like this but when i convert the data from

..............................
header = DataConverter.headerFrom(type);
DoubleDataTable table= new ArrayListDoubleDataTable(header);
......................................
first line produce error "Debellor to Rseslib conversion error. Unsupported feature type."

I hope you would understand my Question
Regards.
Zia
zia
 
Posts: 4
Joined: Tue Apr 19, 2011 10:57 am

Re: Debellor-Rseslib data conversion

Postby zia » Wed Apr 20, 2011 10:32 am

Hello once again
hopefully you have read my first email. i need you kind help. if you spare some time to answer me, ill be very thankful to you


My Problem is that when i read from arff reader it looks like this

[1.51793 12.79 3.5 1.12 73.03 0.64 8.77 0.0 0.0] => 'build wind float'
[1.51643 12.16 3.52 1.35 72.89 0.57 8.53 0.0 0.0] => 'vehic wind float'
[1.51793 13.21 3.48 1.41 72.64 0.59 8.43 0.0 0.0] => 'build wind float'
But when i copy the arff cel to stream cell the decision attribute is not transfered to it llike

[[1.51793 12.79 3.5 1.12 73.03 0.64 8.77 0.0 0.0] [1.51643 12.16 3.52 1.35 72.89 0.57 8.53 0.0 0.0] [1.51793 13.21 3.48 1.41 72.64 0.59 8.43 0.0 0.0]] => null

the code is like this
Cell arff = new ArffReader();
arff.set("filename", "data/glass.arff");
arff.set("decisionAttr", "last");

Cell streamCell.setSource(arff);

streamCell.set("windowLength", 3);
streamCell.open();

do you think its the right way
i did like this but when i convert the data from

..............................
header = DataConverter.headerFrom(type);
DoubleDataTable table= new ArrayListDoubleDataTable(header);
......................................
first line produce error "Debellor to Rseslib conversion error. Unsupported feature type."

more over how can we read the type of the sample i tried it like
SampleType t=StreamCell.open().sampleType;
is there any other way to get type for use in this code header = DataConverter.headerFrom(type);


Anxiously Waiting for your kind reply
Thanks
Muhammad Zia ur Rehman
zia
 
Posts: 4
Joined: Tue Apr 19, 2011 10:57 am

Re: Debellor-Rseslib data conversion

Postby Marcin » Wed Apr 20, 2011 2:52 pm

Hi Zia,
thanks for interest in Debellor. What version do you use? Taken from Debellor website or directly from svn?
-Marcin
Marcin
 
Posts: 115
Joined: Fri Oct 09, 2009 6:45 pm

Re: Debellor-Rseslib data conversion

Postby zia » Wed Apr 20, 2011 4:13 pm

Hello,
thanks for reply
Actually i am using Debellor 1.0 downloded it from the website http://www.debellor.org/
Waiting for your suggestions/Guidance about my problem

Regards.
Zia
zia
 
Posts: 4
Joined: Tue Apr 19, 2011 10:57 am

Re: Debellor-Rseslib data conversion

Postby Marcin » Fri Apr 29, 2011 11:54 am

Hi Zia,
Could you clarify a bit more what you're trying to do:
zia wrote:Cell streamCell.setSource(arff);

How is declared 'streamCell' object? What class is it?

zia wrote:header = DataConverter.headerFrom(type);
DoubleDataTable table= new ArrayListDoubleDataTable(header);

What 'DataConverter' do you use here? There are two of them: for Weka and Rseslib. What's your goal - do you want to convert all output data to Rseslib objects?

best, Marcin
Marcin
 
Posts: 115
Joined: Fri Oct 09, 2009 6:45 pm

Re: Debellor-Rseslib data conversion

Postby zia » Wed May 04, 2011 7:30 pm

thanks once again
actually in you paper
"Debellor: A Data Mining Platform with Stream Architecture"
you have suggested to use stream architecture for data mining like in figure 11 and 12 of the paper which is

Code: Select all
ArffReader->wekaFilter->buffer->timeWindows->Kmeans (or any other algorithm)


i just want to replicate it and use the reslib algorithm like C4.5
i cannot use the stream architecture although in the example with debellor you have shown how to use weka and reseslib algos. but withoug stream architecture.
if you guide me how to use the stream architecture then it would be helpful for me thanks

Regards
Zia
zia
 
Posts: 4
Joined: Tue Apr 19, 2011 10:57 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron