2

I am running the formula that is given below in R

rules <- apriori(B4_Temp,
  parameter = list(minlen=2, supp=0.001, conf=0.6,target="rules"),
  appearance = list(rhs=c("Location Info=Level1"),default="lhs"),
  control = list(verbose=F))

I am getting this error as:

Error in asMethod(object) : 
  Location Info=Level1 is an unknown item label,
  Location Info=Entrance is an unknown item label

But I have those values in the data set. What is the problem?

rcs
  • 67,191
  • 22
  • 172
  • 153
user3292373
  • 483
  • 3
  • 8
  • 25

1 Answers1

1

I was with the same problem. Take a look at B4_Temp and be sure that your dataset is represented like you are naming there on rhs=c("Location Info=Level1"). Maybe this data's representation is not consistent with your dataset in B4_Temp.

Just remember: the meaning of "item label" is all about the "stuff" you have stored in your data set. If this "stuff" is not equal to the parameter you are trying to set on rhs an error will happen.

It happened with me because my equivalent B4_Temp was with an error in the way I put the "stuff" inside it. My separator was a semi-colon but inside of my equivalent B4_temp there were some characters that was not consistent with the context; for example, there was also the character ".

When I remade my equivalent B4_Temp correctly, I fixed it.

cf-
  • 8,598
  • 9
  • 36
  • 58