国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

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

代寫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
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产一区二区香蕉| 国内成人精品一区| 久久精品国产亚洲7777| 国产成人精品免高潮在线观看| 国产青春久久久国产毛片| 国产日韩av高清| 国产免费xxx| 国产精品夜夜夜爽张柏芝| 国产乱人伦精品一区二区| 国产欧美日韩精品在线观看| 国产精品一区二区三区不卡 | 亚洲v国产v| 久久久久久91| 午夜dv内射一区二区| 午夜精品久久久久久久男人的天堂| 亚洲免费在线精品一区| 亚洲二区自拍| 日韩av免费在线播放| 奇米影视首页 狠狠色丁香婷婷久久综合| 日韩和欧美的一区二区| 加勒比在线一区二区三区观看| 国产自产在线视频一区| 99精品免费在线观看| 国产成年人在线观看| 国产精品日韩欧美一区二区| 欧美激情亚洲视频| 日韩福利视频| 国产区二精品视| 久久免费99精品久久久久久| 国产成人短视频| 国产精品欧美风情| 亚洲伊人久久综合| 欧美影院在线播放| 国产伦精品一区二区三区高清| 波多野结衣成人在线| 久久99精品久久久久久青青日本 | 欧美激情亚洲自拍| 日本一区二区三区在线视频| 欧美亚州在线观看| 成人免费无码av| 久久九九亚洲综合 | 人妻无码视频一区二区三区 | 成人美女免费网站视频| 国产高清精品一区二区| 国产成人生活片| 欧美日本亚洲视频| 日韩精品视频一区二区在线观看 | 日韩精品一区二区三区久久| 国产日韩欧美二区| 久久五月天婷婷| 国产精品福利在线观看网址| 亚洲淫片在线视频| 免费观看精品视频| 国产黄视频在线| 欧美极品美女电影一区| 青青青国产在线观看| www.浪潮av.com| 国产精品户外野外| 日本久久久久久| 成人h视频在线| 久久精品视频播放| 日本福利视频一区| 国产精品一久久香蕉国产线看观看| 日韩亚洲国产中文字幕| 涩涩日韩在线| 99久热re在线精品996热视频| 久热国产精品视频| 日本一区二区三区四区五区六区 | 国语精品中文字幕| 久久综合久久网| 欧美成人精品在线| 欧美亚洲第一页| 久久久久五月天| 日本在线观看一区| 7777奇米亚洲综合久久| 中文字幕日韩一区二区三区不卡| 狠狠色噜噜狠狠狠狠色吗综合 | 久久九九视频| 亚洲国产激情一区二区三区| 国产在线精品一区二区中文| 久久精品91久久香蕉加勒比 | 日本精品久久久久久久| 99久久精品久久久久久ai换脸| 国产精品久久久久久久久久| 日韩精品一区二区三区久久| 久久免费视频这里只有精品| 亚洲一区二区三区乱码aⅴ蜜桃女| 国产老熟妇精品观看| 美女999久久久精品视频| 精品一区二区不卡| 国产精品成人观看视频国产奇米| 欧美日韩另类丝袜其他| 日韩亚洲在线观看| 热re99久久精品国产99热| 久久精品99久久| 青青草成人网| 精品国产一区久久久| 欧美成人一区二区在线观看| 久久精品99久久久久久久久| 日韩精品一区二区三区色欲av| 日韩在线视频观看| 欧美专区中文字幕| 国产精品国模在线| 国产精品自产拍在线观看| 一区二区三区久久网| 99久久综合狠狠综合久久止 | 99九九视频| 中文字幕久精品免| 国产精品一二区| 色综合久久88色综合天天提莫| 久久99精品国产99久久| 欧美亚洲另类久久综合| 欧美成人精品影院| 91国视频在线| 欧美亚洲激情在线| 久久国产精品久久久| 91九色视频在线| 欧日韩一区二区三区| 欧美不卡视频一区发布| 97精品久久久| 欧美在线视频免费| 国产99视频精品免费视频36| 国产精品27p| 欧日韩一区二区三区| 久久99久久久久久久噜噜| 久久资源av| 精品日本一区二区三区| 伊人久久99| 日韩中文字幕在线精品| 国产日韩成人内射视频| 日本一区二区三区免费看| 国产精品日韩电影| 91国在线高清视频| 蜜臀av.com| 欧美一级特黄aaaaaa在线看片| 国产精品视频中文字幕91| av在线不卡一区| 欧美不卡三区| 中文字幕一区二区三区四区五区人| 国产成a人亚洲精v品在线观看| 国模吧一区二区| 日韩高清av| 亚洲午夜精品一区二区| 国产精品久久久久一区二区| 91国产在线免费观看| 国内自拍在线观看| 日韩成人av电影在线| 欧美精品久久久久久久| 国产精品日韩三级| 国产高清精品在线观看| 国产女人水真多18毛片18精品| 日韩欧美精品久久| 午夜精品久久久久久久无码 | 国产精品视频自在线| 91高跟黑色丝袜呻吟在线观看| 美乳视频一区二区| 欧美一区二区三区四区在线| 欧美猛少妇色xxxxx| 国产白丝袜美女久久久久| 国产精品亚洲片夜色在线| 国内精品免费午夜毛片| 欧洲一区二区在线| 日韩一区不卡| 一区二区传媒有限公司| 欧美成人一区二区三区电影| 日韩中文有码在线视频| 久久久天堂国产精品女人| 国产小视频免费| 欧美精品一区二区三区久久| 人妻有码中文字幕| 日韩精品大片| 日韩avxxx| 性欧美精品一区二区三区在线播放| 中文字幕精品一区日韩| 久久综合久久八八| 国产精品高清一区二区三区| 国产精品欧美久久久| 国产精品无码专区av在线播放| 丝袜一区二区三区| 色婷婷综合成人| 久久精品美女| 久久久久久久久网| 国产成+人+综合+亚洲欧洲| 久久精品人人做人人爽电影 | 欧美最猛黑人xxxx黑人猛叫黄| 日本中文字幕亚洲| 日本中文字幕在线视频观看| 日韩av高清在线播放| 日本一区二区在线免费播放| 日韩av不卡电影| 日本精品久久电影| 青青青国产在线视频| 欧美日韩一区二区在线免费观看| 欧美日韩国产精品一区二区| 欧美乱大交xxxxx潮喷l头像| 男人的天堂99| 国产亚洲黄色片| 91免费看国产| 九色自拍视频在线观看| 国产精品无码一本二本三本色|