nlp代写 | 代做Machine learning | Python代做 | ai代写 | 人工智能代写 – NLP Coursework (2)

NLP Coursework (2)

nlp代写 | 代做Machine learning | Python代做 | ai代写 | 人工智能代写 – 这是一个关于Python的题目, 主要考察了关于nlp的内容,是一个比较经典的题目, 是有一定代表意义的nlp/Machine learning/Python等代写方向

python代写 代写python

Dell Zhang

Birkbeck, University of London

2021/

Part 2 of the  Machine learning 人工智能"> nlp coursework is worth 10 marks.
  1. (2 marks)
A software vendor claims that their IR system outputs the following result
for a TREC query. Is there anything suspicious? Please listallthe errors
that you can find.
Ranking Recall Precision
1.d 8 10% 80%
2.d 32 30% 70%
3.d 98 40% 60%
4.d 124 30% 50%
5.d 9 40% 40%
6.d 78 40% 30%
7.d 73 40% 20%
  1. (4 marks)
Train two models,multinominalNa ve Bayes andbinarizedNa ve Bayes,
both with Laplace smoothing, on the following document counts for key
sentiment words, with positive or negative class assigned as noted.
doc good poor great class
d 1 3 0 3 pos
d 2 0 1 2 pos
d 3 1 3 0 neg
d 4 1 5 2 neg
d 5 0 2 0 neg
Use both models to assign a class (pos or neg) to this sentenced 6 :
1
Good cast, good acting, great music, but poor story.
Do these two models agree or disagree? Please show your calculations in
detail for their learning and prediction.
  1. (2 marks)
Given the same training documents as in the previous question, build
a Logistic Regression model for sentiment classification, using the term
frequencies of those three sentiment words (good,poor, andgreat) as the
three features (x 1 ,x 2 , andx 3 ) respectively.
What is the final equation for the probability of a document being positive
in the constructed model? How would it classify the test documentd 6?
Please write a  Python program to solve this problem. You donotneed
to submit your code; only the final answers are required.
  1. (2 marks)
Given the following 34 term-document matrixC, perform Latent Se-
mantic Indexing (LSI), aka Latent Semantic Analysis (LSA), using rank-
truncatedSingular Value Decomposition (SVD).
C=
1 0 0 2
0 0 3 0
0 2 0 0
What will beU 2 the truncated SVD term matrix? What will beV 2 Tthe
truncated SVD document matrix? What will beC 2 the rank-2 approxi-
mation of the term-document matrix?
Please write a Python program to solve this problem. You donotneed
to submit your code; only the final answers are required.
2