djh506 February 2016

CSV file help/ format

new to weka and having this problem. want to convert my excel data to weka.so have done some looking into how to convert to arff. file etc

Excelvan, medichoice & unbranded are 3 pulse oximeters, with PR and SpO2 the readings. i want to get these into weka and possibly detect the type of brand used etc..

just enquiring what layout should it be in, on the excel file.

see attached image.

enter image description here

Answers


Arif February 2016

save as .csv and then add header as:

@relation <some_name>
@attribute person numeric
@attribute spo1 numeric
@attribute pr1 numeric
@attribute spo2 numeric
@attribute pr2 numeric
@attribute spo3 numeric
@attribute pr3 numeric
@data

<your comma separated data will be here>


KevinD February 2016

From what I understand here, you're dealing with a classification task. To do that, you need two things for each measure (i.e instance) : what features describes your instance (the atributes), and to which class it belongs.

You should format your file according to this :

attribute 1 | attribute 2 | ... | class
attribute 1 | attribute 2 | ... | class

In your problem, your attributes are SpO2 and PR, and your class, the brand of the oximeter.

Hence the following kind of table :

SpO2 | PR | Class
xx   | yy | Excelvan
aa   | bb | Unbranded
....

Finally, you can save it in csv file format, and open it directly from Weka's experimenter (don't forget to check that the specified format when you open the file is csv, or you will not be able to open it).

Post Status

Asked in February 2016
Viewed 3,535 times
Voted 4
Answered 2 times

Search




Leave an answer