Giter Site home page Giter Site logo

cs513project's Introduction

CS513Project

Collected sample data from Kaggle, got a data set of type of text, size of 5572. Converted it to utf-8 format. Counted the mean of the length of string, the number of uppercase alphabet, the number of exclamation mark and so on for ham and spam, generated a data frame for them; drew a related data table. Converted ham and spam into corpora and plain text documents, drew word cloud for each of them.Constructed a sparse matrix to eliminate low-frequency vocabularies in text, calculated the frequency of each word. Merged this sparse matrix and previous data frame to generate a data set for modeling. Used oversampling to augment data set and used 5-fold-cv to cross validate, got the training set of size of 5404 and the testing set of size of 2316. Trained data with popular classification methods such as k-Nearest Neighbors, Random Forest, CART, Naive Bayes, Artificial Neural Network respectively; Created confusion matrices to show the predictive effect of each model and recorded the corresponding consumption time. Analyzed and evaluated the advantages and disadvantages of each model, chose Random Forest model as our main method at last. Got the accuracy as 99.34% and the consumption of time as 43.62 seconds.

cs513project's People

Contributors

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