Giter VIP home page Giter VIP logo

ml_sklearn's Introduction

ml_sklearn

Error rate of this classifier: 0.1

The best k is when k=8, I found the accuracy became 1.00.

In the part of cross validation, I used the package from sklearn.model_selection and I import cross_val_score.
I create those 3 models by using sklearn with the default parameters.

The accuracy of the KNN is 0.98692810457516345
The accuracy of the SVM is 0.97344771241830064
The accuracy of the Logic Regression is 0.98039215686274517

In the second part, I try the logistic Regression and the svm. For thosse three models, I use the cross-valid in sklearn. Compare those three models, I found that the KNN is the best model. Because in this case, the iris in the space is not complexe. So when I run the KNN, it use the distance and it could eaily find k nearest neighbors, and it could find the correct label. For the logistic regression, I choose the multi_class, because in this case, we have 3 different labels. But I still don't know why KNN is the best model, and SVM doesn't work very well in this case.

There is a graph about comparing those 3 models in the notebook file.

try to use the xgboost or lightgb for the kaggle part. You will see how powerful it is

ml_sklearn's People

Contributors

shuopwang avatar

Watchers

James Cloos 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.