Coder Social home page Coder Social logo

is.closed invalid count about arules HOT 5 CLOSED

mhahsler avatar mhahsler commented on May 23, 2024
is.closed invalid count

from arules.

Comments (5)

mhahsler avatar mhahsler commented on May 23, 2024

Please send me code and data to reproduce the problem.

from arules.

clcazer avatar clcazer commented on May 23, 2024

is closed bug.xlsx
require(dplyr)
require(xlsx)

#read data
data <- read.xlsx("data/is closed bug.xlsx", sheetIndex = 1)

#divide dataset by category
Cat1 <- filter(data, cat=="A") %>% select(-cat)
Cat2 <- filter(data, cat=="C") %>% select(-cat)

#create transactions
trans1 <- as(Cat1, "transactions")
trans2 <- as(Cat2, "transactions")

#mine sets
sets1 <- apriori(trans1, parameter=list(support=1/length(trans1),
maxlen=4,
minlen=2,
target="frequent itemsets"))

sets2 <- apriori(trans2, parameter=list(support=1/length(trans2),
maxlen=4,
minlen=2,
target="frequent itemsets"))

inspect(sets1)
inspect(sets2)
#some sets are contained in both with count==1

is.closed(sets1) #no problems
is.closed(sets2) #invalid count error

#invalid count error occurs when count==1 in sets2 but not in sets1
is.closed(sets2[1])
is.closed(sets1[1])

from arules.

mhahsler avatar mhahsler commented on May 23, 2024

Thank you for your example. I have fixed the rounding bug in the support count calculation. A fixed version is on GitHub. The bug fix will be part of the next CRAN release.

from arules.

clcazer avatar clcazer commented on May 23, 2024

Sorry but I still get the same error after downloading from github
install.packages("~/arules-master.zip", repos = NULL, type = "win.binary")

from arules.

mhahsler avatar mhahsler commented on May 23, 2024

It probably takes a whole to rebuild.

from arules.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.