- This topic has 4 replies, 4 voices, and was last updated 4 years, 6 months ago by .
Viewing 4 reply threads
Viewing 4 reply threads
You must be logged in to reply to this topic. Login here
Home › Forums › Data mining and machine learning › Archive 2020 › Assignment › association rule mining
Hi all,
I have a problem in converting CSV file into transaction data using as,(.. transaction)
I try many ways to create transaction data but it didn’t work. Can anyone help me giving some hint or idea for doing this?
Thank you!
Transaction function allow only factor variable and I found that X variable (which is the first one) is not compatible. please change X variable to be factor type before transforming the data frame into a transaction.
use syntax: afi$x <- as.factor(afi$x)
column( X) is not logical or a factor. Discretize the columns first.
There are two methods for it. One is as off @Thanachol.
Second is
afi$X <- discretize(afi$X) then you can create transactions
trans <- as (afi,”transactions”)
Or for this data only. You can remove with index because it should not include in analysis (X is just serial number).
You can do it by indexing. It will not raise any error during transactions.
tarns <- as (afi[,-1], “transactions”)
Thank you for all answers you’ve shared ka.
It seems that discretizeDF()
is more perfect, but you have to visualize.
Then fix some columns with as.factor(data$row)
.
You must be logged in to reply to this topic. Login here