Giter Club home page Giter Club logo

lt2212-v20-a2's Introduction

LT2212 V20 Assignment 2

Part 1 After tokenization I lowercased and removed punctuation, empty strings, stop words. Only the words appearing over 10 times in the whole corpus have been taken into account. In order to optimize the performance of the model I used tf-idf instead of the word counts.

Part 4 1.model_id 1 SGDClassifier Accuracy, precision, recall, f-measure: 90% model_id 2 LinearSVC

  • Accuracy, precision, recall, f-measure: 92%

2.Reduced dimensionality with TruncatedSVD SGD Classifier model_id 1 Features reduced to 50%:

  • accuracy and precision: 89%, recall and F-measure: 88% Features reduced to 25%:
  • accuracy, precision: 88%, recall and f-measure: 87% Features reduced to 10% :
  • accuracy and precision: 88%, recall and f-measure: 87% Features reduced to 5%:
  • accuracy and precision: 87%, recall and f-measure: 86%

LinearSVC model_id 2 Features reduced to 50%:

  • accuracy, precision, recall, f-measure: 92% Features reduced to 25%:
  • accuracy and precision: 93%, recall and f-measure: 92% Features reduced to 10%:
  • accuracy, precision, f-measure: 90%, recall: 89% Features reduced to 5%:
  • accuracy, precision, f-measure, recall: 89%

When running the program using the SGD and the LinearSVC Classifiers by using the original space, but also by reducing the dimensions, I have noticed that there is little to almost no difference between the results obtained in the evaluation. After having written down these values, I tried running the program again and again and it has occured multiple times that the metrics indicated a higher performance of the classifiers when DR has been applied than when the original number of features was used. Having done some readings on dimensionality reduction and also observing my program's performance, DR definitely makes learning faster and has the benefit of increasing computational efficiency.

p.s. For the bonus part I have only written another function to reduce the dimensions, using PCA. Unfortunately it became way too slow at training afterwards and I was not that successful in getting the results.

lt2212-v20-a2's People

Contributors

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