Candidate-Elimination Algorithm is a Machine Learning Algorithm that builds the version space from Specific Hypothesis and General Hypothesis.
Project description
Candidate-Elimination Algorithm
Candidate-Elimination Algorithm is a Machine Learning Algorithm that builds the version space from Specific Hypothesis and General Hypothesis.
Installation
Install directly from my PyPi
pip install classic-CandidateElimination
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_CandidateElimination import Candidate_Elimination
3. Create an object for FindS class
ce = Candidate_Elimination()
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_CandidateElimination import Candidate_Elimination
- ce = Candidate_Elimination()
- ce.fit(X_train, y_train)
- y_pred = ce.predict(X_test)
Footnotes
You can find the code at my Github.
Connect with me on Social Media
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file classic_CandidateElimination-2.0.0.tar.gz
.
File metadata
- Download URL: classic_CandidateElimination-2.0.0.tar.gz
- Upload date:
- Size: 3.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9521c3226d281485b29e3c57f478cd98e4efc2c892544ad1253ce609263ad96c |
|
MD5 | e3d0a8e3ee77ea03bf65e4188feee4dc |
|
BLAKE2b-256 | b642c734d145b485a690c88542ac7f86d13569dd4decd3645a017887aaccbb92 |
File details
Details for the file classic_CandidateElimination-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: classic_CandidateElimination-2.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62c64748ab5e7f90771bf6571df254c7289757c43b2909ed31a07b39bc253869 |
|
MD5 | dc76d486bcdba95cdd1d612f45e263fc |
|
BLAKE2b-256 | 1c75ad9ce828c7225b1504bdb64683e4f8be02f927149118a4e8bdf8219cfd61 |