RE: Apriori Algorithm

2021-03-07 Thread Avi Gross via Python-list
Speaking for myself, that is a very significant piece of homework to do and
unless you do quite a bit and get stuck and ask for help in some aspect,
this is not the place to ask if anyone wishes to do all the work.

The assignment seems to want you to write your own code to implement the
algorithm. So unless the outlines of the algorithm were taught in class or a
textbook, you need to find the algorithm by searching the internet and you
may find places with more or less of a good description:

https://en.wikipedia.org/wiki/Apriori_algorithm

Once you find one you need to choose a language you are able to program in
from the list of choices and see what libraries of allowed components are
likely to be helpful so you do not have to start from nothing but the
basics. If you decide on JAVA or C++, this is not the forum to ask.

As I noted earlier, your data will need to be read in by any program and
made into whatever format your algorithm uses. What this is will be up to
you but note you have a collection of collections where you are told of two
very specific datasets that must be handled by the algorithm. So your
algorithm might be asked to just handle interest, or perhaps also character
strings and arbitrary items. You need to know what is expected so you design
your code to handle it. Given the nature of the data you show, it should not
use anything that holds a fixed number of items as the number of items per
line varies and presumably it should handle any number of such lines.

It looks like for a basic version they suggest a particular parameter be
included and they want an extended version that does more and another that
does even more.

Looks like a serious amount of work and way too detailed to expect anything
but this kind of answer. Many people get paid hundreds of dollars per hour
to do things like this and if you learn how, you could be one.

Presumably your class has taught you most of what is needed to understand
the assignment and how to find out more. I, like most others here, have not
been in the class or had any reason to think about this problem before. Any
voluntary role here is generally to help with questions about fairly
specific python code as compared to big projects.

Good luck!

-Original Message-
From: Python-list  On
Behalf Of sarang shah
Sent: Sunday, March 7, 2021 5:23 PM
To: python-list@python.org
Subject: Re: Apriori Algorithm

On Sunday, March 7, 2021 at 11:55:21 AM UTC-6, Avi Gross wrote:
> I apologize for my earlier snide remark as I was not then aware there 
> was an algorithm called apriori based on the Latin term and wondered 
> if someone was pulling someone's leg, in advance.
> 
> Someone has posted a pointer to Python code that is supposed to do 
> that. If that is suitable, then the serious task is to read what they say
and use it.
> I note the data you show below is ambiguous and not in the format that 
> code asks for.
> 
> Are you saying each line I see of what looks like integers is a 
> grouping you want to contrast to other such lines in the algorithm? I 
> doubt it can be used as is but needs to become some kind of data 
> structure such as a list of tuples or whatever the algorithm wants.
> -Original Message-
> From: Python-list  
> On Behalf Of dn via Python-list
> Sent: Sunday, March 7, 2021 3:09 AM
> To: pytho...@python.org
> Subject: Re: Apriori Algorithm
> 
> On 07/03/2021 20.56, sarang shah wrote:
> > I have this dataset in a text file I need to make an apriori 
> > algorithm
> based on it. Please help. 
> > 
> > 25 52 164 240 274 328 368 448 538 561 630 687 730 775 825 834
> > 39 120 124 205 401 581 704 814 825 834
> > 35 249 674 712 733 759 854 950
> > 39 422 449 704 825 857 895 937 954 964
> > 15 229 262 283 294 352 381 708 738 766 853 883 966 978
> > 26 104 143 320 569 620 798
> > 7 185 214 350 529 658 682 782 809 849 883 947 970 979
> > 227 390
> > 71 192 208 272 279 280 300 333 496 529 530 597 618 674 675 720 855 
> > 914 932
> 
> > 183 193 217 256 276 277 374 474 483 496 512 529 626 653 706 878 939
> > 161 175 177 424 490 571 597 623 766 795 853 910 960
> > 125 130 327 698 699 839
> > 392 461 569 801 862
> > 27 78 104 177 733 775 781 845 900 921 938
> > 101 147 229 350 411 461 572 579 657 675 778 803 842 903
> > 71 208 217 266 279 290 458 478 523 614 766 853 888 944 969
> > 43 70 176 204 227 334 369 480 513 703 708 835 874 895
> > 25 52 278 730
> > 151 432 504 830 890
> Great! 
> For what purpose - is this a 'homework assignment'? 
> What code do you have so far? 
> 
> --
> Regards,
> =dn
> --
> https://mail.python.org/mailman/listinfo/python-list




Yes. Each line is a group set. 

a.Pleaseimplement analgorithm of your choice (Apriori, or FP-Tree) tofind
frequent itemsets. You can importstan

Re: Apriori Algorithm

