Coder Social home page Coder Social logo

cancerprediction's Introduction

cancerPrediction

Cancer Prediction Using Decision Trees and Random Forest

Bagging Accuracy 0.822222222222

AdaBoost: 0.933333333333

AdaBoost accuracy with cross validation: 0.929464285714

Accuracy Random Forest: 0.955555555556

RandomForest accuracy with cross validation: 0.929464285714

  • Making a bootstarp sample of the original “Training” Dataset (build in part(b)) with the size of bootstarp_size = 0.8*(Size of the original dataset). You can use the following command to generate a random bootstrap dataset (“i" is the variable of the loop, so the random_state changes in each iteration): resample(X_train, n_samples = bootstarp_size , random_state=i , replace = True)
  • Define and train a new base decision tree classifier on this dataset in each iteration: Base_DecisionTree = DecisionTreeClassifier(random_state=2).
  • Test “this base classifier” on the original “Testing” Dataset build in part(b), and save the prediction results for all testing samples.
  • Perform Voting to make the final decision on each data sample based on the votes of all 19 classifiers. Finally, calculate and report the accuracy of your Bagging method.

author: yosep kim

github.com/cowboyuniverse

Screenshot

cancerprediction's People

Contributors

cowboyuniverse avatar

Watchers

 avatar  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.