Roughset

Latest version: v0.3.0

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.0

package功能新增
- `relations.py`
- `get_equivalence_object`: 取得目標規則篩選相同的物件
- `get_lower_approximation`:取得下限近似集合
- `get_upper_approximation`:取得上限近似集合
- `evaluate.py`
- `calculate_rules_ratio`: 計算 給定的規則條件 佔 所有資料 的比例
- `evaluate_metrics`:計算 target_dict 規則 在 df_data中的 support, confidence, lift

Demo頁面更新
+ page 1: Select Feature
+ 上傳資料
+ 檢查欄位獨立性
+ 取得上限/下限/界限近似集合
+ page 2: Split Data
+ 劃分訓練/測試資料
+ page 3: Rule Inference
- 上傳資料、選擇欄位
- 推論規則、取得規則解釋
- 設定閾值,篩選規則
+ page 4: Rule Application
+ 上傳規則、資料
+ 評估規則、篩選規則

0.2.0

現在入口為RoughSet物件了!
python
from roughset import RoughSet


範例
With a example data
![Example data](https://i.imgur.com/AHzxjiu.png)

python
from roughset import RoughSet

Load data from a CSV file
df = pd.read_csv('example.csv')

Create RoughSet object
RS = RoughSet(
df=df,
name_col="No",
feature_col=['天氣', '事故情形', '事故原因'],
decision_col='損壞部位'
)
rules = RS.get_reduct_rules(include_empty=True)
rules

We will get the reduct rules.
![reduct rules result](https://i.imgur.com/wyG1wUr.png)


python
rules_with_scores = RS.get_reduct_rules_with_scores()
rules_with_scores

![](https://i.imgur.com/UjmomZj.png)

0.1.0

更新內容
建立`create_reduct_rules`,用來產生約略規則

使用範例
若範例資料如下
![Example data](https://i.imgur.com/AHzxjiu.png)

python
from roughset.reduct import create_reduct_rules

Load data from a CSV file
df = pd.read_csv('example.csv')

Calculate reduct rules
create_reduct_rules(
df=df,
name_col="No",
feature_col=['天氣', '事故情形', '事故原因'],
decision_col='損壞部位',
include_empty=True Include empty reduct rules
)


則結果如下
![reduct rules result](https://i.imgur.com/wyG1wUr.png)

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.