Coder Social home page Coder Social logo

raaaouf / decision-tree-for-breast-cancer-detection Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 54 KB

Breast Cancer Detection with Decision trees Algorithm And Bagging Normalizing

License: MIT License

Python 100.00%
decision-trees bagging bagging-trees breast-cancer classification maching-learning python ensemble-learning

decision-tree-for-breast-cancer-detection's Introduction

Decision-Tree-for-Breast-cancer-detection

implemening decision trees algorithm with bagging as a normlizing technic to predict breast cancer from routine blood tests

DATA

The dataset contains only the following ten attributes:

  • Age: age of the patient (years)
  • BMI: body mass index (kg/m²)
  • Glucose: glucose concentration in blood (mg/dL)
  • Insulin: insulin concentration in blood (microU/mL)
  • HOMA: Homeostatic Model Assessment of Insulin Resistance (glucose multiplied by insulin)
  • Leptin: concentration of leptin — the hormone of energy expenditure (ng/mL)
  • Adiponectin: concentration of adiponectin — a protein regulating glucose levels (micro g/mL)
  • Resistin: concentration of resistin — a protein secreted by adipose tissue (ng/mL)
  • MCP.1: concentration of MCP-1 — a protein that recruits monocytes to the sites of inflammation due to tissue injury or inflammation (pg/dL)
  • Classification: Healthy controls (1) or patient (2)

Data Visualisation

As you can see there are two classes with almost the same number of samples data

Results with bagging

from sklearn.ensemble import BaggingClassifier

bagging_clf = BaggingClassifier()

bagging_clf.fit(X_train, y_train.ravel())
y_pred_bag = bagging_clf.predict(X_test)

bag_cm = confusion_matrix(y_test, y_pred_bag)

plot_confusion_matrix(bag_cm, [0, 1])
plt.show()

results

After ploting the confusion matrix we can see our model classified correctly all instances in the test set using bagging normalization.

License

GitHub

decision-tree-for-breast-cancer-detection's People

Contributors

raaaouf avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.