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

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 trae 豆包網頁版入口 目錄網 排行網

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

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

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                亚洲一区欧美一区| 亚洲精品欧美在线| 亚洲国产精品嫩草影院| 欧美色图在线观看| 亚洲a一区二区| 精品久久久久久久人人人人传媒| 国产一区二区福利视频| 国产精品成人免费精品自在线观看 | 欧美性生活影院| 免费观看一级特黄欧美大片| 久久久国产精华| 日本道免费精品一区二区三区| 天天av天天翘天天综合网| 久久婷婷一区二区三区| 欧日韩精品视频| 久久精品国产澳门| 亚洲精品视频在线看| 欧美变态tickling挠脚心| www.视频一区| 久久精品国产99国产| 中文字幕一区二区三区乱码在线| 欧美日韩高清一区二区三区| 国产精品亚洲一区二区三区妖精| 亚洲成人自拍网| 国产精品视频一二三区| 欧美人狂配大交3d怪物一区| 国产激情一区二区三区四区 | 91极品美女在线| 狠狠色综合色综合网络| 亚洲成人免费在线| 最新热久久免费视频| 久久久综合精品| 日韩一区二区电影网| 欧美体内she精高潮| av激情亚洲男人天堂| 国产美女主播视频一区| 久久精品国内一区二区三区| 五月天精品一区二区三区| 亚洲色图.com| 日韩一区在线免费观看| 国产丝袜美腿一区二区三区| 精品国一区二区三区| 日韩午夜精品电影| 欧美一级午夜免费电影| 欧美日韩精品综合在线| 欧美综合一区二区| 欧美在线观看你懂的| 91国产视频在线观看| 国产真实乱偷精品视频免| 亚洲免费高清视频在线| 久久久久久久久久久电影| 欧美一二三区在线观看| 日韩欧美一区二区免费| 欧美综合一区二区| 欧美电影一区二区三区| 欧美特级限制片免费在线观看| 99精品久久久久久| 色屁屁一区二区| 欧美少妇bbb| 日韩午夜在线观看| 国产日韩高清在线| 一色屋精品亚洲香蕉网站| 亚洲视频免费观看| 国产精品久久网站| 国产日产欧美精品一区二区三区| 日韩美女一区二区三区四区| 久久久亚洲高清| 国产亚洲欧美一区在线观看| 国产精品国产三级国产| 伊人婷婷欧美激情| 丝袜美腿一区二区三区| 久久精品av麻豆的观看方式| 日韩不卡一区二区| 国产大陆亚洲精品国产| 在线视频一区二区三区| 欧美大片拔萝卜| 亚洲国产精品精华液ab| 一区二区三区四区激情| 亚洲欧美视频在线观看视频| 亚洲人成小说网站色在线| 亚洲va欧美va人人爽| 久久国产尿小便嘘嘘| 大胆亚洲人体视频| 欧美一区二区在线免费观看| 久久女同精品一区二区| 亚洲精品久久久蜜桃| 久久电影国产免费久久电影| 99热在这里有精品免费| 欧美一级理论片| 亚洲精选在线视频| 国产成人av影院| 欧美伦理影视网| 日本一区二区视频在线观看| 亚洲欧洲在线观看av| 婷婷夜色潮精品综合在线| 国产成人av一区二区| 欧美精品第一页| 亚洲精品国久久99热| 国产在线不卡视频| 欧美亚洲国产bt| 国产精品久久久久一区| 国产成人精品一区二| 久久综合资源网| 免费成人结看片| 欧美综合在线视频| 一区二区三区四区精品在线视频| 成人丝袜18视频在线观看| 色猫猫国产区一区二在线视频| 在线观看成人小视频| 日韩西西人体444www| 青青草国产成人av片免费| 欧美性猛交一区二区三区精品| 成人免费在线视频| heyzo一本久久综合| 欧美美女网站色| 亚洲激情图片qvod| 91豆麻精品91久久久久久| 国产精品网曝门| 99视频超级精品| 国产精品国产三级国产aⅴ入口 | 国产成人精品免费网站| 日韩精品影音先锋| 亚洲另类色综合网站| 久久99精品久久久久久久久久久久| 91丨porny丨蝌蚪视频| 尤物av一区二区| 欧美日韩一区二区三区高清 | 亚洲一级电影视频| 91视频观看免费| 一区二区三区欧美视频| 91在线视频官网| 亚洲欧美综合网| 91亚洲男人天堂| 一区二区在线观看免费| 欧美日韩免费在线视频| 午夜国产精品一区| 一本久久精品一区二区| 久久伊人蜜桃av一区二区| 亚洲福利一区二区| 91精品国产美女浴室洗澡无遮挡| 日韩成人一级大片| 国产日韩欧美不卡在线| 色94色欧美sute亚洲线路一久| 亚洲h在线观看| 欧美精品一区二区三区四区 | 国产福利精品导航| 亚洲男女一区二区三区| 91国产视频在线观看| 有坂深雪av一区二区精品| 欧美午夜一区二区三区免费大片| 亚洲一区在线播放| 日韩视频一区二区三区在线播放 | 欧美丰满嫩嫩电影| 狠狠色狠狠色综合日日91app| 国产精品色婷婷久久58| 成人av免费网站| 国产精品视频九色porn| av亚洲精华国产精华| 亚洲品质自拍视频网站| 51精品视频一区二区三区| 国产a精品视频| 一区二区三区精品视频| 成人黄色国产精品网站大全在线免费观看 | 国产精品久久久久久妇女6080| 韩国欧美国产一区| 亚洲国产精品传媒在线观看| 九色综合狠狠综合久久| 欧美一级欧美三级在线观看| 99精品视频在线播放观看| 美日韩一区二区| 久久久久久久网| 国产91精品免费| 国产精品人成在线观看免费| 欧美日韩不卡在线| 91美女精品福利| 国产一区二区三区免费播放| 国产精品乱子久久久久| 99re视频这里只有精品| 午夜久久福利影院| 日韩欧美一级精品久久| 欧美日韩国产高清一区二区三区 | 欧美高清视频在线高清观看mv色露露十八 | 免费观看在线色综合| 亚洲精品欧美专区| 欧美一级专区免费大片| 国产成人av一区二区三区在线| 午夜电影网亚洲视频| 亚洲一区二区不卡免费| 一区二区三区欧美| 一区二区三区四区乱视频| 1024精品合集| 国产亚洲综合av| 久久久国际精品| 久久久www免费人成精品| 精品理论电影在线观看| 欧美一区永久视频免费观看| 88在线观看91蜜桃国自产| 欧美日韩午夜精品| 在线免费观看视频一区| 国产99久久精品|