国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女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怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产真实乱子伦| 欧美 日韩 国产 在线观看| 日本一本草久p| 成人国产精品av| 少妇人妻无码专区视频| 日韩精品一区二区三区丰满| 欧美专区日韩视频| 国产精品777| 日韩av高清在线播放| 久久伦理网站| 欧美亚洲国产视频| 亚洲影视九九影院在线观看| 日韩国产精品一区二区三区| 日本一区二区黄色| 97久久国产精品| 在线精品日韩| 粉嫩精品一区二区三区在线观看| 国产精品久久久久免费| 欧美日韩亚洲第一| 国产精品美女免费看| 日韩区国产区| www.亚洲免费视频| 青草视频在线观看视频| 日韩在线视频免费观看| 欧美在线播放cccc| 国产精品久久久久久久久久久不卡 | 国产成人一区二区三区电影| 午夜老司机精品| 91精品国产综合久久香蕉| 一卡二卡3卡四卡高清精品视频| 国产日韩一区二区在线观看| 精品国产一区二区三区四区vr | 欧美高清性xxxxhdvideosex| 国产精品久久网| 国产一区香蕉久久| 久久久久久av| 91精品久久久久久久久久久久久久 | 久久精品电影一区二区| 国内精品久久久久| 色综合视频一区中文字幕| 国产伦精品一区二区| 在线视频不卡一区二区三区| 97欧美精品一区二区三区| 日本一区二区三区在线视频| 国产成人精品一区二区三区| 免费精品视频一区| 久久99精品久久久久久噜噜 | 久久婷婷开心| 欧美日韩一区二区三区在线观看免| 久久人人爽人人爽人人片亚洲| 国产一区一区三区| 色一情一乱一乱一区91| 久久久精品视频在线观看| 欧美日韩亚洲免费| 亚洲最大成人网色| 久久免费国产视频| 欧美成人一区二区在线观看| 最新国产精品久久| 久久精品ww人人做人人爽| 欧美亚洲精品日韩| 久久99精品视频一区97| 国产成人精彩在线视频九色| 精品无人乱码一区二区三区的优势 | 国产精品日本一区二区| 成人免费观看毛片| 日本高清视频精品| 国产精品高潮呻吟视频| 97国产精品视频| 欧美午夜精品久久久久久蜜| 欧美老少配视频| 国产肥臀一区二区福利视频| 蜜桃免费区二区三区| 日韩在线视频在线| 精品国产_亚洲人成在线| 偷拍视频一区二区| 国产va免费精品高清在线| www久久99| 欧美在线精品免播放器视频| 一区二区精品在线观看| 精品国产依人香蕉在线精品| av色综合网| 免费高清在线观看免费| 日本中文字幕在线视频观看| 久久99久久久久久久噜噜| 久久久视频免费观看| 免费av在线一区二区| 日本一区二区在线播放| 一区二区免费电影| 国产精品久久久久999| 久久精品五月婷婷| 99久久免费观看| 国产一区二区三区黄| 欧美在线观看日本一区| 懂色一区二区三区av片| 欧美激情18p| 国产精品黄页免费高清在线观看| 久久黄色免费看| 91精品一区二区三区四区| 国产欧美精品日韩精品| 欧美国产日韩激情| 日本国产一区二区三区| 午夜精品视频网站| 在线日韩av永久免费观看| 久久综合网hezyo| zzjj国产精品一区二区| 色噜噜狠狠狠综合曰曰曰| 久久久无码中文字幕久...| 成人国产精品色哟哟| 国产免费色视频| 国产综合色一区二区三区| 欧美激情视频一区二区三区| 日韩视频在线视频| 日本三级中文字幕在线观看| 午夜精品久久久久久99热| 久久99亚洲热视| 久久在线精品视频| 欧美成aaa人片在线观看蜜臀| 国产精品久久久久久婷婷天堂| 久久精品99久久香蕉国产色戒| 九九九九免费视频| 久久久久久久久久久久久久久久av| 久久亚裔精品欧美| 久久这里只有精品23| 久久久精品有限公司| 国产成人在线免费看| 久久福利电影| 日韩在线一区二区三区免费视频| 久草综合在线观看| 久久久久久久久电影| 久久免费视频1| 国产夫妻自拍一区| 久久精品日韩| 色青青草原桃花久久综合| 久久久久久久久久伊人| 久久久久久久久久久福利| 日韩色av导航| 久久视频在线看| 国产精品久久久久久久电影| 精品中文字幕乱| 一区二区三区一级片| 亚洲免费不卡| 日本精品www| 欧美激情国产精品日韩| 精品一区二区三区免费毛片| 国产一区二区色| 国产女主播一区二区三区| 粉嫩av免费一区二区三区| 7777精品视频| 日韩中文第一页| 麻豆成人在线看| 亚洲欧洲一二三| 岛国视频一区| 欧美专区一二三| 国产日韩精品一区观看| 国产精品一区二区三区精品| 91精品久久久久久久久青青| 97人人模人人爽视频一区二区| 国产成人综合精品在线| 国产精品久久网| 亚洲色图自拍| 日产精品久久久一区二区| 欧在线一二三四区| 日韩中文字幕一区二区| 日本一级黄视频| 欧美激情中文字幕乱码免费| 欧美日韩一区二区三区在线观看免| 黄色高清视频网站| 古典武侠综合av第一页| 久久精品久久精品国产大片| 国产精品色悠悠| 在线观看欧美亚洲| 亚洲精品国产suv一区88| 欧美亚洲一区在线| 福利精品视频| 久久精品日产第一区二区三区精品版| 91美女福利视频高清| 久久精品视频va| 亚洲欧美丝袜| 欧美一区深夜视频| 99在线视频免费观看| 国产成人精品在线视频| 中文字幕人妻熟女人妻洋洋 | 激情视频小说图片| 97免费高清电视剧观看| 国产成人精品在线视频| 中文字幕一区二区三区四区五区人| 欧美日韩国产精品一区二区| 99在线观看| www.日韩视频| 一区二区三区在线观看www| 欧美少妇一区| 国产精品99一区| 国产精品精品软件视频| 色噜噜狠狠一区二区三区| 蜜桃传媒一区二区| 久久久噜噜噜www成人网| 亚洲综合第一页| 麻豆久久久9性大片| 国产成人av在线| 亚洲精品不卡|