rasbt / mlxtend

A library of extension and helper modules for Python's data analysis and machine learning libraries.
https://rasbt.github.io/mlxtend/
Other
4.82k stars 854 forks source link

antecenant and antecedEnt is platform dependent, E and A in antecedent #431

Closed aashishgahlawat closed 5 years ago

aashishgahlawat commented 5 years ago

If you run

    from mlxtend.frequent_patterns import apriori
    from mlxtend.frequent_patterns import association_rules
    dataframe = apriori(dataframe, min_support=min_support, use_colnames=True)
    dataframe = association_rules(dataframe, metric="lift", min_threshold=min_threshold)

In pycharm sciView the column name in antecedEnt with E while in jupyter notebook name is antecedAnt with A, is the column name specific to platform? Obviously this breaks code. E and A varies. I ran exactly same code on same dataframe and got column names different returnde by association_rules call

rasbt commented 5 years ago

Hi there. Good that you bring that up. I remember that I made a typo early one which I thought I fixed some time ago. I believe “antecedent” is the correct spelling. The reason why you might be getting different results may be because you have different versions installed: would be best if you could compare these via mlxtend.__version__

This with the typo was a bit unfortunate and agree that it’s annoying.

aashishgahlawat commented 5 years ago

mlxtend==0.13.0 This is what pip freeze gives me Probably I have latest pip install mlxtend just installed a few days back, hardly a month

rasbt commented 5 years ago

In pycharm sciView the column name in antecedEnt with E while in jupyter notebook name is antecedAnt with A

I see now what you meant. So you were referring to the jupyter notebooks in the mlxtend repo, from which the HTML is generated? I thought that you meant that you had this issue when you were using mlxtend in a jupyter notebook ...

Anyways, you are right, there was a typo in the mlxtend docs. This is likely because I ran the docs in the jupyter notebooks locally to generate the HTML docs, then realized that there was a typo and updated the mlxtend implementation but forgot to update the documentation afterwards.

antecedEnts should be the correct spelling, and I already updated the docs. Thanks for bringing that up!