2021-03-07 Thread sarang shah
On Sunday, March 7, 2021 at 11:55:21 AM UTC-6, Avi Gross wrote:
> I apologize for my earlier snide remark as I was not then aware there was an 
> algorithm called apriori based on the Latin term and wondered if someone was 
> pulling someone's leg, in advance. 
> 
> Someone has posted a pointer to Python code that is supposed to do that. If 
> that is suitable, then the serious task is to read what they say and use it. 
> I note the data you show below is ambiguous and not in the format that code 
> asks for. 
> 
> Are you saying each line I see of what looks like integers is a grouping you 
> want to contrast to other such lines in the algorithm? I doubt it can be 
> used as is but needs to become some kind of data structure such as a list of 
> tuples or whatever the algorithm wants.
> -Original Message- 
> From: Python-list  On
> Behalf Of dn via Python-list 
> Sent: Sunday, March 7, 2021 3:09 AM 
> To: pytho...@python.org 
> Subject: Re: Apriori Algorithm 
> 
> On 07/03/2021 20.56, sarang shah wrote:
> > I have this dataset in a text file I need to make an apriori algorithm 
> based on it. Please help. 
> > 
> > 25 52 164 240 274 328 368 448 538 561 630 687 730 775 825 834 
> > 39 120 124 205 401 581 704 814 825 834 
> > 35 249 674 712 733 759 854 950 
> > 39 422 449 704 825 857 895 937 954 964 
> > 15 229 262 283 294 352 381 708 738 766 853 883 966 978 
> > 26 104 143 320 569 620 798 
> > 7 185 214 350 529 658 682 782 809 849 883 947 970 979 
> > 227 390 
> > 71 192 208 272 279 280 300 333 496 529 530 597 618 674 675 720 855 914 932 
> 
> > 183 193 217 256 276 277 374 474 483 496 512 529 626 653 706 878 939 
> > 161 175 177 424 490 571 597 623 766 795 853 910 960 
> > 125 130 327 698 699 839 
> > 392 461 569 801 862 
> > 27 78 104 177 733 775 781 845 900 921 938 
> > 101 147 229 350 411 461 572 579 657 675 778 803 842 903 
> > 71 208 217 266 279 290 458 478 523 614 766 853 888 944 969 
> > 43 70 176 204 227 334 369 480 513 703 708 835 874 895 
> > 25 52 278 730 
> > 151 432 504 830 890
> Great! 
> For what purpose - is this a 'homework assignment'? 
> What code do you have so far? 
> 
> -- 
> Regards, 
> =dn
> -- 
> https://mail.python.org/mailman/listinfo/python-list




Yes. Each line is a group set. 

a.Pleaseimplement analgorithm of your choice (Apriori, or FP-Tree) tofind 
frequent itemsets. You can importstandardlibraries/modules, but thealgorithm 
should be written by yourself. Min-support should be a user input parameter. 
Two sample of transaction datasets, Dataset1and Dataset2, are providedto test 
if your program works correctly.You can usePython, Java or C++.

 b.  Extend your program to output all the maximal frequent itemsets and closed 
frequent itemsets. 
c.  Extend your program to output all the association rules. Min-Confidence 
should be a user input parameter. For all the association rules, output 
measures include support, confidence, lift, all-confidence and cosine.


-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Apriori Algorithm

2021-03-07 Thread Avi Gross via Python-list
I apologize for my earlier snide remark as I was not then aware there was an
algorithm called apriori based on the Latin term and wondered if someone was
pulling someone's leg, in advance.

Someone has posted a pointer to Python code that is supposed to do that. If
that is suitable, then the serious task is to read what they say and use it.
I note the data you show below is ambiguous and not in the format that code
asks for.

Are you saying each line I see of what looks like integers is a grouping you
want to contrast to other such lines in the algorithm? I doubt it can be
used as is but needs to become some kind of data structure such as a list of
tuples or whatever the algorithm wants.

-Original Message-
From: Python-list  On
Behalf Of dn via Python-list
Sent: Sunday, March 7, 2021 3:09 AM
To: python-list@python.org
Subject: Re: Apriori Algorithm

On 07/03/2021 20.56, sarang shah wrote:
> I have this dataset in a text file I need to make an apriori algorithm
based on it. Please help.
> 
> 25 52 164 240 274 328 368 448 538 561 630 687 730 775 825 834 
> 39 120 124 205 401 581 704 814 825 834 
> 35 249 674 712 733 759 854 950 
> 39 422 449 704 825 857 895 937 954 964 
> 15 229 262 283 294 352 381 708 738 766 853 883 966 978 
> 26 104 143 320 569 620 798 
> 7 185 214 350 529 658 682 782 809 849 883 947 970 979 
> 227 390 
> 71 192 208 272 279 280 300 333 496 529 530 597 618 674 675 720 855 914 932

