Comments (3)
could you share your data set?
from chefboost.
Sorry for keeping you waiting.
I'm sharing with you my notebook with all the files, including the databases used (in the data
file).
I managed to fix the problem by importing the database as txt instead of csv.
allstroke.txt
is the txt version of the healthcare-dataset-stroke-data.csv
database. That did the fix.
We now import the database in this way:
df = pd.read_csv("./data/allStroke.txt", index_col=0)
I don't have the old code with me now, but I can send it to you the next week if needed.
from chefboost.
When I run this in my environment, it works well. I have Python 3.8.12, pandas==1.3.5. I recommend you to upgrade or downgrade to my environment level.
from chefboost import Chefboost as chef
import pandas as pd
df = pd.read_csv("healthcare-dataset-stroke-data.csv", index_col=0)
print(df.head())
configGBM = {'algorithm': 'C4.5', 'enableGBM': True, 'epochs': 7, 'learning_rate': 1, 'max_depth': 5, 'enableParallelism': False}
modelGBM = chef.fit(df = df, config = configGBM)
Output logs:
(sefik) sefik@Sefiks-MacBook-Pro Desktop % python hello.py
gender age hypertension heart_disease ever_married work_type Residence_type avg_glucose_level bmi smoking_status Decision
id
9046 Male 67.0 0 1 Yes Private Urban 228.69 36.6 formerly smoked Yes
51676 Female 61.0 0 0 Yes Self-employed Rural 202.21 NaN never smoked Yes
31112 Male 80.0 0 1 Yes Private Rural 105.92 32.5 never smoked Yes
60182 Female 49.0 0 0 Yes Private Urban 171.23 34.4 smokes Yes
1665 Female 79.0 1 0 Yes Self-employed Rural 174.12 24.0 never smoked Yes
Gradient Boosting Machines...
Regression tree is going to be built...
gradient boosting for classification
Epoch 7. Accuracy: 82. Process: : 100%|█████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:42<00:00, 6.02s/it]
The best accuracy got in 6 epoch with the score 82.78210116731518
finished in 42.12960386276245 seconds
Evaluate train set
Accuracy: 82.00389105058366 % on 1028 instances
Labels: ['Yes' 'No']
Confusion matrix: [[99, 35], [150, 744]]
Precision: 73.8806 %, Recall: 39.759 %, F1: 51.6971 %
from chefboost.
Related Issues (20)
- Q: Are feature engineering tools mixed in for BT, RF, and GB? HOT 2
- 'Series' object has no attribute 'Decision' HOT 2
- Built-in library 'imp' was removed in python 3.12, breaking chefboost HOT 1
- add github actions HOT 1
- add logger HOT 1
- split unit tests into many files HOT 1
- classification returns irrelevant results in else conditions HOT 1
- as a developer, i want to see type hinting of chefboost functions HOT 1
- Python 3.12 issue (no imp module) HOT 1
- Cheefbost result is not returned HOT 3
- Chaid model result always return 0 accuracy HOT 7
- Last available PyPi version is from Feb 15, 2022 thus is missing fixes patched from other issues. HOT 1
- spawn make it unable to run on linux HOT 1
- Error while fitting the model HOT 9
- Error for model code HOT 1
- 'Series' object has no attribute 'Decision' HOT 2
- ImportError: Module 'outputs/rules/rules' not found HOT 1
- bug HOT 1
- negative feature importance HOT 2
- The if-else tree created by chefboost library has wrong syntax. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chefboost.