91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代寫MET CS777 Large-Scale Text Processing

時(shí)間:2024-02-25  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)


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 

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

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評(píng)軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)/客戶要求/設(shè)計(jì)優(yōu)化
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評(píng) 開團(tuán)工具
    出評(píng) 開團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場巴士4號(hào)線
    合肥機(jī)場巴士4號(hào)線
    合肥機(jī)場巴士3號(hào)線
    合肥機(jī)場巴士3號(hào)線
  • 短信驗(yàn)證碼 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区
    国产一区二区导航在线播放| 中文字幕日韩一区| 国产精品萝li| 日韩综合小视频| 成人免费视频免费观看| 亚洲精品影院在线观看| 欧美午夜片在线看| 国产精品美女一区二区在线观看| 日韩国产欧美视频| 欧美影院一区| 欧美性色黄大片| 中文字幕一区二区三区不卡| 老司机精品视频线观看86 | 欧美日韩国产成人在线91| 国产日韩欧美精品一区| 另类人妖一区二区av| 亚洲黄色一区二区三区| 日韩欧美在线观看一区二区三区| 一区二区三区**美女毛片| 成人午夜碰碰视频| 色999日韩国产欧美一区二区| 国产拍欧美日韩视频二区| 韩国女主播成人在线观看| 亚洲看片一区| 国产日韩欧美一区二区三区乱码| 免费看日韩a级影片| 亚洲激情午夜| 国产色产综合色产在线视频| 麻豆视频观看网址久久| 亚洲少妇自拍| 亚洲国产精品黑人久久久| 国产精品一级黄| 色哟哟国产精品| 亚洲欧美日本在线| 91视视频在线观看入口直接观看www| 欧美午夜一区二区三区免费大片| 一区二区三区在线观看动漫| 女女同性女同一区二区三区91| 欧美日韩一区二区三区免费看| 一区二区三区在线观看国产 | 18成人在线观看| 欧美freesex交免费视频| 91精品国产综合久久香蕉麻豆| 日韩精品欧美成人高清一区二区| 中国女人久久久| 国产精品国产三级国产aⅴ入口| 99亚偷拍自图区亚洲| 欧美一区二区三区四区在线观看| 日韩成人精品在线| 午夜在线一区| 亚洲成人av资源| 国产亚洲第一区| 一区二区三区精密机械公司| 在线观看一区视频| 中文字幕字幕中文在线中不卡视频| 菠萝蜜视频在线观看一区| 日韩欧美一区二区视频| 国产精品一品二品| 欧美一级免费观看| 国产成人精品免费一区二区| 日韩欧美在线网站| 懂色av中文字幕一区二区三区 | av成人老司机| 26uuu亚洲婷婷狠狠天堂| 99视频一区二区三区| 久久综合九色综合97_久久久| 97精品电影院| 国产精品天美传媒| 在线欧美亚洲| 亚洲永久精品大片| 色婷婷综合中文久久一本| 日本午夜精品一区二区三区电影| 欧美在线你懂的| 极品美女销魂一区二区三区| 777午夜精品免费视频| www.av亚洲| 国产精品美女久久久久久| 亚洲精品一区二区三区蜜桃久 | 欧美日韩一区二区三区在线看| 久久99精品久久久久久| 欧美一级黄色录像| 色综合久久中文综合久久97| 中文字幕综合网| 色噜噜夜夜夜综合网| 国产一区二区三区综合| 精品乱码亚洲一区二区不卡| 欧美成人一区二免费视频软件| 亚洲美女屁股眼交| 色欧美片视频在线观看在线视频| 久久av老司机精品网站导航| 精品国偷自产国产一区| 欧美日韩综合| 天天影视涩香欲综合网| 欧美一区二区在线看| 欧美日韩hd| 丝袜美腿亚洲色图| 欧美v亚洲v综合ⅴ国产v| 国内精品久久久久久久影视蜜臀| 午夜不卡av在线| 日韩精品综合一本久道在线视频| 狠久久av成人天堂| 奇米在线7777在线精品| 精品国产乱码久久久久久图片 | 午夜婷婷国产麻豆精品| 制服丝袜在线91| 精品福利av| 韩国欧美国产1区| 国产精品萝li| 欧美调教femdomvk| 午夜精品亚洲| 久久超碰97中文字幕| 日本一区二区不卡视频| 91久久精品一区二区三| 91免费版在线看| 日本视频中文字幕一区二区三区| 精品国产乱码久久久久久闺蜜| 国产精品久久亚洲7777| 成人av小说网| 日本麻豆一区二区三区视频| 国产肉丝袜一区二区| 欧美在线一区二区三区| 伊人久久成人| 豆国产96在线|亚洲| 亚洲国产cao| 国产精品视频yy9299一区| 欧美色电影在线| 国产精品久久国产愉拍| jizz一区二区| 久久99国产精品麻豆| 亚洲女人****多毛耸耸8| 欧美成人猛片aaaaaaa| 欧美资源在线| 国内精品福利| 不卡在线观看av| 麻豆专区一区二区三区四区五区| 综合婷婷亚洲小说| 精品国产伦理网| 欧美精品乱码久久久久久按摩| 国产欧美日韩伦理| 欧美特黄一级| 成人av高清在线| 国产综合久久久久影院| 午夜在线成人av| 亚洲欧美电影院| 国产精品美女www爽爽爽| 欧美成人猛片aaaaaaa| 欧美日韩国产首页| 久久精品人人| 国产日产高清欧美一区二区三区| 欧美在线播放| 99综合电影在线视频| 国产精品影视网| 久久66热re国产| 蜜桃久久久久久久| 亚洲777理论| 亚洲第一会所有码转帖| 亚洲精品免费播放| 综合婷婷亚洲小说| 国产精品不卡一区| 国产精品久久久久久久浪潮网站| 久久亚洲精精品中文字幕早川悠里| 7777精品伊人久久久大香线蕉超级流畅 | 7777精品伊人久久久大香线蕉| 色老综合老女人久久久| 狼狼综合久久久久综合网| 亚洲女人av| 久久中文欧美| 色香蕉成人二区免费| 色乱码一区二区三区88| 91黄色在线观看| 欧洲精品一区二区三区在线观看| 色国产综合视频| 欧洲一区二区三区在线| 欧美体内she精高潮| 欧美日韩一区不卡| 欧美军同video69gay| 日韩一区二区三区免费看 | 91亚洲精品久久久蜜桃| 欧美日韩a区| 亚洲国产网站| 国产精品视频免费一区| 久久亚洲精品伦理| 欧美三级在线视频| 日韩欧美激情四射| 久久综合久久综合亚洲| 欧美韩国日本一区| 亚洲精品国产成人久久av盗摄| 亚洲图片欧美综合| 蜜臀av性久久久久蜜臀aⅴ四虎| 老司机午夜精品99久久| 国产91精品一区二区麻豆网站| 91在线免费看| 一本久道久久综合婷婷鲸鱼| 乱人伦精品视频在线观看| 欧美酷刑日本凌虐凌虐| 久久精品人人做人人综合| 亚洲视频一区二区在线观看| 亚洲成a人片综合在线| 国产一区二区在线视频| 欧美日韩99|