> 183 193 217 256 276 277 374 474 483 496 512 529 626 653 706 878 939 
> 161 175 177 424 490 571 597 623 766 795 853 910 960 
> 125 130 327 698 699 839 
> 392 461 569 801 862 
> 27 78 104 177 733 775 781 845 900 921 938 
> 101 147 229 350 411 461 572 579 657 675 778 803 842 903 
> 71 208 217 266 279 290 458 478 523 614 766 853 888 944 969 
> 43 70 176 204 227 334 369 480 513 703 708 835 874 895 
> 25 52 278 730 
> 151 432 504 830 890 


Great!
For what purpose - is this a 'homework assignment'?
What code do you have so far?

-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Apriori Algorithm

2021-03-07 Thread dn via Python-list
On 07/03/2021 20.56, sarang shah wrote:
> I have this dataset in a text file I need to make an apriori algorithm based 
> on it. Please help.
> 
> 25 52 164 240 274 328 368 448 538 561 630 687 730 775 825 834 
> 39 120 124 205 401 581 704 814 825 834 
> 35 249 674 712 733 759 854 950 
> 39 422 449 704 825 857 895 937 954 964 
> 15 229 262 283 294 352 381 708 738 766 853 883 966 978 
> 26 104 143 320 569 620 798 
> 7 185 214 350 529 658 682 782 809 849 883 947 970 979 
> 227 390 
> 71 192 208 272 279 280 300 333 496 529 530 597 618 674 675 720 855 914 932 
> 183 193 217 256 276 277 374 474 483 496 512 529 626 653 706 878 939 
> 161 175 177 424 490 571 597 623 766 795 853 910 960 
> 125 130 327 698 699 839 
> 392 461 569 801 862 
> 27 78 104 177 733 775 781 845 900 921 938 
> 101 147 229 350 411 461 572 579 657 675 778 803 842 903 
> 71 208 217 266 279 290 458 478 523 614 766 853 888 944 969 
> 43 70 176 204 227 334 369 480 513 703 708 835 874 895 
> 25 52 278 730 
> 151 432 504 830 890 


Great!
For what purpose - is this a 'homework assignment'?
What code do you have so far?

-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


Apriori Algorithm

2021-03-07 Thread sarang shah
I have this dataset in a text file I need to make an apriori algorithm based on 
it. Please help.

25 52 164 240 274 328 368 448 538 561 630 687 730 775 825 834 
39 120 124 205 401 581 704 814 825 834 
35 249 674 712 733 759 854 950 
39 422 449 704 825 857 895 937 954 964 
15 229 262 283 294 352 381 708 738 766 853 883 966 978 
26 104 143 320 569 620 798 
7 185 214 350 529 658 682 782 809 849 883 947 970 979 
227 390 
71 192 208 272 279 280 300 333 496 529 530 597 618 674 675 720 855 914 932 
183 193 217 256 276 277 374 474 483 496 512 529 626 653 706 878 939 
161 175 177 424 490 571 597 623 766 795 853 910 960 
125 130 327 698 699 839 
392 461 569 801 862 
27 78 104 177 733 775 781 845 900 921 938 
101 147 229 350 411 461 572 579 657 675 778 803 842 903 
71 208 217 266 279 290 458 478 523 614 766 853 888 944 969 
43 70 176 204 227 334 369 480 513 703 708 835 874 895 
25 52 278 730 
151 432 504 830 890 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Apriori Algorithm

2021-03-06 Thread Paul Bryan
Google tells me this:
https://github.com/tommyod/Efficient-Apriori

On Sat, 2021-03-06 at 18:46 -0800, sarang shah wrote:
> I want to make apriori algorithm from start. Anybody have any
> reference file?

-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Apriori Algorithm

2021-03-06 Thread Avi Gross via Python-list
"I want to make apriori algorithm from start. Anybody have any
reference file?"

Excellent question. Based on everything you shared, I think all I can offer
is that whatever you do, do not make the aposteriori version.

Or, you could consider asking a real question with enough detail that maybe
someone understanding it will give you a hint in advance.

-Original Message-
From: Python-list  On
Behalf Of sarang shah
Sent: Saturday, March 6, 2021 9:47 PM
To: python-list@python.org
Subject: Apriori Algorithm

I want to make apriori algorithm from start. Anybody have any reference
file?
-- 
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Apriori Algorithm

2021-03-06 Thread sarang shah
I want to make apriori algorithm from start. Anybody have any reference file?
-- 
https://mail.python.org/mailman/listinfo/python-list