cs-arm-apriori 1.0.1

Apriori Association Rule Mining

Install-Package cs-arm-apriori -Version 1.0.1
dotnet add package cs-arm-apriori --version 1.0.1
<PackageReference Include="cs-arm-apriori" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add cs-arm-apriori --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

cs-arm

Associative Rule Mining in C#

The current project implements the Apriori algorithm for associative rule mining

Apriori algorithm is a frequent pattern mining algorithm that finds frequent patterns with support threshold defined by user.

Install

Run the following nuget command:

Install-Package cs-arm-apriori

Usage

The sample code below shows how to use Apriori to find the frequent item sets:

using System;
using System.Collections.Generic;
using ARM;

namespace project_demo
{
    class Program
    {
        static void Main(string[] args)
        {
            List<HashSet<char>> database = new List<HashSet<char>>();
            database.Add(new HashSet<char>(new char[] { 'a', 'c', 'd', 'e' }));
            database.Add(new HashSet<char>(new char[] { 'a', 'b', 'e' }));
            database.Add(new HashSet<char>(new char[] { 'b', 'c', 'e' }));
            database.Add(new HashSet<char>(new char[] { 'b', 'c', 'e' }));

            Apriori<char> method = new Apriori<char>();
            Dictionary<int, List<ItemSet<char>>> itemsets = method.BuildFreqItemSet(database, new List<char>() { 'a', 'b', 'c', 'd', 'e' }, 2);
            foreach (int supportLevel in itemsets.Keys)
            {
                List<ItemSet<char>> itemsetList = itemsets[supportLevel];
                foreach (ItemSet<char> itemset in itemsetList)
                {
                    Console.WriteLine("{0} (support: {1})", itemset, itemset.SupportLevel);
                }

            }
        }
    }
}

cs-arm

Associative Rule Mining in C#

The current project implements the Apriori algorithm for associative rule mining

Apriori algorithm is a frequent pattern mining algorithm that finds frequent patterns with support threshold defined by user.

Install

Run the following nuget command:

Install-Package cs-arm-apriori

Usage

The sample code below shows how to use Apriori to find the frequent item sets:

using System;
using System.Collections.Generic;
using ARM;

namespace project_demo
{
    class Program
    {
        static void Main(string[] args)
        {
            List<HashSet<char>> database = new List<HashSet<char>>();
            database.Add(new HashSet<char>(new char[] { 'a', 'c', 'd', 'e' }));
            database.Add(new HashSet<char>(new char[] { 'a', 'b', 'e' }));
            database.Add(new HashSet<char>(new char[] { 'b', 'c', 'e' }));
            database.Add(new HashSet<char>(new char[] { 'b', 'c', 'e' }));

            Apriori<char> method = new Apriori<char>();
            Dictionary<int, List<ItemSet<char>>> itemsets = method.BuildFreqItemSet(database, new List<char>() { 'a', 'b', 'c', 'd', 'e' }, 2);
            foreach (int supportLevel in itemsets.Keys)
            {
                List<ItemSet<char>> itemsetList = itemsets[supportLevel];
                foreach (ItemSet<char> itemset in itemsetList)
                {
                    Console.WriteLine("{0} (support: {1})", itemset, itemset.SupportLevel);
                }

            }
        }
    }
}

Release Notes

Apriori Association Rule Mining in .NET 4.6.1

Dependencies

This package has no dependencies.

Version History

Version Downloads Last updated
1.0.1 326 4/29/2018