Test example set attributes should be equal to OR Superset of Training example set Rapidminer SVM

眉间皱痕 提交于 2019-12-20 06:04:15

问题


I am new to Rapid Miner and using SVM Linear in it. My model is as:


I made Training Example set which consist of 3552 examples and just 2 attributes and I am doing nominal to numeric conversion, passing through SVM Linear model and then connecting model output in applying model. This is fine.

In Test Example set, I have 735 examples with 2 attributes and doing nominal to numeric conversion and then applying this converted Example set to Applying Model. At this stage I am getting an error when I run the process, which says that:

I searched a lot about this but did not get the right direction. I will be thankful for your help.


回答1:


The Nominal to Numeric operator will make new attributes whose names will be derived from the values of the input attributes. This happens when dummy encoding is used for the coding type parameter. If the test data contains different values when compared to the training data then the resulting attributes will be different.

To confirm this is the problem, set a breakpoint after the Nominal to Numeric operators and examine the attributes of each example set.

You can change how the operator works by setting the parameter to unique integers but this might not suit the problem you are trying to solve.

One possible way to solve it is to combine the two data sets then split them again. This has the effect of creating allowed levels for each nominal attribute even though the data may not have an example of the value. Each split can then be used with the Nominal to Numeric operator and it should create all the required attributes.



来源:https://stackoverflow.com/questions/34151722/test-example-set-attributes-should-be-equal-to-or-superset-of-training-example-s

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!