99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫MET CS777 Large-Scale Text Processing

時間:2024-02-25  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯


Assignment 4

 

Large-Scale Text Processing

 

MET CS777

 

Description

 

In this assignment you will implement k-nearest neighbor classifier (KNNclassifier) to classify text documents. For example, given a search text “ How many goals did

 

Vancouver score last year?”, the algorithm searches all the documents corpus (corpus: large and structural text) and returns the top K similar documents.

 

The TF-IDF (Term Frequency - Inverse Document Frequency) is used as the similarity/distance measure between two document/texts.

 

In the first step, the top 20k English words of the corpus will be selected, then the TF-IDF matrix of a text corpus get computed, which is used to find similarity between the texts.

 

Wikipedia dataset

 

In this assignment, the Wikipedia data set is used. The entire Wikipedia data set has been downloaded from (https://dumps.wikimedia.org) and stored in a large file.

 

Each Wikipedia Page is a document and have a unique document ID and a

 

specific URL. For example,

 

• docID 418348

 

• URLhttps://en.wikipedia.org/wiki?curid=418348

 

Data format

 

Each line is a single document in a pseudo XML format.

 

 

 

Small Data Set - Wikipedia Pages

 

You can find a small data set (Only 1000 Wikipedia pages) on AWS S3:

 

s3://metcs777-sp24/data/WikipediaPagesOneDocPerLine1000LinesSmall.txt

 

Large Data Set

 

Large data set consists of 1 million pages (2.2 GB) and can be found here:

 

s3://metcs777-sp24/data/WikipediaPagesOneDocPerLine1m.txt

 

Categories of the large data of Wikipedia can be found here:

 

s3://metcs777-sp24/data/wiki-categorylinks.csv.bz2

 

Templates

 

Use Assignment4-Template.[ipynb/py] as starting point for your implementation.

 

Tasks

 

Task 1 (10 points): Generate a 20K dictionary

 

Task 1.1 - Using Wikipedia pages, find the top 20,000 English words, save them in an array, and sort them based on the frequency of the occurrence.

 

Task 1.2 - As a result, adictionary has been generated that contains the top 20K most frequent words in the corpus. Next go over each Wikipedia document and check if the words appear in the Top 20K words. At the end, produce an RDD that includes the docID as key and a Numpy array for the position of each word in the top 20K dictionary.

 

(docID, [dictionaryPos1,dictionaryPos2,dictionaryPos3...])

 

Task 2 (20 Points): Create the TF-IDF Array

 

After having the top 20K words we want to create a large array that its columns are the words of the dictionary with number of occurrences of each word and the rows are documents.

 

The first step is calculating the “Term Frequency”, TF (x, w), vector for each document as follows:

 

 

 

“Term Frequency” is an indication of the number of times a term occurs in a document. Numerator is number of occurrences of a word, and the denominator is the sum of all    the words of the document.

 

Next, calculate “Inverse Document Frequency” for all the documents and finally calculate TF-IDF(w) and create TF-IDF matrix of the corpus:

 

 

 

Note that the “size of corpus” is total number of documents (numerator). To learn more about TF-IDF see the Wikipedia page: https://en.wikipedia.org/wiki/Tf-idf

 

Task 3 - Implement the getPrediction function (30 Points)

 

Finally, implement the function getPrediction(textInput, k),which will predict the membership of the textInput to the top 20 closest documents, and the list of top categories.

 

You should use the cosine similarity to calculate the distances.

 

 

 

Task 4 (30 points): Implement the code using Dataframes

 

Implement the complete code in Dataframe and printout the results of the task 3 using dataframes in pyspark. From the beginning of your code to the end of your kNN implementation you are allowed to usespark dataframe and python (including python libraries like numpy). You are not allowed to use RDDs.

 

Task 5 (10 points) Removing Stop Words and Do Stemming

 

Task 5.1 - Remove Stop Words

 

Describe if removing the English Stop words (most common words like ”a, the, is, are, i, you, ...”) would change the final kNN results.

 

Does your result change significantly after removing the stop words? Why?

 

Provide reasons.

 

You do not need to code this task.

 

Task 5.2 - Considering English word stemming

 

We can stem the words [”game”,”gaming”,”gamed”,”games”] to their root word ”game” .

 

Does stemming change your result significantly? Why? Provide reasons.

 

You can learn more about stemming at:

 

https://en.wikipedia.org/wiki/Stemming

 

You do not need to code this task.

 

Submission Guidelines

 

● Naming Convention:

 

METCS777-Assignment3-[TaskX-Y]FIRST+LASTNAME.[pdf/py/ipynb]

 

Where:

 

o [TaskX-Y] doesn’t apply for .[pdf] files

 

o No space between first and lastname

 

● Files:

 

o Create one document in pdf that has screenshots of running results of all coding problems. For each task, copy and paste the results that your lastSpark job saved in the bucket. Also, for each Spark job, include a screenshot of the Spark History. Explain clearly and precisely the results.

 

o Include output file for each task.

 

o Please submit each file separately (DO NOT ZIP them!!!).

 

● For example, sample submission of John Doe’s Assignment 4 should be the following files:

 

o METCS777-Assignment4-JohnDoe.pdf

 

o METCS777-Assignment4-Task**4-JohnDoe.ipynb

 

o METCS777-Assignment4-Task**JohnDoe.py

 

o METCS777-Assignment4-Task**Output-JohnDoe.txt

 

o METCS777-Assignment4-Task2-JohnDoe.py

 

o METCS777-Assignment4-Task2-Output-JohnDoe.txt o …

 

 

 

Figure 1: Screenshot of Spark History

 

 

Evaluation Criteria for Coding Tasks

 

 

Academic Misconduct Regarding Programming

 

In a programming class like this, there is sometimes a very fine line between “cheating” and acceptable and beneficial interaction between peers. Thus, it is very important that  you fully understand what is and what is not allowed in terms of collaboration with your classmates. We want to be 100% precise,so that there can be no confusion.

 

The rule on collaboration and communication with your classmates is as follows: you cannot transmit or receive code from or to anyone in the class in anyway —visually (by  showing someone your code), electronically (by emailing, posting, or otherwise sending someone your code), verbally (by reading code to someone) or in any other way we have not yet imagined. Any other collaboration is acceptable.

 

It is not allowed to collaborate and communicate with people who are not your classmates (or your TAs or instructor). This means posting any questions of any nature to programming forums such as StackOverflow is strictly prohibited. As far as going to  the web and using Google, we will apply the “two-line rule”. Go to any web page you   like and do any search that you like. But you cannot take more than two lines of code   from an external resource and include it in your assignment in any form. Note that changing variable names or otherwise transforming or obfuscating code you found on  the web does not render the “two-line rule” inapplicable. It is still a violation to obtain more than two lines of code from an external resource and turn it in, whatever you do to those two lines after you first obtain them.

 

Furthermore, you must always cite your sources. Add a comment to your code that includes the URL(s) that you consulted when constructing your solution. This turns out to be very helpful when you’re looking at something you wrote a while ago and you need to remind yourself what you were thinking.

請加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 

掃一掃在手機打開當前頁
  • 上一篇:System Calls程序代做、代寫Manage Files
  • 下一篇:代寫CSC8636 – Summative Assessment
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          亚洲大片av| 国产精品自拍小视频| 亚洲午夜伦理| 好看的日韩av电影| 欧美视频一区二区| 嫩草影视亚洲| 性欧美在线看片a免费观看| 亚洲第一页自拍| 国产精品高潮呻吟久久av黑人| 久久久久久电影| 亚洲永久视频| 亚洲乱码久久| 亚洲激情成人网| 狠狠色噜噜狠狠色综合久| 国产精品sss| 欧美日韩亚洲一区二| 久热精品视频在线观看| 亚洲国产精品久久久久秋霞影院| 欧美视频一区二区三区| 欧美肥婆在线| 久久久久国色av免费观看性色| 亚洲性线免费观看视频成熟| 亚洲人成在线播放网站岛国| 亚洲观看高清完整版在线观看| 国产美女精品人人做人人爽| 欧美视频精品在线观看| 欧美国产成人精品| 老司机精品视频网站| 久久国产精品72免费观看| 午夜精品久久久久影视| 亚洲一区二区av电影| 日韩视频精品在线| 日韩亚洲精品在线| 中文一区二区| 中日韩美女免费视频网址在线观看 | 国产精品久久久久9999吃药| 欧美日韩hd| 欧美日韩国产在线| 欧美精品乱码久久久久久按摩| 欧美国产成人在线| 欧美激情视频一区二区三区免费 | 国产日韩欧美在线看| 国产亚洲精品久久飘花 | 一本色道久久综合精品竹菊| 在线视频一区二区| 亚洲欧美日韩天堂| 久久国产精品网站| 免费看的黄色欧美网站| 欧美日韩高清在线观看| 国产精品麻豆成人av电影艾秋| 国产精品久久久久毛片大屁完整版| 国产精品久久久久久户外露出 | 欧美日韩视频在线观看一区二区三区 | 一区二区三区免费观看| 亚洲男人影院| 久久在线精品| 欧美性淫爽ww久久久久无| 国产日本欧美在线观看| 亚洲精品久久久久久下一站| 亚洲欧美国产毛片在线| 久久免费视频在线| 欧美日韩亚洲一区三区| 国内视频一区| 亚洲视频一区在线| 老司机精品视频一区二区三区| 欧美日韩视频一区二区| 国产亚洲精品久久久久婷婷瑜伽 | 欧美韩国在线| 国产日韩亚洲| 亚洲在线观看视频| 久久躁日日躁aaaaxxxx| 国产精品久久福利| 亚洲国产成人精品久久| 亚洲欧美伊人| 欧美日韩午夜在线视频| 在线成人免费视频| 亚洲一区尤物| 欧美精彩视频一区二区三区| 国产一区二区三区在线免费观看 | 国产精品免费视频xxxx| 亚洲激精日韩激精欧美精品| 久久人人精品| 国产亚洲精品bv在线观看| 亚洲韩国精品一区| 欧美在线免费| 国产日韩欧美成人| 亚洲免费影视第一页| 欧美日韩精选| 99re热这里只有精品视频| 老牛影视一区二区三区| 国内在线观看一区二区三区| 午夜激情综合网| 国产精品久久久久天堂| 国产精品99久久久久久白浆小说 | 欧美屁股在线| 亚洲人体影院| 欧美精品1区2区| 国产视频欧美视频| 欧美在线观看一区二区三区| 国产麻豆日韩欧美久久| 欧美一区=区| 国产综合色在线| 久久久久久久久一区二区| 黄网站免费久久| 裸体一区二区三区| 亚洲国产精品传媒在线观看 | 免费观看30秒视频久久| 亚洲国产精品一区二区尤物区| 久久综合九色九九| 亚洲国产高清一区二区三区| 裸体一区二区三区| 亚洲美女毛片| 国产精品美女www爽爽爽| 亚洲免费影院| 国一区二区在线观看| 欧美电影打屁股sp| 亚洲一区二区3| 国产精品资源在线观看| 久久久久久9| 91久久国产综合久久蜜月精品 | 欧美激情一区二区三区在线| 亚洲免费av观看| 国产女主播视频一区二区| 久久久久久久久久久久久久一区| 亚洲激情网址| 国产日韩欧美电影在线观看| 久久综合精品一区| 亚洲视频综合在线| 伊人成综合网伊人222| 欧美日韩和欧美的一区二区| 亚洲欧美在线另类| 亚洲福利免费| 国产精品尤物福利片在线观看| 久久综合999| 亚洲欧美99| 亚洲精品欧美日韩专区| 国产精品免费aⅴ片在线观看| 久久亚洲精品网站| 午夜欧美不卡精品aaaaa| 亚洲国产精品精华液网站| 国产精品视频一区二区三区| 欧美高清不卡| 老牛影视一区二区三区| 亚洲一区二区三区四区中文| 亚洲国产精品久久人人爱蜜臀 | 亚洲欧美综合国产精品一区| 亚洲国内自拍| 尤物精品国产第一福利三区| 国产精品视频网站| 欧美片在线观看| 免费观看日韩| 久久久久久久久久久久久女国产乱| 99国产精品视频免费观看| 亚洲国产高清自拍| 在线日韩av片| 红桃视频国产一区| 国产一区二区三区久久久久久久久| 欧美视频一区在线| 欧美理论在线播放| 欧美激情在线观看| 欧美成人亚洲| 免费成人美女女| 免费欧美在线| 欧美成人免费大片| 欧美暴力喷水在线| 男男成人高潮片免费网站| 久热精品视频| 免费观看亚洲视频大全| 免费成人av资源网| 欧美成人网在线| 欧美精品一卡| 欧美日韩999| 欧美日韩亚洲一区二区三区四区 | 欧美亚洲第一页| 欧美视频不卡| 国产麻豆91精品| 黑人巨大精品欧美黑白配亚洲| 国产偷国产偷精品高清尤物| 国产欧美激情| 在线观看成人av电影| 在线免费观看视频一区| 亚洲国产91| 99国产精品自拍| 中文欧美字幕免费| 欧美一区二区三区喷汁尤物| 午夜精品久久久久久久蜜桃app | 国产精品手机在线| 国产一区二区三区高清| 亚洲第一在线视频| 一区二区成人精品 | 国产欧美日韩视频在线观看| 国产午夜亚洲精品理论片色戒| 韩国欧美国产1区| 亚洲毛片在线观看.| 午夜精品久久久久久久99水蜜桃| 久久黄色小说| 欧美精品在线一区| 国产深夜精品| aa亚洲婷婷| 久久久久久久一区二区三区|