Giter VIP home page Giter VIP logo

exercise's Introduction

compute-tf-idf-values-with-bigram-list

Use the corpus in the folder of tfidf to compute a bigram list and use this list as the term list to compute the tf-idf values and output the result to an excel file tfidf_result

identify-similar-documents-with-similarity

Use the corpus in the folder of tfidf to identify the 5 most similar documents to doc_0.txt ( try both dot product and cosine similarity) and display the document IDs for the two methods

crawler-to-collect-data

Use the link of Star Wars VIII (http://www.imdb.com/title/tt2527336/) to crawl movie description, poster and extract movie links.

extract-top-100-movies

a. Extract from the 100 popular movies found at https://www.imdb.com/chart/moviemeter/?ref_=nv_mv_mpm the following items: i) movie name, ii) release year, iii) rank moving “up” or “down” or “no change”, and iv) overall rating.

b. Export the results as a CSV file.

c. Extract all the summary text and the poster for each movie.

evaluate-performance-of-classifier

a. Read in the datasets of four newsgroups in a folder named “WI2020_Data”.

b. Compute the td-idf representation for each text sample.

c. Train a Support Vector Machine using the training data for classification.

d. Use test data to evaluate the performance of the classifier in terms of accuracy, precision, recall, F1-score, and confusion matrix.

e. Apply Truncated Singular Value Decomposition to the four datasets and set the truncated dimension of the representation to 5, 10, 20, 50, and 100.

f. Based on the results of e), for each of the dimensions (5, 10, 20, 50, 100), train a Support Vector Machine using the training data and evaluate its performance in term of accuracy using the corresponding test data.

g. Based on the results of f), plot the classification accuracy values given the different dimensions using bar chat. The y-axis should be “Accuracy” and the x-axis should be “Dimension”.

h. Visualize the word cloud for each category.

svd-and-truncated-svd

  1. Calculate the tf-idf feature vectors to obtain the document-to-term matrix
  2. Apply truncated SVD to the document-to-term matrix with k=2 to obtain the representation of reduced dimension for each of the documents
  3. Convert the query 𝒒={attract, TV, program} to its representation of the reduced dimension
  4. Rank the four documents accordingly

exercise's People

Contributors

singsing215 avatar

Watchers

 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.