jirifilip / pyARC

An implementation of CBA (Classification Based on Assocation) algorithm
23 stars 25 forks source link

Default example returns empty rule list #23

Open kliegr opened 4 years ago

kliegr commented 4 years ago

The default example on the project home page returns an empty rule list. The second advanced example works.

from pyarc import CBA, TransactionDB
import pandas as pd

data_train = pd.read_csv("iris.csv")
data_test = pd.read_csv("iris.csv")

txns_train = TransactionDB.from_DataFrame(data_train)
txns_test = TransactionDB.from_DataFrame(data_test)

cba = CBA(support=0.20, confidence=0.5, algorithm="m1")
cba.fit(txns_train)

accuracy = cba.rule_model_accuracy(txns_test) 
Sandy4321 commented 4 years ago

good question

by the way @kliegr do you have progress with new R package ?