Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
SimilarityMeasure initialization problem
siamak_want
Member Posts: 98 Contributor II
HI all,
I have a dataset with an id column of type "text" named "att24754".
I have a problem with initialization of Cosine similarity measure. Calling the following code:
"The example set contains non-numerical attribute att24754 which is not allowed for value based similarities."
and the strange thing is that "att24754" has set to the "id" of my exampleset. So I expect it to not be involved in similarity calculation as an "special attribute". But it will be involved in the similarity computation and so RM generates the error. I know all of the attributes should be numerical except my id. Does anyone know what's going wrong here?
Any idea would be greatly appreciated.
thanks.
I have a dataset with an id column of type "text" named "att24754".
I have a problem with initialization of Cosine similarity measure. Calling the following code:
Now the problem is come up in calling init "method":
clusteredSet=clusteredSetInput.getData(ExampleSet.class);
similarityMeasure= new CosineSimilarity();
similarityMeasure.init(clusteredSet);
"The example set contains non-numerical attribute att24754 which is not allowed for value based similarities."
and the strange thing is that "att24754" has set to the "id" of my exampleset. So I expect it to not be involved in similarity calculation as an "special attribute". But it will be involved in the similarity computation and so RM generates the error. I know all of the attributes should be numerical except my id. Does anyone know what's going wrong here?
Any idea would be greatly appreciated.
thanks.
Tagged:
0
Answers
You may also check your attributes in your source code. Basically the init method iterates over the attributes object of the example set which returns only regular attributes.