Skip to main content

Find-S algorithm is a Machine Learning Algorithm that finds the most specific hypothesis that fits all the positive examples.

Project description

Find-S Algorithm

Find-S algorithm is a Machine Learning Algorithm that finds the most specific hypothesis that fits all the positive examples.


Installation

Install directly from my PyPi

pip install classic-FindS

Or Clone the Repository and install

python3 setup.py install

Parameters

* X_train


The Training Set array consisting of Features.

* y_train


The Training Set array consisting of Outcome.

Attributes

* fit(X_train, y_train)


Fit the Training Set to the model.

* predict(y_test)


Predict the Test Set Results.

Documentation

1. Install the package

pip install classic_FindS

2. Import the library

from classic_FindS import FindS

3. Create an object for FindS class

fs = FindS()

4. Fit your Training Set to the model

fs.fit(X_train, y_train)

5. Predict your Test Set results

y_pred = fs.predict(y_test)


Example Code

1. Import the dataset and Preprocess

  • import numpy as np
  • import pandas as pd
  • dataset = pd.read_csv('Covid-19_Data.csv')
  • result = {'Yes':1, 'No':0}
  • dataset['Covid_19'] = dataset['Covid_19'].map(result)
  • X = dataset.iloc[:, 0:5].values
  • y = dataset.iloc[:, -1].values
  • from sklearn.model_selection import KFold
  • kf = KFold(n_splits=10)
  • for train_index, test_index in kf.split(X,y):
    • X_train, X_test = X[train_index], X[test_index]
    • y_train, y_test = y[train_index], y[test_index]

2. Use the Find-S Library

  • from classic_FindS import FindS
  • fs = FindS()
  • S_hypothesis = fs.fit(X_train, y_train)
  • print("Specific Hypothesis : ", S_hypothesis)
  • y_pred = fs.predict(X_test)

Footnotes

You can find the code at my Github.

Connect with me on Social Media

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

classic_FindS-2.0.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

classic_FindS-2.0.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file classic_FindS-2.0.0.tar.gz.

File metadata

  • Download URL: classic_FindS-2.0.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for classic_FindS-2.0.0.tar.gz
Algorithm Hash digest
SHA256 5fb799f184816d533c96f4614f1e49ac8a2cb968b3d5d1bec98c925d79980f3d
MD5 213e5ae1649f33cb83608c7dff523dcf
BLAKE2b-256 6b580a7bce9155d17595a8f37994287e0cb637b28eb5fb65092ba24b55e4c2d5

See more details on using hashes here.

File details

Details for the file classic_FindS-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: classic_FindS-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for classic_FindS-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9577c6c31a647795f495fbbd86aab9eb58a03ff7cf503e4051fb7f6010959e34
MD5 f73c52b1629ead838f210202e593299b
BLAKE2b-256 0af347036a6eb5f179606de5aead7e2f80a944da4d55d8aaf049303794e88b60

See more details on using hashes here.

Supported by

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