"NewBe question: Converting CSV output to ExampleSet"
Cleo
New Altair Community Member
Hello,
I am just getting started with Rapidminer version 5.
I have a csv file, with 7 columns and a about 1000 rows of data. Within the process I added Import\Data\Read CSV. I then connect the Read CSV to the csv file of interest via the filename parameter. Then I added Modeling\Classification and Regression\Neural Net Training\Neural Net object and connect the two. When I run the example I receive the error message Input example set must have special attribute label. Fix Select an attribute whose role should be changed to label...
The csv file has one header row containing 7 labels. They are a combination of int, real numbers and one date field. I am not sure how to convey this information into csv file or into rapidminer itself. I see the fields label name, label column etc within the parameters but am not sure how I could use this to help me convert the csv output into an exampleSet.
Thanks in advance,
Cleo
I am just getting started with Rapidminer version 5.
I have a csv file, with 7 columns and a about 1000 rows of data. Within the process I added Import\Data\Read CSV. I then connect the Read CSV to the csv file of interest via the filename parameter. Then I added Modeling\Classification and Regression\Neural Net Training\Neural Net object and connect the two. When I run the example I receive the error message Input example set must have special attribute label. Fix Select an attribute whose role should be changed to label...
The csv file has one header row containing 7 labels. They are a combination of int, real numbers and one date field. I am not sure how to convey this information into csv file or into rapidminer itself. I see the fields label name, label column etc within the parameters but am not sure how I could use this to help me convert the csv output into an exampleSet.
Thanks in advance,
Cleo
0
Answers
-
Upon futher reading in within the documentation I solved my problem. Thanks0
-
Can you explain what you did? I'm having the same problem0
-
Sure,
In the welcome screen of RapidMiner I click on "OpenTemplate" Then Data Input+Decision Tree Learning
In there I click on Start Data Loading WIzard. Then on the folder and loaded my csv file.
Clicked Next,
It gave me the option to "Use first row for column names" which I selected and pressed next.
I then defined the attribute value type according to my data.
I then defined the attribute type accourding to my data. (I do not want to elerabet on the difference between the various attribute types because I am just starting and I probably would give you misinformation)
THen I defined the result file. This converst the csv file into a AML file and makes it easier to work with.
Good luck and I hope this helps,
Cleo
0 -
Hi,
just to clarify the things a bit: The label does not mean the name of one attribute. The label is a special role for one attribute, so that it becomes the target of the following analysis. This might be some sort of regression or classification task. In machine learning such attributes are called label, because these examples have been labeled with some sort of information, for example the class they belong to. Since in supervised learning, this must (mostly) be done by humans, this can be imagined like pinning a post-it on each example...
Greetings,
Sebastian0 -
I ran into the same issue...
It is possible to do it without the "open template" Cleo mentioned, just use the operator "Read AML" and it will give you the same data-input box.
Is there an operator to "convert" from csv to appropriate data for a neural net input, i.e. to automate this AML-conversion?
I tried a SetRole operator, but it says it cannot find the attribute (I have a csv file with attribute names on the first row).
Thanks!
Jörg0 -
Hi,
you could use the CSVExampleSource operator for reading the csv file inside your process. It provides a parameter "first_row_as_names", which should be self-explanatory
You might save the file inside the process either as CSV or better as AML file using the CSVExampleSetWriter respectively ExampleSetWriter.
Greetings,
Sebastian0