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爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                国产亚洲一本大道中文在线| jvid福利写真一区二区三区| 日韩一区国产二区欧美三区| **网站欧美大片在线观看| 国产一区视频网站| 国产视频一区二区在线观看| 国产伦精品一区二区三区视频青涩 | 337p粉嫩大胆噜噜噜噜噜91av| 亚洲高清中文字幕| 欧美在线看片a免费观看| 美女www一区二区| 欧美日韩高清一区二区三区| 国产精品1区2区3区| 热久久国产精品| 成人精品视频.| 中文字幕一区二区三区蜜月| 精品三级在线看| 婷婷久久综合九色国产成人 | 久久精品欧美一区二区三区不卡 | 日韩成人午夜电影| 免费观看91视频大全| 日韩欧美中文字幕公布| 91美女在线观看| 日韩精品91亚洲二区在线观看| 91.麻豆视频| 久久97超碰色| 亚洲久草在线视频| 久久一区二区视频| 免费成人在线视频观看| 亚洲国产成人tv| 国产女同互慰高潮91漫画| 色婷婷精品大视频在线蜜桃视频 | 综合欧美一区二区三区| 国产精品不卡在线| 亚洲主播在线观看| 亚洲情趣在线观看| 日本欧美一区二区三区| 老司机免费视频一区二区| 一区二区三区在线看| 日韩av电影免费观看高清完整版在线观看| 亚洲国产精品嫩草影院| 国产伦理精品不卡| 99久久精品99国产精品| 欧美va在线播放| 26uuu国产在线精品一区二区| 亚洲日本一区二区| 天堂成人国产精品一区| 精品亚洲成a人| 欧美午夜精品一区二区蜜桃| 欧美性色aⅴ视频一区日韩精品| 天天色图综合网| 美女久久久精品| 欧美日韩卡一卡二| 欧美成人艳星乳罩| 欧美在线播放高清精品| 欧美精品一级二级三级| 在线亚洲高清视频| 精品国产乱码久久久久久牛牛| 国产91精品精华液一区二区三区| 欧美日韩精品欧美日韩精品一综合| 制服丝袜亚洲精品中文字幕| 欧美成人官网二区| 久久综合色综合88| 夜夜夜精品看看| 欧美一级片免费看| 日韩福利电影在线| 免播放器亚洲一区| 日韩视频123| 欧美成人video| 国产精品美女久久久久久久| 亚洲精品欧美在线| 国产精品白丝jk黑袜喷水| 91在线视频18| 久久久精品天堂| 日日摸夜夜添夜夜添国产精品| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 久久综合色综合88| 日韩不卡免费视频| 色欧美片视频在线观看在线视频| 久久久久久综合| 国产精品一区二区果冻传媒| 日韩美女一区二区三区| 亚洲综合色网站| 91在线视频播放地址| 一区二区在线看| 欧美视频精品在线| 欧美国产激情二区三区| 日韩中文字幕1| 成人综合在线网站| 欧美sm美女调教| 日韩视频免费观看高清完整版 | 一区二区三区丝袜| 成人精品免费视频| 欧美一区欧美二区| 欧美xxxxx牲另类人与| 国产suv精品一区二区三区| 欧美日韩高清一区| 久久女同性恋中文字幕| 日韩成人一级片| 欧美日韩一区视频| 性久久久久久久久久久久| 色综合久久综合| 一区二区三区 在线观看视频| 9久草视频在线视频精品| 欧美日韩五月天| 久久免费国产精品| 国产一区二区电影| 久久一留热品黄| 精品一区二区日韩| 成人高清视频在线| 欧美国产亚洲另类动漫| 香港成人在线视频| 久久久国产一区二区三区四区小说| 免费不卡在线观看| 中文字幕在线一区| 91丨九色丨尤物| 久久国内精品视频| 中文字幕精品综合| 欧美日韩一区在线观看| 日本中文字幕不卡| 欧美综合天天夜夜久久| 韩国成人福利片在线播放| 国产清纯白嫩初高生在线观看91 | 欧美性猛交xxxxxxxx| 亚洲精品成人悠悠色影视| 在线亚洲人成电影网站色www| 一区二区三区av电影| 成人福利视频网站| 亚洲精品v日韩精品| 久久久美女艺术照精彩视频福利播放 | 国产精品国产三级国产| 国内欧美视频一区二区| 中文字幕永久在线不卡| 91国偷自产一区二区开放时间| 日本不卡一区二区| 日本一区二区不卡视频| 在线观看欧美精品| 国内精品免费**视频| 亚洲国产精品综合小说图片区| 国产亚洲福利社区一区| 色一情一伦一子一伦一区| 欧美日韩一二区| 精品国产一区久久| 国产精品毛片久久久久久| 伊人一区二区三区| 国产精品白丝jk白祙喷水网站| 成人黄色综合网站| 欧美一区二区不卡视频| 亚洲一区二区三区中文字幕 | 丝瓜av网站精品一区二区| 久久综合给合久久狠狠狠97色69| 91福利精品第一导航| 亚洲国产精品v| 欧美老肥妇做.爰bbww视频| 欧美日韩国产免费一区二区 | 欧美日韩在线亚洲一区蜜芽| 欧美午夜精品一区二区蜜桃| 久久一区二区视频| 蜜臀av国产精品久久久久| 色8久久人人97超碰香蕉987| 久久婷婷久久一区二区三区| 亚洲国产精品欧美一二99| 成人h动漫精品一区二| 久久午夜老司机| 久久99精品国产麻豆婷婷| 久久久久99精品一区| 成人黄色在线网站| 亚洲色图在线看| 日韩欧美精品三级| 国产欧美精品区一区二区三区| 国产免费久久精品| 欧美在线观看视频在线| 日韩欧美一二三四区| 欧美日韩中文国产| 国产日韩三级在线| 6080午夜不卡| 678五月天丁香亚洲综合网| 91免费版在线看| 欧美在线免费视屏| 91亚洲精品久久久蜜桃网站| 91色porny| 色婷婷狠狠综合| 卡一卡二国产精品 | 欧美天天综合网| 丝袜诱惑制服诱惑色一区在线观看| 久久综合久久综合亚洲| 日韩精品电影一区亚洲| 久久久午夜精品理论片中文字幕| 国产麻豆精品95视频| 欧美韩国一区二区| 亚洲一区二区成人在线观看| 亚洲男帅同性gay1069| 国产精品一区二区三区乱码| 51精品久久久久久久蜜臀| 国产1区2区3区精品美女| 国产91精品精华液一区二区三区| 婷婷夜色潮精品综合在线| 国产精品自在欧美一区| 国产精品二区一区二区aⅴ污介绍| 亚洲精选视频在线|