Skip to main content

Identify a set of L patterns from a binary class dataset

Project description

LPatternIdentification

The formal mathematical definition of the l-Pattern Identification Problem is as follows:

Input:

A finite alphabet Σ, two disjoint sets Good, Bad ⊆ Σn of strings and an integer l > 0

Problem question:

Is there a set of P patterns such that: |P| ≤ l and P → (Good, Bad)?

1. Install:

''' pip install LPatternIdentification '''

2. Load:

''' from LPatternIdentification import feature_set, split_data, get_patterns_from_feature_set, reduce_pattern_set '''

3. Prepare data:

Sort dataset by class labels

Separate observations into numpy ndarray

Separate labels into list

4. Find set of features

''' features = feature_set(observations, labels) '''

5. Split observations by classes

Here, classes are named 'Good' and 'Bad', the 'Good' class being the class of our interest.

''' split_point, Good, Bad = split_data(elections_X, elections_y) '''

6. Return a set of patterns that contain the features and are Good

''' Patterns = get_patterns_from_feature_set(Good, elections_feature_set) '''

7. Identify 'L' number of patterns such that all patterns are uniquely Good and not similar to Bad patterns

''' Patterns_identified = reduce_pattern_set(Patterns, Bad, 7) '''

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

LPatternIdentification-0.0.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

LPatternIdentification-0.0.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file LPatternIdentification-0.0.1.tar.gz.

File metadata

  • Download URL: LPatternIdentification-0.0.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.8.8

File hashes

Hashes for LPatternIdentification-0.0.1.tar.gz
Algorithm Hash digest
SHA256 61390d5acc4f78d2e543368c5e1dd44af257468633e5dab556f795175417f82a
MD5 be300d0c860c5f07d0a0ac6610de5ff2
BLAKE2b-256 0fd5422afde37fb0cdac433c5ef3538b346a6a528e02ff3ba342aaae421eed70

See more details on using hashes here.

File details

Details for the file LPatternIdentification-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: LPatternIdentification-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.8.8

File hashes

Hashes for LPatternIdentification-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6fe68982033b7cdba9403f67903815a525a24c535b927a277c9ed324b5e38351
MD5 71898f27b0131b2358e8e4a253b12c30
BLAKE2b-256 7e67974845e30cc2152cd236319e61038a7e2233f265b6f5f4b7b7b9717d048f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page