Rough sets implementation for Python
Project description
Guidelines
Instalation
To install this package use pip as following
pip install rst-tools
Usage
Rough Set (Pawlak's Model)
import pandas as pd
from rst_tools.models.roughsets import RoughSets as RST
from rst_tools.models.roughsets import QuickReduct as QR
df = pd.read_csv("YOUR/FILE.csv")
conditional_attributes = list(df.column.values)
decision_attribute = conditional_attributes[-1]
del conditional_attributes[-1]
roughsets = RST(df)
konsistensi_data = roughsets.konsistensi_tabel(conditional_attributes, decision_attribute)
print("Konsistensi Data %f" % (konsistensi_data))
qr = QR(roughsets)
reducts = qr.reduct(decision_attributes, decision_attribute)
print("Hasil reduksi atribut %s" % (reducts))
'''....'''
Maximum Dependency Attribute (MDA) (Herawan's Model)
import pandas as pd
from rst_tools.models.maximum_dependency_attributes import MDA
df = pd.read_csv("YOUR/FILE.csv")
conditional_attributes = list(df.column.values)
decision_attribute = conditional_attributes[-1]
del conditional_attributes[-1]
mda = MDA(df, attrs=attributes)
attributes, table = mda.run()
print(attributes)
'''....'''
Variable Precision Rough Sets (Ziarko's Model)
import pandas as pd
from rst_tools.models.vprs import VariablePrecisionRoughSet
df = pd.read_csv("YOUR/FILE.csv")
conditional_attributes = list(df.column.values)
decision_attribute = conditional_attributes[-1]
del conditional_attributes[-1]
rs = vprs(df, b)
reducts, k, sup_attrs = reduct(rs, attributes, decision)
print("Konsistensi Data %f" % (k))
print("Atribut reduksi %s" % (reducts))
'''....'''
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
rst-tools-0.1.6.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rst-tools-0.1.6.tar.gz.
File metadata
- Download URL: rst-tools-0.1.6.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.7.13 Linux/4.19.128-microsoft-standard
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22ec6828d59b2f22fb74f913f0446eae012f776e34bbf2d1181a1d93bc2bd450
|
|
| MD5 |
f0e3f6657cc5a218ba8a3c7ca06be694
|
|
| BLAKE2b-256 |
5297a29a30b1da77b8acf4fe92e563d3060010ca412352ede5ce461bdea7edd6
|
File details
Details for the file rst_tools-0.1.6-py3-none-any.whl.
File metadata
- Download URL: rst_tools-0.1.6-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.7.13 Linux/4.19.128-microsoft-standard
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4b4e0f143a1b82cc49399e6b830d6b5d9f81e6fa1c6d3169a789e935f3756db
|
|
| MD5 |
6daa14c6a17e1ea27362a3ae72ba1ea9
|
|
| BLAKE2b-256 |
86b94146d77dc409ad4088adcbd98d2245db59bf66e4b3e3527b4e2f6ddb1d1b
|