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

合肥生活安徽新聞合肥交通合肥房產(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.

請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 

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

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場(chǎng)仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲勞振動(dòng)
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個(gè)行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運(yùn)營(yíng)技巧,多多開團(tuán)助手,多多出評(píng)軟件徽y1698861
    超全面的拼多多電商運(yùn)營(yíng)技巧,多多開團(tuán)助手
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服務(wù)平臺(tái)
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗(yàn)證碼 豆包網(wǎng)頁版入口 破天一劍 目錄網(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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产在线999| 青春草国产视频| 丁香六月激情婷婷| 欧美亚洲日本黄色| 国产a级片免费观看| 亚洲一区二区在线免费观看| 国产欧美日韩网站| 精品国产_亚洲人成在线| 国产中文字幕二区| 国产精品传媒毛片三区| 蜜桃日韩视频| 国产精品久久97| 激情小说综合区| 国产精品久久精品| 国产一区二区三区四区五区在线| 久久精品中文字幕| 青青草一区二区| 久久精品国产精品亚洲精品色| 一区二区三区四区视频在线| 国产青青在线视频| 一区二区三区四区在线视频| 蜜桃传媒视频第一区入口在线看 | 深夜福利一区二区| 亚洲bt天天射| 成人免费在线一区二区三区| 国产精品动漫网站| 欧美激情一区二区三区在线视频| 91高清免费视频| 在线免费观看一区二区三区| 国产日韩一区欧美| 久久久精品视频在线观看| 日本高清不卡三区| 91精品免费| 亚洲欧美日韩综合一区| 国产久一一精品| 精品国产乱码久久久久| 国内精品久久影院| 国产精品狠色婷| 国内揄拍国内精品| 国产精品入口免费视频一| 青青在线视频免费| 日韩视频免费观看| 日本一区二区三区www| 国产精品 日韩| 日韩电影天堂视频一区二区| 国产成一区二区| 日韩精品―中文字幕| 九九九久久久| 欧美在线观看网址综合| 国产成人午夜视频网址| 欧美一区少妇| 国产精品视频1区| 国内精品久久久久久影视8| 国产精品欧美激情在线观看| 激情欧美一区二区三区中文字幕| 国产精品成人在线| 国产伦精品一区二区三区视频免费| 久久日韩精品| 日本精品久久久久影院| 91麻豆国产精品| 五月天综合婷婷| 日韩最新av在线| 欧美大香线蕉线伊人久久 | 色妞一区二区三区| 加勒比成人在线| 久久99亚洲热视| 91免费欧美精品| 日本最新一区二区三区视频观看| 久久久久久久久久福利| 日韩免费电影一区二区三区| 久久精品国产精品亚洲| 国产日韩欧美综合| 亚洲一区二区在线| 久久福利一区二区| 欧美乱偷一区二区三区在线| 国产精品久久久久久久久久久久冷| 国产日本欧美在线观看| 亚洲精品中文综合第一页| 久草热视频在线观看| 国内精品久久影院| 亚洲一区三区视频在线观看| 久久国产一区| 国产欧美一区二区在线播放| 亚州精品天堂中文字幕| 久久精彩视频| 欧美亚洲一级片| 国产精品福利在线| 国产啪精品视频网站| 亚洲一区在线免费| 九色一区二区| 97人人模人人爽视频一区二区| 日韩伦理一区二区三区av在线| 欧美成年人视频| 国产精品99久久99久久久二8| 欧美国产综合视频| 亚洲欧洲日韩综合二区| 国产精品丝袜视频| 91九色综合久久| 韩国成人一区| 亚洲欧洲一区二区在线观看| 日韩视频在线免费| 91精品久久久久久蜜桃| 麻豆91av| 日韩免费视频在线观看| 中文字幕一区二区三区在线乱码 | 国产免费内射又粗又爽密桃视频 | 日本一区二区三区免费观看| 久久国产精品久久久| 国产成人a亚洲精品| 国产一区二区色| 日韩经典在线视频| 亚洲精品欧美精品| 精品国产一区二区三区四区精华| 久草热视频在线观看| 成人短视频在线观看免费| 极品美女扒开粉嫩小泬| 日韩欧美一区二区三区四区五区 | 91高清免费在线观看| 国产日产欧美视频| 欧美精品一区二区三区四区五区 | 日本在线视频www色| 久久久久国产精品免费| 国产精品入口福利| 日韩中文字幕av| 久久久久久久中文| 久久男人av资源网站| 99精品99久久久久久宅男| 免费看黄色a级片| 欧美影院久久久| 日韩中文字幕三区| 亚洲欧美精品在线观看| 欧美激情一区二区三区在线视频观看 | 亚洲一区免费网站| 九九热这里只有精品免费看| 国产精品日韩一区二区三区| 国产成人91久久精品| 91精品视频在线看| www.久久草| 成人免费aaa| 成人国产精品久久久久久亚洲| 欧美极品欧美精品欧美图片| 欧美专区在线视频| 日韩精品一区二区三区电影| 日本手机在线视频| 日本高清不卡三区| 日本精品一区二区三区不卡无字幕| 午夜免费日韩视频| 污污污污污污www网站免费| 亚洲va码欧洲m码| 亚洲va国产va天堂va久久| 亚洲欧洲精品在线观看| 中文字幕人妻熟女人妻洋洋| 久精品免费视频| 在线观看欧美一区| 久久久久久91| 中文字幕日韩精品久久| 一区中文字幕在线观看| 亚洲午夜精品国产| 亚洲一区二区在线观| 亚洲一区二区三区欧美| 亚洲欧美丝袜| 日本最新高清不卡中文字幕| 日本久久精品视频| 亚洲va男人天堂| 日本久久久久久久久| 欧美午夜视频在线| 黄色www网站| 国产日韩三区| 高清在线观看免费| 风间由美久久久| 国内揄拍国内精品| 国产精品一国产精品最新章节| www.欧美日本| 国产va免费精品高清在线| www.久久久久| 国产精品高清免费在线观看| 欧美精品国产精品日韩精品| 亚洲国产精品久久久久婷蜜芽 | 国产成人亚洲精品| 色吧影院999| 久久视频在线看| 精品国产三级a∨在线| 亚洲一区亚洲二区| 日韩欧美黄色大片| 国产午夜精品一区| 91麻豆精品秘密入口| www国产亚洲精品久久网站| 国产精品久久国产三级国电话系列| 色综合久久悠悠| 亚洲一区二区三区毛片| 日韩免费在线看| 国产日韩欧美亚洲一区| 久久天天狠狠| 久久婷婷国产麻豆91天堂| 亚洲欧洲精品一区二区三区波多野1战4| 日韩在线综合网| 国内精品400部情侣激情| 97精品视频在线| 国产精品手机播放| 亚洲免费视频一区|