Coder Social home page Coder Social logo

likarajo / breastcancer_diagnosis Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 719 KB

Predicting Breast Cancer through Support Vector Machine using Wisconsin Breast Cancer diagnostic data set

Home Page: https://likarajo.github.io/breastcancer_diagnosis/

Python 100.00%
support-vector-machines

breastcancer_diagnosis's Introduction

Breast Cancer Diagnosis with Support Vector Machines

Used the Wisconsin Breast Cancer Diagnostic data set, which has been pre-processed and partitioned into training, validation and test sets.

Model Learning: Used scikit-learn's SVC function to learn SVM models with radial-basis-function (RBF) kernels for each combination of C and γ in {10-2, 10-1, 1, 101, 102}, and training them with the Training set.

Loss computation: Used scikit-learn's metrics.hinge_loss function to find the maximum-margin classification error, and compute the training and validation error for each combination of tuning parameters (C and γ).

Final Model Selection: Used the Validation set to select the best classifier corresponding to the best parameter values, Cbest and γbest, for which the validation error is minimum. Then fit the finalized model with the training data.

Accuracy testing: The accuracy score of the selected model is computed on the Test set.


Running

Building the model

$ python3 build_model.py
Building SVM model for Breast Cancer Diagnosis...
Data loaded.
Model learning completed.
Best Model selected. Accuracy 96.521739%
Model saved --> SVM_model.sav

Predicting with the model

$ python3 predict.py SVM_model.sav
[1.]

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.