Skip to content

Commit

Permalink
new version.
Browse files Browse the repository at this point in the history
  • Loading branch information
mhahsler committed May 21, 2023
1 parent 421383f commit 4331f9b
Show file tree
Hide file tree
Showing 10 changed files with 2,176 additions and 4,706 deletions.
3,220 changes: 1,048 additions & 2,172 deletions examples/arules.html

Large diffs are not rendered by default.

2,786 changes: 616 additions & 2,170 deletions examples/arules.ipynb

Large diffs are not rendered by default.

204 changes: 117 additions & 87 deletions examples/arulesViz.html

Large diffs are not rendered by default.

231 changes: 119 additions & 112 deletions examples/arulesViz.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/graph.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/rules.html

Large diffs are not rendered by default.

26 changes: 24 additions & 2 deletions src/arulespy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
__version__ = '0.0.2'
__version__ = '0.1.0'

from .arules import parameters, ItemMatrix, Rules, Itemsets, Transactions, transactions, r, a2p, encode, concat, apriori, eclat, addComplement, sort, sample, unique, itemFrequency, items, lhs, rhs, quality, addQuality, info, interestMeasure, discretizeDF, is_closed, is_maximal, is_generator, is_redundant, is_significant, is_superset, is_subset, labels, itemInfo, random_transactions
import rpy2.robjects as ro
import rpy2.robjects.packages as packages
import os

os.makedirs(ro.r('Sys.getenv("R_LIBS_USER")')[0], exist_ok=True)
ro.r('.libPaths(c(Sys.getenv("R_LIBS_USER"), .libPaths()))')

utils = packages.importr('utils')
if not ro.packages.isinstalled('arules'):
print("Installing R package arules.")
utils.install_packages('arules',
repos='https://cloud.r-project.org/',
lib = ro.r('Sys.getenv("R_LIBS_USER")[1]'))


if not ro.packages.isinstalled('arulesViz'):
print("Installing R package arulesViz (plus dependencies).")
utils.install_packages('arulesViz',
repos='https://cloud.r-project.org/',
lib = ro.r('Sys.getenv("R_LIBS_USER")[1]'))


from .arules import parameters, set, Associations, ItemMatrix, Rules, Itemsets, Transactions, R, a2p, encode, concat, apriori, eclat, discretizeDF, random_transactions
from .arulesViz import plot, inspectDT
Loading

0 comments on commit 4331f9b

Please sign in to comment.