"An error in aggregation operator kmeans"

ShubhaShubha MemberPosts:139Guru
edited June 2019 inHelp
Hi,

This is my code:





















I get the error that the attribute 'cluster' does not exist. But after running the kmeans, a new attribute 'cluster' was created in the exampleset. So, why is this error? Or is it reading the initial input example set ? How do i tell RM to read that particular data which was generated by applying the kmeans?

Thanks, Shubha
Tagged:

Answers

  • TobiasMalbrechtTobiasMalbrecht Moderator, Employee, MemberPosts:294RM Product Management
    Hi Shubha,

    this error happens because the [tt]Aggregation[/tt] operator only searches through the regular attributes when matching attribute names. We will add a parameter [tt]work_on_special[/tt] in the near future. Until then you have to change the type of the cluster attribute to regular before applying the [tt]Aggregation[/tt].

    Kind regards,
    Tobias
  • ShubhaShubha MemberPosts:139Guru
    Thanks Tobias! That exactly did my job...

    One more question, can i specicy all the variables namely (att1, att2, att3, att4, att5) in the aggregate function? (in the above code i posted, only att1 is used). I tried by using the regular expression,att.*. But there is an error, "The attribute 'att.*' doesn't exist". I am sure that i am missing something... What could it be?

    Thanks again,
    Shubha
  • TobiasMalbrechtTobiasMalbrecht Moderator, Employee, MemberPosts:294RM Product Management
    Hi Shubha,
    Shubha wrote:

    One more question, can i specicy all the variables namely (att1, att2, att3, att4, att5) in the aggregate function? (in the above code i posted, only att1 is used). I tried by using the regular expression,att.*. But there is an error, "The attribute 'att.*' doesn't exist". I am sure that i am missing something... What could it be?
    You can specify more. You just have to extend the list and therewith specify more than one aggregation attribute and function. Please see the attached code:








    Regards,
    Tobias
  • ShubhaShubha MemberPosts:139Guru
    Thank you very much...
  • ShubhaShubha MemberPosts:139Guru
    Was just thinking if I could avoid adding each variable for aggregation. Instead, can I specify all the variables which needs to be aggregated by a regular expression or so?

    Thanks, Shubha
  • haddockhaddock MemberPosts:849Maven
    Sure
















  • ShubhaShubha MemberPosts:139Guru
    Thanks,

    This does different i guess. But, surely this will answer another question of mine. AttributeAggregation is something which I learnt new today. Thanks.

    What i need was for each group of nominal cluster attribute, i need the average of all the 'att' attributes, (i.e., The above can do averages row-wise, but actually i need column-wise) without actually specifying each of the variables.

    Secondly, unlike 'Aggregation', the operator 'AttributeAggregation' will not perform the operation groupwise.

    Thirdly, if my attrubutes have different names, unlike att1, att2,... i cant use the regular expressions too...


    Thanking you,
    Shubha
  • haddockhaddock MemberPosts:849Maven
    Oh dear, so wrong on so many levels, as the following shows.
























  • ShubhaShubha MemberPosts:139Guru
    Thank you very much...:)Transpose was exactly what i thought too... I was just thinking if the examples/observations were too many,will this method be OK? And also, again trasposing.... Wanted to confirm from you experts, if I am missing some useful operators specially made for these purposes...

    I can also see the application of feature here..:)... Many Thanks for clearing all my queries...



Sign InorRegisterto comment.