question
stringlengths
6
3.53k
text
stringlengths
17
2.05k
source
stringclasses
1 value
What is the problem addressed by a Part-of-Speech (PoS) tagger? Why isn't it trivial? What are the two main difficulties?
A Part-Of-Speech Tagger (POS Tagger) is a piece of software that reads text in some language and assigns parts of speech to each word (and other token), such as noun, verb, adjective, etc., although generally computational applications use more fine-grained POS tags like 'noun-plural'. Developed in the early 1980s, CLAWS was built to fill the ever-growing gap created by always-changing POS necessities. Originally created to add part-of-speech tags to the LOB corpus of British English, the CLAWS tagset has since been adapted to other languages as well, including Urdu and Arabic.Since its inception, CLAWS has been hailed for its functionality and adaptability.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What is the problem addressed by a Part-of-Speech (PoS) tagger? Why isn't it trivial? What are the two main difficulties?
In corpus linguistics, part-of-speech tagging (POS tagging or PoS tagging or POST), also called grammatical tagging is the process of marking up a word in a text (corpus) as corresponding to a particular part of speech, based on both its definition and its context. A simplified form of this is commonly taught to school-age children, in the identification of words as nouns, verbs, adjectives, adverbs, etc. Once performed by hand, POS tagging is now done in the context of computational linguistics, using algorithms which associate discrete terms, as well as hidden parts of speech, by a set of descriptive tags. POS-tagging algorithms fall into two distinctive groups: rule-based and stochastic. E. Brill's tagger, one of the first and most widely used English POS-taggers, employs rule-based algorithms.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
A company active in automatic recognition of hand-written documents needs to improve the quality of their recognizer. This recognizer produces sets of sequences of correct English words, but some of the produced sequences do not make any sense. For instance the processing of a given hand-written input can produce a set of transcriptions like: 'A was salmon outer the does', 'It was a afternoon nice sunny', and 'I Thomas at mice not the spoon'. What is wrong with such sentences? NLP techniques of what level might allow the system to select the correct one(s)? What would be the required resources?
Another problem is inter-judge variance. WSD systems are normally tested by having their results on a task compared against those of a human. However, while it is relatively easy to assign parts of speech to text, training people to tag senses has been proven to be far more difficult. While users can memorize all of the possible parts of speech a word can take, it is often impossible for individuals to memorize all of the senses a word can take. Moreover, humans do not agree on the task at hand – give a list of senses and sentences, and humans will not always agree on which word belongs in which sense.As human performance serves as the standard, it is an upper bound for computer performance. Human performance, however, is much better on coarse-grained than fine-grained distinctions, so this again is why research on coarse-grained distinctions has been put to test in recent WSD evaluation exercises.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
A company active in automatic recognition of hand-written documents needs to improve the quality of their recognizer. This recognizer produces sets of sequences of correct English words, but some of the produced sequences do not make any sense. For instance the processing of a given hand-written input can produce a set of transcriptions like: 'A was salmon outer the does', 'It was a afternoon nice sunny', and 'I Thomas at mice not the spoon'. What is wrong with such sentences? NLP techniques of what level might allow the system to select the correct one(s)? What would be the required resources?
Textonyms are not the only issue limiting the effectiveness of predictive text implementations. Another significant problem are words for which the disambiguation produces a single, incorrect response. The system may, for example, respond with Blairf upon input of 252473, when the intended word was Blaise or Claire, both of which correspond to the keystroke sequence, but are not, in this example, found by the predictive text system. When typos or misspellings occur, they are very unlikely to be recognized correctly by a disambiguation system, though error correction mechanisms may mitigate that effect.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider an HMM Part-of-Speech tagger, the tagset of which contains, among others: DET, N, V, ADV and ADJ, and some of the parameters of which are: $$ \begin{gathered} P_{1}(\mathrm{a} \mid \mathrm{DET})=0.1, \quad P_{1}(\text {accurately} \mid \mathrm{ADV})=0.1, \quad P_{1}(\text {computer} \mid \mathrm{N})=0.1, \\ P_{1}(\text {process} \mid \mathrm{N})=0.095, \quad P_{1}(\text {process} \mid \mathrm{V})=0.005, \\ P_{1}(\text {programs} \mid \mathrm{N})=0.080, \quad P_{1}(\text {programs} \mid \mathrm{V})=0.020, \end{gathered} $$ \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|} \hline & & \multicolumn{5}{|l|}{$\mathrm{Y} \rightarrow$} \\ \hline & & $\mathrm{DET}$ & N & V & ADJ & $\mathrm{ADV}$ \\ \hline \multirow[t]{5}{*}{$X \downarrow$} & $\mathrm{DET}$ & 0 & 0.55 & 0 & 0.02 & 0.03 \\ \hline & $\mathrm{N}$ & 0.01 & 0.10 & 0.08 & 0.01 & 0.02 \\ \hline & V & 0.16 & 0.11 & 0.06 & 0.08 & 0.08 \\ \hline & ADJ & 0.01 & 0.65 & 0 & 0.05 & 0 \\ \hline & ADV & 0.08 & 0.02 & 0.09 & 0.04 & 0.04 \\ \hline \end{tabular} \end{center} $P_{2}(\mathrm{Y} \mid \mathrm{X}):\left(\right.$ for instance $\left.P_{2}(\mathrm{~N} \mid \mathrm{DET})=0.55\right)$ and: $P_{3}(\mathrm{DET})=0.20, \quad P_{3}(\mathrm{~N})=0.06, \quad P_{3}(\mathrm{~V})=0.08, \quad P_{3}(\mathrm{ADV})=0.07, \quad P_{3}(\mathrm{ADJ})=0.02$. What would be the output of the HMM PoS tagger on the above sentence? Fully justify your answer. \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|} \hline $\mathrm{x}$ & $\mathrm{y}$ & $\mathrm{xlN}$ & processlx & ylx & programsly & ADVly \\ \hline\hline $\mathrm{N}$ & $\mathrm{N}$ & 10 & 95 & 10 & 80 & 2 \\ \hline $\mathrm{V}$ & $\mathrm{N}$ & 8 & 5 & 11 & 80 & 2 \\ \hline $\mathrm{N}$ & $\mathrm{V}$ & 10 & 95 & 8 & 20 & 8 \\ \hline $\mathrm{V}$ & $\mathrm{V}$ & 8 & 5 & 6 & 20 & 8 \\ \hline \end{tabular} \end{center}
CLAWS, DeRose's and Church's methods did fail for some of the known cases where semantics is required, but those proved negligibly rare. This convinced many in the field that part-of-speech tagging could usefully be separated from the other levels of processing; this, in turn, simplified the theory and practice of computerized language analysis and encouraged researchers to find ways to separate other pieces as well. Markov Models became the standard method for the part-of-speech assignment.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider an HMM Part-of-Speech tagger, the tagset of which contains, among others: DET, N, V, ADV and ADJ, and some of the parameters of which are: $$ \begin{gathered} P_{1}(\mathrm{a} \mid \mathrm{DET})=0.1, \quad P_{1}(\text {accurately} \mid \mathrm{ADV})=0.1, \quad P_{1}(\text {computer} \mid \mathrm{N})=0.1, \\ P_{1}(\text {process} \mid \mathrm{N})=0.095, \quad P_{1}(\text {process} \mid \mathrm{V})=0.005, \\ P_{1}(\text {programs} \mid \mathrm{N})=0.080, \quad P_{1}(\text {programs} \mid \mathrm{V})=0.020, \end{gathered} $$ \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|} \hline & & \multicolumn{5}{|l|}{$\mathrm{Y} \rightarrow$} \\ \hline & & $\mathrm{DET}$ & N & V & ADJ & $\mathrm{ADV}$ \\ \hline \multirow[t]{5}{*}{$X \downarrow$} & $\mathrm{DET}$ & 0 & 0.55 & 0 & 0.02 & 0.03 \\ \hline & $\mathrm{N}$ & 0.01 & 0.10 & 0.08 & 0.01 & 0.02 \\ \hline & V & 0.16 & 0.11 & 0.06 & 0.08 & 0.08 \\ \hline & ADJ & 0.01 & 0.65 & 0 & 0.05 & 0 \\ \hline & ADV & 0.08 & 0.02 & 0.09 & 0.04 & 0.04 \\ \hline \end{tabular} \end{center} $P_{2}(\mathrm{Y} \mid \mathrm{X}):\left(\right.$ for instance $\left.P_{2}(\mathrm{~N} \mid \mathrm{DET})=0.55\right)$ and: $P_{3}(\mathrm{DET})=0.20, \quad P_{3}(\mathrm{~N})=0.06, \quad P_{3}(\mathrm{~V})=0.08, \quad P_{3}(\mathrm{ADV})=0.07, \quad P_{3}(\mathrm{ADJ})=0.02$. What would be the output of the HMM PoS tagger on the above sentence? Fully justify your answer. \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|} \hline $\mathrm{x}$ & $\mathrm{y}$ & $\mathrm{xlN}$ & processlx & ylx & programsly & ADVly \\ \hline\hline $\mathrm{N}$ & $\mathrm{N}$ & 10 & 95 & 10 & 80 & 2 \\ \hline $\mathrm{V}$ & $\mathrm{N}$ & 8 & 5 & 11 & 80 & 2 \\ \hline $\mathrm{N}$ & $\mathrm{V}$ & 10 & 95 & 8 & 20 & 8 \\ \hline $\mathrm{V}$ & $\mathrm{V}$ & 8 & 5 & 6 & 20 & 8 \\ \hline \end{tabular} \end{center}
CLAWS, DeRose's and Church's methods did fail for some of the known cases where semantics is required, but those proved negligibly rare. This convinced many in the field that part-of-speech tagging could usefully be separated from the other levels of processing; this, in turn, simplified the theory and practice of computerized language analysis and encouraged researchers to find ways to separate other pieces as well. Markov Models became the standard method for the part-of-speech assignment.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What is a good distance metric to be used when you want to compute the similarity between documents independent of their length?A penalty will be applied for any incorrect answers.
As a simple example, a reference object can be chosen from the data set, and the remainder of the set divided into two parts based on distance to this object: those close to the reference object in set A, and those far from the object in set B. If, when the set is later queried, the distance from the query to the reference object is large, then none of the objects within set A can be very close to the query; if it is very small, then no object within set B can be close to the query. Once such situations are quantified and studied, many different metric indexing structures can be designed, variously suitable for different types of collections. The research domain of metric search can thus be characterised as the study of pre-processing algorithms over large and relatively static collections of data which, using the properties of metric spaces, allow efficient similarity search to be performed.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What is a good distance metric to be used when you want to compute the similarity between documents independent of their length?A penalty will be applied for any incorrect answers.
The similarity metric is determined by: 2 K m | S 1 | + | S 2 | = 2 ⋅ ( | ''WIKIM'' | + | ''IA'' | ) | S 1 | + | S 2 | = 2 ⋅ ( 5 + 2 ) 9 + 9 = 14 18 = 0. 7 ¯ {\displaystyle {\frac {2K_{m}}{|S_{1}|+|S_{2}|}}={\frac {2\cdot (|{\text{''WIKIM''}}|+|{\text{''IA''}}|)}{|S_{1}|+|S_{2}|}}={\frac {2\cdot (5+2)}{9+9}}={\frac {14}{18}}=0. {\overline {7}}}
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the task of classifying reviews as positive or negative. To create a reference for this task, two human annotators were asked to rate 1000 movie reviews as positive or negative.The first annotator rated {a} reviews as positive and the rest as negative. The second annotator rated {b} reviews as positive and the rest as negative. 80 reviews were rated as positive by both annotators. What is the raw agreement between the two annotators?Give your answer as a numerical value to three decimal places.
How does an analyst compare something rated a 1 to something rated a 2? Is one twice as good as the other? Again there is no theoretical way of aggregating the data.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the task of classifying reviews as positive or negative. To create a reference for this task, two human annotators were asked to rate 1000 movie reviews as positive or negative.The first annotator rated {a} reviews as positive and the rest as negative. The second annotator rated {b} reviews as positive and the rest as negative. 80 reviews were rated as positive by both annotators. What is the raw agreement between the two annotators?Give your answer as a numerical value to three decimal places.
How does an analyst compare something rated a 1 to something rated a 2? Is one twice as good as the other? Again there is no theoretical way of aggregating the data.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following toy corpus: the cat cut the hat Considering only lowercase alphabetical and whitespace, how many bigrams are possible?
Let c ( w , w ′ ) {\displaystyle c(w,w')} be the number of occurrences of the word w {\displaystyle w} followed by the word w ′ {\displaystyle w'} in the corpus. The equation for bigram probabilities is as follows: p K N ( w i | w i − 1 ) = max ( c ( w i − 1 , w i ) − δ , 0 ) ∑ w ′ c ( w i − 1 , w ′ ) + λ w i − 1 p K N ( w i ) {\displaystyle p_{KN}(w_{i}|w_{i-1})={\frac {\max(c(w_{i-1},w_{i})-\delta ,0)}{\sum _{w'}c(w_{i-1},w')}}+\lambda _{w_{i-1}}p_{KN}(w_{i})} Where the unigram probability p K N ( w i ) {\displaystyle p_{KN}(w_{i})} depends on how likely it is to see the word w i {\displaystyle w_{i}} in an unfamiliar context, which is estimated as the number of times it appears after any other word divided by the number of distinct pairs of consecutive words in the corpus: p K N ( w i ) = | { w ′: 0 < c ( w ′ , w i ) } | | { ( w ′ , w ″ ): 0 < c ( w ′ , w ″ ) } | {\displaystyle p_{KN}(w_{i})={\frac {|\{w':0
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following toy corpus: the cat cut the hat Considering only lowercase alphabetical and whitespace, how many bigrams are possible?
Let c ( w , w ′ ) {\displaystyle c(w,w')} be the number of occurrences of the word w {\displaystyle w} followed by the word w ′ {\displaystyle w'} in the corpus. The equation for bigram probabilities is as follows: p K N ( w i | w i − 1 ) = max ( c ( w i − 1 , w i ) − δ , 0 ) ∑ w ′ c ( w i − 1 , w ′ ) + λ w i − 1 p K N ( w i ) {\displaystyle p_{KN}(w_{i}|w_{i-1})={\frac {\max(c(w_{i-1},w_{i})-\delta ,0)}{\sum _{w'}c(w_{i-1},w')}}+\lambda _{w_{i-1}}p_{KN}(w_{i})} Where the unigram probability p K N ( w i ) {\displaystyle p_{KN}(w_{i})} depends on how likely it is to see the word w i {\displaystyle w_{i}} in an unfamiliar context, which is estimated as the number of times it appears after any other word divided by the number of distinct pairs of consecutive words in the corpus: p K N ( w i ) = | { w ′: 0 < c ( w ′ , w i ) } | | { ( w ′ , w ″ ): 0 < c ( w ′ , w ″ ) } | {\displaystyle p_{KN}(w_{i})={\frac {|\{w':0
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the (toy) grammar $G$ consisting of the following rules: R1: S --> NP VP R2: NP --> NN R3: NP --> Det NN R4: NN --> N R5: NN --> NN NN R6: NN --> NN PNP R7: PNP --> Prep NP R8: VP --> V R9: VP --> Adv V In how many rules should the 9 rules provided for $G$ be expanded into to cope with simple number agreements? Justify your answer.
Thus, a prescribed sequence controlled grammar is at least approximately a 5-tuple G = ( N , T , S , P , R ) {\displaystyle G=(N,T,S,P,R)} where everything except R is the same as in a CFG, and R is an infinite set of valid derivation sequences p 1 p 2 . . .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the (toy) grammar $G$ consisting of the following rules: R1: S --> NP VP R2: NP --> NN R3: NP --> Det NN R4: NN --> N R5: NN --> NN NN R6: NN --> NN PNP R7: PNP --> Prep NP R8: VP --> V R9: VP --> Adv V In how many rules should the 9 rules provided for $G$ be expanded into to cope with simple number agreements? Justify your answer.
The authors stated that as each grammatical clause expresses a proposition, each verb mediated proposition can be identified by solely recognizing the set of clauses expressed in each sentence. This implies that to correctly recognize the set of propositions in an input sentence, it is necessary to understand its grammatical structure. The authors studied the case in the English language that only admits seven clause types, meaning that the identification of each proposition only requires defining seven grammatical patterns.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Your aim is to evaluate a movie review analysis system, the purpose of which is to classify the overall review's sentiment.For each movie review, such a system outputs one of the following classes: positive and negative.You perform your evaluation on a corpus that contains a total of 1000 reviews, out of which {neg} are negative reviews.What is the recall of a system which:predicted that {=({tn} + {fn})} are negative,and was correct for only {tn} of those negative reviews?Give your answer as a numerical value to two decimal places.
It is necessary for the critic to do so as some reviews are qualitative and do not grant a numeric score, making it impossible for the system to be automatic.The website keeps track of all the reviews counted for each film and calculates the percentage of positive reviews. Major recently released films can attract more than 400 reviews. If the positive reviews make up 60% or more, the film is considered "fresh".
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Your aim is to evaluate a movie review analysis system, the purpose of which is to classify the overall review's sentiment.For each movie review, such a system outputs one of the following classes: positive and negative.You perform your evaluation on a corpus that contains a total of 1000 reviews, out of which {neg} are negative reviews.What is the recall of a system which:predicted that {=({tn} + {fn})} are negative,and was correct for only {tn} of those negative reviews?Give your answer as a numerical value to two decimal places.
Sentiment analysis may involve analysis of movie reviews for estimating how favorable a review is for a movie. Such an analysis may need a labeled data set or labeling of the affectivity of words. Resources for affectivity of words and concepts have been made for WordNet and ConceptNet, respectively. Text has been used to detect emotions in the related area of affective computing. Text based approaches to affective computing have been used on multiple corpora such as students evaluations, children stories and news stories.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider an IR engine, which uses an indexing mechanism implementing the following 3 consecutive filters: a morpho-syntactic filter that restricts indexing term candidates to only nouns, and reduces them to their root forms; a frequencial filter parameterized with \(f_\text{min}=0.06\) (resp. \(f_\text{max}=0.20\)) as lower (resp. upper) cut-off value, expressed as relative frequencies; a stop word filter using the following stop list: {a, in, mouse, the}. and the following document \(d\): Cats are the worst enemies of rodents. After all, a cat is a cat: as soon as it can, it rushes into the bushes with only one target in mind: mice, mice and mice! Naturally, the cats of houses are less frightening, as for them croquette loaded dressers have replaced prey hiding bushes. Cat's life in the house is easy!... What is the multi-set resulting from the indexing of document \(d\) by the above described IR engine? Format your answer as an alphabetically ordered list of the form: "lemma1(tf1), lemma2(tf2), ...", where tfi is the term frequency of indexing term i. For instance: dog(2), frog(3), zebra(1)
One method for allowing rarer terms to be included and common words to be excluded by automated techniques would be a relative frequency approach where frequency of a word in a document is compared to frequency in the database as a whole. Therefore, a term that occurs more often in a document than might be expected based on the rest of the database could then be used as an index term, and terms that occur equally frequently throughout will be excluded. Another problem with automated extraction is that it does not recognize when a concept is discussed but is not identified in the text by an indexable keyword.Since this process is based on simple string matching and involves no intellectual analysis, the resulting product is more appropriately known as a concordance than an index.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider an IR engine, which uses an indexing mechanism implementing the following 3 consecutive filters: a morpho-syntactic filter that restricts indexing term candidates to only nouns, and reduces them to their root forms; a frequencial filter parameterized with \(f_\text{min}=0.06\) (resp. \(f_\text{max}=0.20\)) as lower (resp. upper) cut-off value, expressed as relative frequencies; a stop word filter using the following stop list: {a, in, mouse, the}. and the following document \(d\): Cats are the worst enemies of rodents. After all, a cat is a cat: as soon as it can, it rushes into the bushes with only one target in mind: mice, mice and mice! Naturally, the cats of houses are less frightening, as for them croquette loaded dressers have replaced prey hiding bushes. Cat's life in the house is easy!... What is the multi-set resulting from the indexing of document \(d\) by the above described IR engine? Format your answer as an alphabetically ordered list of the form: "lemma1(tf1), lemma2(tf2), ...", where tfi is the term frequency of indexing term i. For instance: dog(2), frog(3), zebra(1)
One method for allowing rarer terms to be included and common words to be excluded by automated techniques would be a relative frequency approach where frequency of a word in a document is compared to frequency in the database as a whole. Therefore, a term that occurs more often in a document than might be expected based on the rest of the database could then be used as an index term, and terms that occur equally frequently throughout will be excluded. Another problem with automated extraction is that it does not recognize when a concept is discussed but is not identified in the text by an indexable keyword.Since this process is based on simple string matching and involves no intellectual analysis, the resulting product is more appropriately known as a concordance than an index.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Explain how it is possible to compute Precision at different Recalls.
Precision and recall are single-value metrics based on the whole list of documents returned by the system. For systems that return a ranked sequence of documents, it is desirable to also consider the order in which the returned documents are presented. By computing a precision and recall at every position in the ranked sequence of documents, one can plot a precision-recall curve, plotting precision p ( r ) {\displaystyle p(r)} as a function of recall r {\displaystyle r} . Average precision computes the average value of p ( r ) {\displaystyle p(r)} over the interval from r = 0 {\displaystyle r=0} to r = 1 {\displaystyle r=1}: AveP = ∫ 0 1 p ( r ) d r {\displaystyle \operatorname {AveP} =\int _{0}^{1}p(r)dr} That is the area under the precision-recall curve.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Explain how it is possible to compute Precision at different Recalls.
Precision and recall are single-value metrics based on the whole list of documents returned by the system. For systems that return a ranked sequence of documents, it is desirable to also consider the order in which the returned documents are presented. By computing a precision and recall at every position in the ranked sequence of documents, one can plot a precision-recall curve, plotting precision p ( r ) {\displaystyle p(r)} as a function of recall r {\displaystyle r} . Average precision computes the average value of p ( r ) {\displaystyle p(r)} over the interval from r = 0 {\displaystyle r=0} to r = 1 {\displaystyle r=1}: AveP = ∫ 0 1 p ( r ) d r {\displaystyle \operatorname {AveP} =\int _{0}^{1}p(r)dr} That is the area under the precision-recall curve.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following sentence: High-energy pulsed laser beams are used in soft-tissue surgery. Using a 1-gram language model and a tokenizer that splits on whitespaces and punctuation (including hyphens (-)), assume that the tokenization is now enhanced with Named Entity Recognition (NER) specialized on technical and medical terms. What would be the advantage of doing so? What would be the major drawback? Justify your answers.
Developments in biomedical text mining have incorporated identification of biological entities with named entity recognition, or NER. Names and identifiers for biomolecules such as proteins and genes, chemical compounds and drugs, and disease names have all been used as entities. Most entity recognition methods are supported by pre-defined linguistic features or vocabularies, though methods incorporating deep learning and word embeddings have also been successful at biomedical NER.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following sentence: High-energy pulsed laser beams are used in soft-tissue surgery. Using a 1-gram language model and a tokenizer that splits on whitespaces and punctuation (including hyphens (-)), assume that the tokenization is now enhanced with Named Entity Recognition (NER) specialized on technical and medical terms. What would be the advantage of doing so? What would be the major drawback? Justify your answers.
In this example, a person name consisting of one token, a two-token company name and a temporal expression have been detected and classified. State-of-the-art NER systems for English produce near-human performance. For example, the best system entering MUC-7 scored 93.39% of F-measure while human annotators scored 97.60% and 96.95%.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In an automated email router of a company, we want to make the distinction between three kind of emails: technical (about computers), financial, and the rest ('irrelevant'). For this we plan to use a Naive Bayes approach. What is the main assumption made by Naive Bayes classifiers? Why is it 'Naive'? We will consider the following three messages: The Dow industrials tumbled 120.54 to 10924.74, hurt by GM's sales forecast and two economic reports. Oil rose to $71.92. BitTorrent Inc. is boosting its network capacity as it prepares to become a centralized hub for legal video content. In May, BitTorrent announced a deal with Warner Brothers to distribute its TV and movie content via the BT platform. It has now lined up IP transit for streaming videos at a few gigabits per second Intel will sell its XScale PXAxxx applications processor and 3G baseband processor businesses to Marvell for $600 million, plus existing liabilities. The deal could make Marvell the top supplier of 3G and later smartphone processors, and enable Intel to focus on its core x86 and wireless LAN chipset businesses, the companies say. Suppose we have collected the following statistics $3^{3}$ about the word frequencies within the corresponding classes, where '0.00...' stands for some very small value: \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|c|} \hline & technical & financial & irrelevant & & technical & financial & irrelevan \\ \hline $\$<$ number $>$ & 0.01 & 0.07 & 0.05 & deal & 0.01 & 0.02 & $0.00 \ldots$ \\ \hline Dow & $0.00 \ldots$ & 0.08 & $0.00 \ldots$ & forecast & $0.00 \ldots$ & 0.03 & 0.01 \\ \hline GM & $0.00 \ldots$ & 0.03 & $0.00 \ldots$ & gigabit & 0.03 & $0.00 \ldots$ & $0.00 \ldots$ \\ \hline IP & 0.03 & $0.00 \ldots$ & $0.00 \ldots$ & hub & 0.06 & $0.00 \ldots$ & 0.01 \\ \hline Intel & 0.02 & 0.02 & $0.00 \ldots$ & network & 0.04 & 0.01 & $0.00 \ldots$ \\ \hline business & 0.01 & 0.07 & 0.04 & processor & 0.07 & 0.01 & $0.00 \ldots$ \\ \hline capacity & 0.01 & $0.00 \ldots$ & $0.00 \ldots$ & smartphone & 0.04 & 0.04 & 0.01 \\ \hline chipset & 0.04 & 0.01 & $0.00 \ldots$ & wireless & 0.02 & 0.01 & $0.00 \ldots$ \\ \hline company & 0.01 & 0.04 & 0.05 & sen & re & . & . \\ \hline \end{tabular} \end{center} We now want to specifically focus on the processing of compounds such as 'network capacity' in the second text. How are the compounds handled by a Naive Bayes classifier if no specific pre-processing of compounds is used?
Naive Bayes classifiers are a popular statistical technique of e-mail filtering. They typically use bag-of-words features to identify email spam, an approach commonly used in text classification. Naive Bayes classifiers work by correlating the use of tokens (typically words, or sometimes other things), with spam and non-spam e-mails and then using Bayes' theorem to calculate a probability that an email is or is not spam. Naive Bayes spam filtering is a baseline technique for dealing with spam that can tailor itself to the email needs of individual users and give low false positive spam detection rates that are generally acceptable to users. It is one of the oldest ways of doing spam filtering, with roots in the 1990s.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In an automated email router of a company, we want to make the distinction between three kind of emails: technical (about computers), financial, and the rest ('irrelevant'). For this we plan to use a Naive Bayes approach. What is the main assumption made by Naive Bayes classifiers? Why is it 'Naive'? We will consider the following three messages: The Dow industrials tumbled 120.54 to 10924.74, hurt by GM's sales forecast and two economic reports. Oil rose to $71.92. BitTorrent Inc. is boosting its network capacity as it prepares to become a centralized hub for legal video content. In May, BitTorrent announced a deal with Warner Brothers to distribute its TV and movie content via the BT platform. It has now lined up IP transit for streaming videos at a few gigabits per second Intel will sell its XScale PXAxxx applications processor and 3G baseband processor businesses to Marvell for $600 million, plus existing liabilities. The deal could make Marvell the top supplier of 3G and later smartphone processors, and enable Intel to focus on its core x86 and wireless LAN chipset businesses, the companies say. Suppose we have collected the following statistics $3^{3}$ about the word frequencies within the corresponding classes, where '0.00...' stands for some very small value: \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|c|} \hline & technical & financial & irrelevant & & technical & financial & irrelevan \\ \hline $\$<$ number $>$ & 0.01 & 0.07 & 0.05 & deal & 0.01 & 0.02 & $0.00 \ldots$ \\ \hline Dow & $0.00 \ldots$ & 0.08 & $0.00 \ldots$ & forecast & $0.00 \ldots$ & 0.03 & 0.01 \\ \hline GM & $0.00 \ldots$ & 0.03 & $0.00 \ldots$ & gigabit & 0.03 & $0.00 \ldots$ & $0.00 \ldots$ \\ \hline IP & 0.03 & $0.00 \ldots$ & $0.00 \ldots$ & hub & 0.06 & $0.00 \ldots$ & 0.01 \\ \hline Intel & 0.02 & 0.02 & $0.00 \ldots$ & network & 0.04 & 0.01 & $0.00 \ldots$ \\ \hline business & 0.01 & 0.07 & 0.04 & processor & 0.07 & 0.01 & $0.00 \ldots$ \\ \hline capacity & 0.01 & $0.00 \ldots$ & $0.00 \ldots$ & smartphone & 0.04 & 0.04 & 0.01 \\ \hline chipset & 0.04 & 0.01 & $0.00 \ldots$ & wireless & 0.02 & 0.01 & $0.00 \ldots$ \\ \hline company & 0.01 & 0.04 & 0.05 & sen & re & . & . \\ \hline \end{tabular} \end{center} We now want to specifically focus on the processing of compounds such as 'network capacity' in the second text. How are the compounds handled by a Naive Bayes classifier if no specific pre-processing of compounds is used?
In statistics, naive Bayes classifiers are a family of simple "probabilistic classifiers" based on applying Bayes' theorem with strong (naive) independence assumptions between the features (see Bayes classifier). They are among the simplest Bayesian network models, but coupled with kernel density estimation, they can achieve high accuracy levels.Naive Bayes classifiers are highly scalable, requiring a number of parameters linear in the number of variables (features/predictors) in a learning problem. Maximum-likelihood training can be done by evaluating a closed-form expression,: 718 which takes linear time, rather than by expensive iterative approximation as used for many other types of classifiers. In the statistics literature, naive Bayes models are known under a variety of names, including simple Bayes and independence Bayes. All these names reference the use of Bayes' theorem in the classifier's decision rule, but naive Bayes is not (necessarily) a Bayesian method.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
For this question, one or more assertions can be correct. Tick only the correct assertion(s). There will be a penalty for wrong assertions ticked.Which of the following associations can be considered as illustrative examples for inflectional morphology (with here the simplifying assumption that canonical forms are restricted to the roots only)?
Many efforts to define the grammatical relations emphasize the role inflectional morphology. In English, the subject can or must agree with the finite verb in person and number, and in languages that have morphological case, the subject and object (and other verb arguments) are identified in terms of the case markers that they bear (e.g. nominative, accusative, dative, genitive, ergative, absolutive, etc.). Inflectional morphology may be a more reliable means for defining the grammatical relations than the configuration, but its utility can be very limited in many cases. For instance, inflectional morphology is not going to help in languages that lack inflectional morphology almost entirely such as Mandarin, and even with English, inflectional morphology does not help much, since English largely lacks morphological case.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
For this question, one or more assertions can be correct. Tick only the correct assertion(s). There will be a penalty for wrong assertions ticked.Which of the following associations can be considered as illustrative examples for inflectional morphology (with here the simplifying assumption that canonical forms are restricted to the roots only)?
Many efforts to define the grammatical relations emphasize the role inflectional morphology. In English, the subject can or must agree with the finite verb in person and number, and in languages that have morphological case, the subject and object (and other verb arguments) are identified in terms of the case markers that they bear (e.g. nominative, accusative, dative, genitive, ergative, absolutive, etc.). Inflectional morphology may be a more reliable means for defining the grammatical relations than the configuration, but its utility can be very limited in many cases. For instance, inflectional morphology is not going to help in languages that lack inflectional morphology almost entirely such as Mandarin, and even with English, inflectional morphology does not help much, since English largely lacks morphological case.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following lexicon \(L\): bear : V, N bears : V, N blue : Adj, N drink : N, V drinks : N, V Nice : Adj, N When using an order-1 HMM model (using \(L\)) to tag the word sequence:"Nice bears drink blue drinks"does the tag of drink depend on the tag of nice?
In the mid-1980s, researchers in Europe began to use hidden Markov models (HMMs) to disambiguate parts of speech, when working to tag the Lancaster-Oslo-Bergen Corpus of British English. HMMs involve counting cases (such as from the Brown Corpus) and making a table of the probabilities of certain sequences. For example, once you've seen an article such as 'the', perhaps the next word is a noun 40% of the time, an adjective 40%, and a number 20%. Knowing this, a program can decide that "can" in "the can" is far more likely to be a noun than a verb or a modal.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following lexicon \(L\): bear : V, N bears : V, N blue : Adj, N drink : N, V drinks : N, V Nice : Adj, N When using an order-1 HMM model (using \(L\)) to tag the word sequence:"Nice bears drink blue drinks"does the tag of drink depend on the tag of nice?
In the mid-1980s, researchers in Europe began to use hidden Markov models (HMMs) to disambiguate parts of speech, when working to tag the Lancaster-Oslo-Bergen Corpus of British English. HMMs involve counting cases (such as from the Brown Corpus) and making a table of the probabilities of certain sequences. For example, once you've seen an article such as 'the', perhaps the next word is a noun 40% of the time, an adjective 40%, and a number 20%. Knowing this, a program can decide that "can" in "the can" is far more likely to be a noun than a verb or a modal.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following toy learning corpus of 59 tokens (using a tokenizer that splits on whitespaces and punctuation), out of a possible vocabulary of $N=100$ different tokens: Pulsed operation of lasers refers to any laser not classified as continuous wave, so that the optical power appears in pulses of some duration at some repetition rate. This\linebreak encompasses a wide range of technologies addressing a number of different motivations. Some lasers are pulsed simply because they cannot be run in continuous wave mode. Using a 2-gram language model, what are the values of the parameters corresponding to "continuous wave" and to "pulsed laser" using estimation smoothed by a Dirichlet prior with parameters all equal to $0.01$
A laser can be classified as operating in either continuous or pulsed mode, depending on whether the power output is essentially continuous over time or whether its output takes the form of pulses of light on one or another time scale. Of course, even a laser whose output is normally continuous can be intentionally turned on and off at some rate to create pulses of light. When the modulation rate is on time scales much slower than the cavity lifetime and the period over which energy can be stored in the lasing medium or pumping mechanism, then it is still classified as a "modulated" or "pulsed" continuous wave laser. Most laser diodes used in communication systems fall into that category.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following toy learning corpus of 59 tokens (using a tokenizer that splits on whitespaces and punctuation), out of a possible vocabulary of $N=100$ different tokens: Pulsed operation of lasers refers to any laser not classified as continuous wave, so that the optical power appears in pulses of some duration at some repetition rate. This\linebreak encompasses a wide range of technologies addressing a number of different motivations. Some lasers are pulsed simply because they cannot be run in continuous wave mode. Using a 2-gram language model, what are the values of the parameters corresponding to "continuous wave" and to "pulsed laser" using estimation smoothed by a Dirichlet prior with parameters all equal to $0.01$
The pulsed operation of lasers refers to any laser not classified as a continuous wave so that the optical power appears in pulses of some duration at some repetition rate. This encompasses a wide range of technologies addressing many different motivations. Some lasers are pulsed simply because they cannot be run in continuous mode.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You have been publishing a daily column for the Gazette over the last few years and have recently reached a milestone --- your 1000th column! Realizing you'd like to go skiing more often, you decide it might be easier to automate your job by training a story generation system on the columns you've already written. Then, whenever your editor pitches you a title for a column topic, you'll just be able to give the title to your story generation system, produce the text body of the column, and publish it to the website! Your column generation system has become quite successful and you've managed to automate most of your job simply by typing your editor's title pitches into your model to produce your column every day. Two years later, during the COVID--25 pandemic, your editor proposes to use your system to generate an information sheet about the pandemic for anyone looking for information about symptoms, treatments, testing sites, medical professionals, etc. Given the similarity to a previous pandemic many years before, COVID--19, you train your model on all news articles published about COVID--19 between the years of 2019--2022. Then, you generate the information page from your trained model. Give an example of a potential harm that your model could produce from the perspective of human interaction harms.
Preprints servers become much popular during the pandemic, the Covid situation has an impact also on traditional peer-review. The pandemic has also deepened the western monopoly of science-publishing, "by August 2021, at least 210,000 new papers on covid-19 had been published, according to a Royal Society study. Of the 720,000-odd authors of these papers, nearly 270,000 were from the US, the UK, Italy or Spain."
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You have been publishing a daily column for the Gazette over the last few years and have recently reached a milestone --- your 1000th column! Realizing you'd like to go skiing more often, you decide it might be easier to automate your job by training a story generation system on the columns you've already written. Then, whenever your editor pitches you a title for a column topic, you'll just be able to give the title to your story generation system, produce the text body of the column, and publish it to the website! Your column generation system has become quite successful and you've managed to automate most of your job simply by typing your editor's title pitches into your model to produce your column every day. Two years later, during the COVID--25 pandemic, your editor proposes to use your system to generate an information sheet about the pandemic for anyone looking for information about symptoms, treatments, testing sites, medical professionals, etc. Given the similarity to a previous pandemic many years before, COVID--19, you train your model on all news articles published about COVID--19 between the years of 2019--2022. Then, you generate the information page from your trained model. Give an example of a potential harm that your model could produce from the perspective of human interaction harms.
Jackson JC (2023). Clearing the Fog: From Surviving to Thriving with Long COVID—A Practical Guide. New York: Little, Brown Spark. ISBN 9780316530095. OCLC 1345215931. === Journal articles ===
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are given a probability distribution $P(y_t | y_0, \ldots, y_{t-1})$ over 100 possible next tokens to generate by your model. The distribution has the following characteristics: egin{itemize} \item 20\% of the probability mass is on the most probable token; \item 10\% of the probability mass is on each of the next 4~most probable tokens; \item 1\% of the probability mass is on each of the next 20~most probable tokens; \item the remaining mass is uniformly distributed across the remaining 75 tokens. \end{itemize} In top-p sampling, if $p = 0.75$, how many tokens will be included in the set of tokens you sample from? Fully justify your answer.
For a discrete probability distribution with a finite number n of indices at which the probability mass function f takes non-zero values, the basic sampling algorithm is straightforward. The interval [0, 1) is divided in n intervals [0, f(1)), [f(1), f(1) + f(2)), ... The width of interval i equals the probability f(i). One draws a uniformly distributed pseudo-random number X, and searches for the index i of the corresponding interval. The so determined i will have the distribution f(i).
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are given a probability distribution $P(y_t | y_0, \ldots, y_{t-1})$ over 100 possible next tokens to generate by your model. The distribution has the following characteristics: egin{itemize} \item 20\% of the probability mass is on the most probable token; \item 10\% of the probability mass is on each of the next 4~most probable tokens; \item 1\% of the probability mass is on each of the next 20~most probable tokens; \item the remaining mass is uniformly distributed across the remaining 75 tokens. \end{itemize} In top-p sampling, if $p = 0.75$, how many tokens will be included in the set of tokens you sample from? Fully justify your answer.
To do random sampling over z d n {\displaystyle z_{dn}} , we would compute the unnormalized probabilities for all K possibilities for z d n {\displaystyle z_{dn}} using the above formula, then normalize them and proceed as normal using the algorithm described in the categorical distribution article. Correctly speaking, the additional factor that appears in the conditional distribution is derived not from the model specification but directly from the joint distribution. This distinction is important when considering models where a given node with Dirichlet-prior parent has multiple dependent children, particularly when those children are dependent on each other (e.g. if they share a parent that is collapsed out). This is discussed more below.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What could Out of Vocabulary (OoV) forms consist of? Select all that apply.A penalty will be applied for wrong answers.
An issue when using n-gram language models are out-of-vocabulary (OOV) words. They are encountered in computational linguistics and natural language processing when the input includes words which were not present in a system's dictionary or database during its preparation. By default, when a language model is estimated, the entire observed vocabulary is used. In some cases, it may be necessary to estimate the language model with a specific fixed vocabulary.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What could Out of Vocabulary (OoV) forms consist of? Select all that apply.A penalty will be applied for wrong answers.
An issue when using n-gram language models are out-of-vocabulary (OOV) words. They are encountered in computational linguistics and natural language processing when the input includes words which were not present in a system's dictionary or database during its preparation. By default, when a language model is estimated, the entire observed vocabulary is used. In some cases, it may be necessary to estimate the language model with a specific fixed vocabulary.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following context-free grammar \(G\) (where \(\text{S}\) is the top-level symbol): \(R_{01}: \text{S} \rightarrow \text{NP VP}\) \(R_{02}: \text{NP} \rightarrow \text{NP0}\) \(R_{03}: \text{NP} \rightarrow \text{Det NP0}\) \(R_{04}: \text{NP0} \rightarrow \text{N}\) \(R_{05}: \text{NP0} \rightarrow \text{Adj N}\) \(R_{06}: \text{NP0} \rightarrow \text{NP0 PNP}\) \(R_{07}: \text{VP} \rightarrow \text{V}\) \(R_{08}: \text{VP} \rightarrow \text{V NP}\) \(R_{09}: \text{VP} \rightarrow \text{V NP PNP}\) \(R_{10}: \text{PNP} \rightarrow \text{Prep NP}\) complemented by the lexicon \(L\): a : Det blue : Adj, N drink : N, V drinks : N, V friends : N from : Prep gave : V letter : N my : Det neighbor : N nice : Adj, N of : Prep postman : N ran : V the : Det to : PrepIndicate the number of non-terminals contained in the grammar \(G\):
The grammar uses these terminal symbols but does not define them. They are always at the bottom bushy end of the parse tree. The capitalized terms like Sums are nonterminal symbols.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following context-free grammar \(G\) (where \(\text{S}\) is the top-level symbol): \(R_{01}: \text{S} \rightarrow \text{NP VP}\) \(R_{02}: \text{NP} \rightarrow \text{NP0}\) \(R_{03}: \text{NP} \rightarrow \text{Det NP0}\) \(R_{04}: \text{NP0} \rightarrow \text{N}\) \(R_{05}: \text{NP0} \rightarrow \text{Adj N}\) \(R_{06}: \text{NP0} \rightarrow \text{NP0 PNP}\) \(R_{07}: \text{VP} \rightarrow \text{V}\) \(R_{08}: \text{VP} \rightarrow \text{V NP}\) \(R_{09}: \text{VP} \rightarrow \text{V NP PNP}\) \(R_{10}: \text{PNP} \rightarrow \text{Prep NP}\) complemented by the lexicon \(L\): a : Det blue : Adj, N drink : N, V drinks : N, V friends : N from : Prep gave : V letter : N my : Det neighbor : N nice : Adj, N of : Prep postman : N ran : V the : Det to : PrepIndicate the number of non-terminals contained in the grammar \(G\):
The canonical example of a context-free grammar is parenthesis matching, which is representative of the general case. There are two terminal symbols "(" and ")" and one nonterminal symbol S. The production rules are S → SS, S → (S), S → ()The first rule allows the S symbol to multiply; the second rule allows the S symbol to become enclosed by matching parentheses; and the third rule terminates the recursion.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following toy corpus: the cat cut the hat How many occurences do you have in total? (i.e. including repertitions)
Each doll was programmed to say four out of 270 possible phrases, so that no two given dolls were likely to be the same (the number of possible combinations is 270!/(266!4!) = 216,546,345). One of these 270 phrases was "Math class is tough!
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following toy corpus: the cat cut the hat How many occurences do you have in total? (i.e. including repertitions)
The next most common word-initial signs are 29 CAT with seven occurrences in that position, 27 HIDE with five, 07 HELMET with four, and 22 SLING with three. The distribution of word-final signs is also quite non-uniform and quite distinct from that of word-initial signs. The most common word-ending symbols are 07 HELMET, with eight occurrences; 01 PEDESTRIAN, with seven; 35 PLANE TREE with seven; 18 BOOMERANG with five; and then 08 GAUNTLET, 25 SHIP, 26 HORN, and 33 TUNNY, each with three occurrences each.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Select all the statements that are true.A penalty will be applied for any incorrect answers selected.
In computer languages it is expected that any truth-valued expression be permitted as the selection condition rather than restricting it to be a simple comparison. In SQL, selections are performed by using WHERE definitions in SELECT, UPDATE, and DELETE statements, but note that the selection condition can result in any of three truth values (true, false and unknown) instead of the usual two. In SQL, general selections are performed by using WHERE definitions with AND, OR, or NOT operands in SELECT, UPDATE, and DELETE statements.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Select all the statements that are true.A penalty will be applied for any incorrect answers selected.
If setting all or all but one variable false satisfies each clause, it is Poly-APX-complete. It is NP-hard to distinguish between an answer of 0 and a nonzero answer if setting all variables false satisfies all clauses. Otherwise, it is NP-hard to find even a feasible solution.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider:Non-terminals: S (top-level), NP (for "noun phrase"), VP (for "verbal phrase"), N (for "Noun"), V (for "Verb"), Det (for "Determiner").PoS tags: N, V, DetTerminals: I, yesterday, in, rain, went, home, the, cat, goOut of the following, select the ones which are possible valid "syntactic rules" as defined in a context-free grammar for processing (a tiny part of) English.A penalty will be applied for any incorrect answers.
Phrase structure rules are usually of the following form: A → B C {\displaystyle A\to B\quad C} meaning that the constituent A {\displaystyle A} is separated into the two subconstituents B {\displaystyle B} and C {\displaystyle C} . Some examples for English are as follows: S ⟶ NP VP {\displaystyle {\ce {S->NP\quad VP}}} NP ⟶ ( Det ) N 1 {\displaystyle {\ce {NP->(Det)\quad N1}}} N 1 ⟶ ( AP ) N 1 ( PP ) {\displaystyle {\ce {N1->(AP)\quad N1\quad (PP)}}} The first rule reads: A S (sentence) consists of a NP (noun phrase) followed by a VP (verb phrase). The second rule reads: A noun phrase consists of an optional Det (determiner) followed by a N (noun). The third rule means that a N (noun) can be preceded by an optional AP (adjective phrase) and followed by an optional PP (prepositional phrase).
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider:Non-terminals: S (top-level), NP (for "noun phrase"), VP (for "verbal phrase"), N (for "Noun"), V (for "Verb"), Det (for "Determiner").PoS tags: N, V, DetTerminals: I, yesterday, in, rain, went, home, the, cat, goOut of the following, select the ones which are possible valid "syntactic rules" as defined in a context-free grammar for processing (a tiny part of) English.A penalty will be applied for any incorrect answers.
Phrase structure rules are usually of the following form: A → B C {\displaystyle A\to B\quad C} meaning that the constituent A {\displaystyle A} is separated into the two subconstituents B {\displaystyle B} and C {\displaystyle C} . Some examples for English are as follows: S ⟶ NP VP {\displaystyle {\ce {S->NP\quad VP}}} NP ⟶ ( Det ) N 1 {\displaystyle {\ce {NP->(Det)\quad N1}}} N 1 ⟶ ( AP ) N 1 ( PP ) {\displaystyle {\ce {N1->(AP)\quad N1\quad (PP)}}} The first rule reads: A S (sentence) consists of a NP (noun phrase) followed by a VP (verb phrase). The second rule reads: A noun phrase consists of an optional Det (determiner) followed by a N (noun). The third rule means that a N (noun) can be preceded by an optional AP (adjective phrase) and followed by an optional PP (prepositional phrase).
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You have been publishing a daily column for the Gazette over the last few years and have recently reached a milestone --- your 1000th column! Realizing you'd like to go skiing more often, you decide it might be easier to automate your job by training a story generation system on the columns you've already written. Then, whenever your editor pitches you a title for a column topic, you'll just be able to give the title to your story generation system, produce the text body of the column, and publish it to the website! Your column generation system has become quite successful and you've managed to automate most of your job simply by typing your editor's title pitches into your model to produce your column every day. Two years later, during the COVID--25 pandemic, your editor proposes to use your system to generate an information sheet about the pandemic for anyone looking for information about symptoms, treatments, testing sites, medical professionals, etc. Given the similarity to a previous pandemic many years before, COVID--19, you train your model on all news articles published about COVID--19 between the years of 2019--2022. Then, you generate the information page from your trained model. Give an example of a potential harm that your model could produce from the perspective of leaking private information.
Preprints servers become much popular during the pandemic, the Covid situation has an impact also on traditional peer-review. The pandemic has also deepened the western monopoly of science-publishing, "by August 2021, at least 210,000 new papers on covid-19 had been published, according to a Royal Society study. Of the 720,000-odd authors of these papers, nearly 270,000 were from the US, the UK, Italy or Spain."
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You have been publishing a daily column for the Gazette over the last few years and have recently reached a milestone --- your 1000th column! Realizing you'd like to go skiing more often, you decide it might be easier to automate your job by training a story generation system on the columns you've already written. Then, whenever your editor pitches you a title for a column topic, you'll just be able to give the title to your story generation system, produce the text body of the column, and publish it to the website! Your column generation system has become quite successful and you've managed to automate most of your job simply by typing your editor's title pitches into your model to produce your column every day. Two years later, during the COVID--25 pandemic, your editor proposes to use your system to generate an information sheet about the pandemic for anyone looking for information about symptoms, treatments, testing sites, medical professionals, etc. Given the similarity to a previous pandemic many years before, COVID--19, you train your model on all news articles published about COVID--19 between the years of 2019--2022. Then, you generate the information page from your trained model. Give an example of a potential harm that your model could produce from the perspective of leaking private information.
Jackson JC (2023). Clearing the Fog: From Surviving to Thriving with Long COVID—A Practical Guide. New York: Little, Brown Spark. ISBN 9780316530095. OCLC 1345215931. === Journal articles ===
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements are true?
If statements 1 and 2 are true, it absolutely follows that statement 3 is true. However, it may still be the case that statement 1 or 2 is not true. For example: If Albert Einstein makes a statement about science, it is correct.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements are true?
It is false that all A are B, therefore no A are B. It is false that no A are B, therefore all A are B.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Let $n$ be an integer such that $n\geq 2$ and let $A \in \R^{n imes n}$, and $xv \in \R^n$, consider the function $f(xv) = xv^ op A xv$ defined over $\R^n$. Which of the following is the gradient of the function $f$?
The gradient of a differentiable function h: R n → R {\displaystyle h:\mathbb {R} ^{n}\to \mathbb {R} } is denoted ∇ h {\displaystyle \nabla h} . The gradient of the barrier function is ∇ B ( x , μ ) = ∇ f ( x ) − μ ∑ i = 1 m 1 c i ( x ) ∇ c i ( x ) . ( 3 ) {\displaystyle \nabla B(x,\mu )=\nabla f(x)-\mu \sum _{i=1}^{m}{\frac {1}{c_{i}(x)}}\nabla c_{i}(x).\quad (3)} In addition to the original ("primal") variable x {\displaystyle x} we introduce a Lagrange multiplier-inspired dual variable λ ∈ R m {\displaystyle \lambda \in \mathbb {R} ^{m}} c i ( x ) λ i = μ , ∀ i = 1 , … , m .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Let $n$ be an integer such that $n\geq 2$ and let $A \in \R^{n imes n}$, and $xv \in \R^n$, consider the function $f(xv) = xv^ op A xv$ defined over $\R^n$. Which of the following is the gradient of the function $f$?
By definition, the gradient of a scalar function f is ∇ f = ∑ i e i ∂ f ∂ q i = ∂ f ∂ x e 1 + ∂ f ∂ y e 2 + ∂ f ∂ z e 3 {\displaystyle \nabla f=\sum _{i}\mathbf {e} ^{i}{\frac {\partial f}{\partial q^{i}}}={\frac {\partial f}{\partial x}}\mathbf {e} ^{1}+{\frac {\partial f}{\partial y}}\mathbf {e} ^{2}+{\frac {\partial f}{\partial z}}\mathbf {e} ^{3}} where q i {\displaystyle q_{i}} are the coordinates x, y, z indexed. Recognizing this as a vector written in terms of the contravariant basis, it may be rewritten: ∇ f = ∂ f ∂ x − sin ⁡ ( ϕ ) ∂ f ∂ z cos ⁡ ( ϕ ) 2 e 1 + ∂ f ∂ y e 2 + − sin ⁡ ( ϕ ) ∂ f ∂ x + ∂ f ∂ z cos ⁡ ( ϕ ) 2 e 3 . {\displaystyle \nabla f={\frac {{\frac {\partial f}{\partial x}}-\sin(\phi ){\frac {\partial f}{\partial z}}}{\cos(\phi )^{2}}}\mathbf {e} _{1}+{\frac {\partial f}{\partial y}}\mathbf {e} _{2}+{\frac {-\sin(\phi ){\frac {\partial f}{\partial x}}+{\frac {\partial f}{\partial z}}}{\cos(\phi )^{2}}}\mathbf {e} _{3}.}
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider a classification problem using either SVMs or logistic regression and separable data. For logistic regression we use a small regularization term (penality on weights) in order to make the optimum welldefined. Consider a point that is correctly classified and distant from the decision boundary. Assume that we move this point slightly. What will happen to the decision boundary?
Specifically, Tikhonov regularization algorithms produce a decision boundary that minimizes the average training-set error and constrain the Decision boundary not to be excessively complicated or overfit the training data via a L2 norm of the weights term. The training and test-set errors can be measured without bias and in a fair way using accuracy, precision, Auc-Roc, precision-recall, and other metrics. Regularization perspectives on support-vector machines interpret SVM as a special case of Tikhonov regularization, specifically Tikhonov regularization with the hinge loss for a loss function.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider a classification problem using either SVMs or logistic regression and separable data. For logistic regression we use a small regularization term (penality on weights) in order to make the optimum welldefined. Consider a point that is correctly classified and distant from the decision boundary. Assume that we move this point slightly. What will happen to the decision boundary?
Recall that the (soft-margin) SVM classifier w ^ , b: x ↦ sgn ⁡ ( w ^ T x − b ) {\displaystyle {\hat {\mathbf {w} }},b:\mathbf {x} \mapsto \operatorname {sgn}({\hat {\mathbf {w} }}^{\mathsf {T}}\mathbf {x} -b)} is chosen to minimize the following expression: In light of the above discussion, we see that the SVM technique is equivalent to empirical risk minimization with Tikhonov regularization, where in this case the loss function is the hinge loss From this perspective, SVM is closely related to other fundamental classification algorithms such as regularized least-squares and logistic regression. The difference between the three lies in the choice of loss function: regularized least-squares amounts to empirical risk minimization with the square-loss, ℓ s q ( y , z ) = ( y − z ) 2 {\displaystyle \ell _{sq}(y,z)=(y-z)^{2}} ; logistic regression employs the log-loss,
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are given a distribution on $X, Y$, and $Z$ and you know that the joint distribution can be written in the form $p(x, y, z)=p(x) p(y \mid x) p(z \mid y)$. What conclusion can you draw? [Recall that $\perp$ means independent and $\mid \cdots$ means conditioned on $\cdots$.
{\displaystyle f_{X,Y}(x,y)=f_{X}(x)f_{Y}(y).} That is, the joint distribution is equal to the product of the marginal distributions.Unless it is not clear in context, in practice the modifier "mutual" is usually dropped so that independence means mutual independence. A statement such as " X, Y, Z are independent random variables" means that X, Y, Z are mutually independent.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are given a distribution on $X, Y$, and $Z$ and you know that the joint distribution can be written in the form $p(x, y, z)=p(x) p(y \mid x) p(z \mid y)$. What conclusion can you draw? [Recall that $\perp$ means independent and $\mid \cdots$ means conditioned on $\cdots$.
For two discrete random variables X , Y {\displaystyle X,Y} , we use the events A := { X = x } {\displaystyle A:=\{X=x\}} and B := { Y = y } {\displaystyle B:=\{Y=y\}} in the definition above, and find the joint distribution as P ( X = x , Y = y ) = P ( X = x ∣ Y = y ) P ( Y = y ) , {\displaystyle \mathbb {P} (X=x,Y=y)=\mathbb {P} (X=x\mid Y=y)\mathbb {P} (Y=y),} or P ( X , Y ) ( x , y ) = P X ∣ Y ( x ∣ y ) P Y ( y ) , {\displaystyle \mathbb {P} _{(X,Y)}(x,y)=\mathbb {P} _{X\mid Y}(x\mid y)\mathbb {P} _{Y}(y),} where P X ( x ) := P ( X = x ) {\displaystyle \mathbb {P} _{X}(x):=\mathbb {P} (X=x)} is the probability distribution of X {\displaystyle X} and P X ∣ Y ( x ∣ y ) {\displaystyle \mathbb {P} _{X\mid Y}(x\mid y)} conditional probability distribution of X {\displaystyle X} given Y {\displaystyle Y} .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
(Weight initialization) The choice of weight initialization will not impact the optimization behavior of the neural network.
This is particularly helpful when training data are limited, because poorly initialized weights can significantly hinder learning. These pre-trained weights end up in a region of the weight space that is closer to the optimal weights than random choices. This allows for both improved modeling and faster ultimate convergence.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
(Weight initialization) The choice of weight initialization will not impact the optimization behavior of the neural network.
To construct the weight, neural networks are trained, and they may converge on the correct weights, or not (i.e. get stuck in a local optimum). If the network is too small (for the dimensions of input data) then the universal approximation theorems do not apply, i.e. the networks will not learn. What was once proven about the depth of a network, i.e. a single hidden layer enough, only applies for one dimension, i.e. is in general too swallow of a network.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Under certain conditions, maximizing the log-likelihood is equivalent to minimizing mean-squared error for linear regression. The mean-squared error can be defined as $\mathcal{L}_{m s e}(\mathbf{w}):=$ $\frac{1}{2 N} \sum_{n=1}^{N}\left(y_{n}-\widetilde{\mathbf{x}}_{n}^{\top} \mathbf{w}\right)^{2}$ and $y_{n}=\widetilde{\mathbf{x}}_{n}^{\top} \mathbf{w}+\varepsilon_{n}$ is assumed for the probabilistic model. Which of following conditions is necessary for the equivalence?
{\displaystyle {\begin{aligned}\log({\mathcal {L}}({\hat {\mu }},{\hat {\sigma }}))&=(-n/2)(\log(2\pi {\hat {\sigma }}^{2})+1)+n(\lambda -1)\log(\operatorname {GM} (y))\\&=(-n/2)(\log(2\pi {\hat {\sigma }}^{2}/\operatorname {GM} (y)^{2(\lambda -1)})+1).\end{aligned}}} From here, absorbing GM ⁡ ( y ) 2 ( λ − 1 ) {\displaystyle \operatorname {GM} (y)^{2(\lambda -1)}} into the expression for σ ^ 2 {\displaystyle {\hat {\sigma }}^{2}} produces an expression that establishes that minimizing the sum of squares of residuals from y i ( λ ) {\displaystyle y_{i}^{(\lambda )}} is equivalent to maximizing the sum of the normal log likelihood of deviations from ( y λ − 1 ) / λ {\displaystyle (y^{\lambda }-1)/\lambda } and the log of the Jacobian of the transformation. The value at Y = 1 for any λ is 0, and the derivative with respect to Y there is 1 for any λ. Sometimes Y is a version of some other variable scaled to give Y = 1 at some sort of average value.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Under certain conditions, maximizing the log-likelihood is equivalent to minimizing mean-squared error for linear regression. The mean-squared error can be defined as $\mathcal{L}_{m s e}(\mathbf{w}):=$ $\frac{1}{2 N} \sum_{n=1}^{N}\left(y_{n}-\widetilde{\mathbf{x}}_{n}^{\top} \mathbf{w}\right)^{2}$ and $y_{n}=\widetilde{\mathbf{x}}_{n}^{\top} \mathbf{w}+\varepsilon_{n}$ is assumed for the probabilistic model. Which of following conditions is necessary for the equivalence?
Often the likelihood-ratio test statistic is expressed as a difference between the log-likelihoods λ LR = − 2 {\displaystyle \lambda _{\text{LR}}=-2\left} where ℓ ( θ ^ ) ≡ ln ⁡ {\displaystyle \ell ({\hat {\theta }})\equiv \ln \left~} is the logarithm of the maximized likelihood function L {\displaystyle {\mathcal {L}}} , and ℓ ( θ 0 ) {\displaystyle \ell (\theta _{0})} is the maximal value in the special case that the null hypothesis is true (but not necessarily a value that maximizes L {\displaystyle {\mathcal {L}}} for the sampled data) and θ 0 ∈ Θ 0 and θ ^ ∈ Θ {\displaystyle \theta _{0}\in \Theta _{0}\qquad {\text{ and }}\qquad {\hat {\theta }}\in \Theta ~} denote the respective arguments of the maxima and the allowed ranges they're embedded in. Multiplying by −2 ensures mathematically that (by Wilks' theorem) λ LR {\displaystyle \lambda _{\text{LR}}} converges asymptotically to being χ²-distributed if the null hypothesis happens to be true. The finite sample distributions of likelihood-ratio tests are generally unknown.The likelihood-ratio test requires that the models be nested – i.e. the more complex model can be transformed into the simpler model by imposing constraints on the former's parameters. Many common test statistics are tests for nested models and can be phrased as log-likelihood ratios or approximations thereof: e.g. the Z-test, the F-test, the G-test, and Pearson's chi-squared test; for an illustration with the one-sample t-test, see below. If the models are not nested, then instead of the likelihood-ratio test, there is a generalization of the test that can usually be used: for details, see relative likelihood.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the $k$-means algorithm. We discussed in the course that this algorithm is efficient. But we also discussed that it might not converge to the optimal solution. Let us explore this in a very simple setting. Assume that your data is one-dimensional. I.e., the points of your training set $S_{\text {training }}$ are elements of $\mathbb{R}$. Further, assume that $k=2$, i.e., we are looking for two clusters. Give an example of a data set in one dimension that has at least two distinct fixed points. I.e., a data set so that depending on the initial choice of cluster assignments the algorithm will converge to different solutions. The simpler the example the better (and the more points).
It can be shown that the algorithm will terminate in a finite number of iterations (no more than the total number of possible assignments, which is bounded by k m {\displaystyle k^{m}} ). In addition, the algorithm will terminate at a point that the overall objective cannot be decreased either by a different assignment or by defining new cluster planes for these clusters (such point is called "locally optimal" in the references). This convergence result is a consequence of the fact that problem (P2) can be solved exactly. The same convergence result holds for k-means algorithm because the cluster update problem can be solved exactly.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the $k$-means algorithm. We discussed in the course that this algorithm is efficient. But we also discussed that it might not converge to the optimal solution. Let us explore this in a very simple setting. Assume that your data is one-dimensional. I.e., the points of your training set $S_{\text {training }}$ are elements of $\mathbb{R}$. Further, assume that $k=2$, i.e., we are looking for two clusters. Give an example of a data set in one dimension that has at least two distinct fixed points. I.e., a data set so that depending on the initial choice of cluster assignments the algorithm will converge to different solutions. The simpler the example the better (and the more points).
The classical k-means algorithm and its variations are known to only converge to local minima of the minimum-sum-of-squares clustering problem defined as Many studies have attempted to improve the convergence behavior of the algorithm and maximize the chances of attaining the global optimum (or at least, local minima of better quality). Initialization and restart techniques discussed in the previous sections are one alternative to find better solutions. More recently, global optimization algorithms based on branch-and-bound and semidefinite programming have produced ‘’provenly optimal’’ solutions for datasets with up to 4,177 entities and 20,531 features.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider our standard least-squares problem $$ \operatorname{argmin}_{\mathbf{w}} \mathcal{L}(\mathbf{w})=\operatorname{argmin}_{\mathbf{w}} \frac{1}{2} \sum_{n=1}^{N}\left(y_{n}-\mathbf{x}_{n}^{\top} \mathbf{w}\right)^{2}+\frac{\lambda}{2} \sum_{d=1}^{D} w_{d}^{2} $$ Here, $\left\{\left(\mathbf{x}_{n} y_{n}\right)\right\}_{n=1}^{N}$ is the data. The $N$-length vector of outputs is denoted by $\mathbf{y}$. The $N \times D$ data matrix is called $\mathbf{X}$. It's rows contain the tuples $\mathbf{x}_{n}$. Finally, the parameter vector of length $D$ is called $\mathbf{w}$. (All just like we defined in the course). Mark any of the following formulas that represent an equivalent way of solving this problem.
The equation and solution of linear least squares are thus described as follows: y = , ⇒ = − 1 y = y . {\displaystyle {\begin{aligned}\mathbf {y} &={\begin{bmatrix}\mathbf {X} &\mathbf {K} \end{bmatrix}}{\begin{bmatrix}{\hat {\boldsymbol {\beta }}}\\{\hat {\boldsymbol {\gamma }}}\end{bmatrix}},\\{}\Rightarrow {\begin{bmatrix}{\hat {\boldsymbol {\beta }}}\\{\hat {\boldsymbol {\gamma }}}\end{bmatrix}}&={\begin{bmatrix}\mathbf {X} &\mathbf {K} \end{bmatrix}}^{-1}\mathbf {y} ={\begin{bmatrix}\left(\mathbf {X} ^{\top }\mathbf {X} \right)^{-1}\mathbf {X} ^{\top }\\\left(\mathbf {K} ^{\top }\mathbf {K} \right)^{-1}\mathbf {K} ^{\top }\end{bmatrix}}\mathbf {y} .\end{aligned}}} Another way of looking at it is to consider the regression line to be a weighted average of the lines passing through the combination of any two points in the dataset. Although this way of calculation is more computationally expensive, it provides a better intuition on OLS.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider our standard least-squares problem $$ \operatorname{argmin}_{\mathbf{w}} \mathcal{L}(\mathbf{w})=\operatorname{argmin}_{\mathbf{w}} \frac{1}{2} \sum_{n=1}^{N}\left(y_{n}-\mathbf{x}_{n}^{\top} \mathbf{w}\right)^{2}+\frac{\lambda}{2} \sum_{d=1}^{D} w_{d}^{2} $$ Here, $\left\{\left(\mathbf{x}_{n} y_{n}\right)\right\}_{n=1}^{N}$ is the data. The $N$-length vector of outputs is denoted by $\mathbf{y}$. The $N \times D$ data matrix is called $\mathbf{X}$. It's rows contain the tuples $\mathbf{x}_{n}$. Finally, the parameter vector of length $D$ is called $\mathbf{w}$. (All just like we defined in the course). Mark any of the following formulas that represent an equivalent way of solving this problem.
At least 3 matches are needed to provide a solution. We can write this linear system as A x ^ ≈ b , {\displaystyle A{\hat {\mathbf {x} }}\approx \mathbf {b} ,} where A is a known m-by-n matrix (usually with m > n), x is an unknown n-dimensional parameter vector, and b is a known m-dimensional measurement vector. Therefore, the minimizing vector x ^ {\displaystyle {\hat {\mathbf {x} }}} is a solution of the normal equation A T A x ^ = A T b .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In Text Representation learning, which of the following statements is correct?
The second is training on the representation similarity for neighboring words and representation dissimilarity for random pairs of words. A limitation of word2vec is that only the pairwise co-occurrence structure of the data is used, and not the ordering or entire set of context words. More recent transformer-based representation learning approaches attempt to solve this with word prediction tasks. GPTs pretrain on next word prediction using prior input words as context, whereas BERT masks random tokens in order to provide bidirectional context.Other self-supervised techniques extend word embeddings by finding representations for larger text structures such as sentences or paragraphs in the input data. Doc2vec extends the generative training approach in word2vec by adding an additional input to the word prediction task based on the paragraph it is within, and is therefore intended to represent paragraph level context.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In Text Representation learning, which of the following statements is correct?
The second is training on the representation similarity for neighboring words and representation dissimilarity for random pairs of words. A limitation of word2vec is that only the pairwise co-occurrence structure of the data is used, and not the ordering or entire set of context words. More recent transformer-based representation learning approaches attempt to solve this with word prediction tasks. GPTs pretrain on next word prediction using prior input words as context, whereas BERT masks random tokens in order to provide bidirectional context.Other self-supervised techniques extend word embeddings by finding representations for larger text structures such as sentences or paragraphs in the input data. Doc2vec extends the generative training approach in word2vec by adding an additional input to the word prediction task based on the paragraph it is within, and is therefore intended to represent paragraph level context.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following joint distribution on $X$ and $Y$, where both random variables take on the values $\{0,1\}: p(X=$ $0, Y=0)=0.1, p(X=0, Y=1)=0.2, p(X=1, Y=0)=0.3, p(X=1, Y=1)=0.4$. You receive $X=1$. What is the largest probability of being correct you can achieve when predicting $Y$ in this case?
from P ( x , y ) {\displaystyle P(x,y)} . Note that the assumption of a joint probability distribution allows us to model uncertainty in predictions (e.g. from noise in data) because y {\displaystyle y} is not a deterministic function of x {\displaystyle x} , but rather a random variable with conditional distribution P ( y | x ) {\displaystyle P(y|x)} for a fixed x {\displaystyle x} . We also assume that we are given a non-negative real-valued loss function L ( y ^ , y ) {\displaystyle L({\hat {y}},y)} which measures how different the prediction y ^ {\displaystyle {\hat {y}}} of a hypothesis is from the true outcome y {\displaystyle y} .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following joint distribution on $X$ and $Y$, where both random variables take on the values $\{0,1\}: p(X=$ $0, Y=0)=0.1, p(X=0, Y=1)=0.2, p(X=1, Y=0)=0.3, p(X=1, Y=1)=0.4$. You receive $X=1$. What is the largest probability of being correct you can achieve when predicting $Y$ in this case?
from P ( x , y ) {\displaystyle P(x,y)} . Note that the assumption of a joint probability distribution allows us to model uncertainty in predictions (e.g. from noise in data) because y {\displaystyle y} is not a deterministic function of x {\displaystyle x} , but rather a random variable with conditional distribution P ( y | x ) {\displaystyle P(y|x)} for a fixed x {\displaystyle x} . We also assume that we are given a non-negative real-valued loss function L ( y ^ , y ) {\displaystyle L({\hat {y}},y)} which measures how different the prediction y ^ {\displaystyle {\hat {y}}} of a hypothesis is from the true outcome y {\displaystyle y} .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In this exercise, we will see how to combine the Principal Component Analysis (PCA) and the kernel method into an algorithm known as kernel PCA. We are given $n$ observations in a low dimensional space $\mathbf{x}_{1}, \cdots, \mathbf{x}_{n} \in \mathbb{R}^{L}$ and we consider a kernel $k$ and its associated features $\operatorname{map} \phi: \mathbb{R}^{L} \mapsto \mathbb{R}^{H}$ which satisfies: $$ k(\mathbf{x}, \mathbf{y})=\langle\phi(\mathbf{x}), \phi(\mathbf{y})\rangle_{\mathbb{R}^{H}} $$ where $\langle\cdot, \cdot\rangle_{\mathbb{R}^{H}}$ is the standard scalar product of $\mathbb{R}^{H}$. We define the empirical covariance matrix and the empirical covariance matrix of the mapped observations as: $$ \boldsymbol{\Sigma}:=\frac{1}{n} \sum_{i=1}^{n} \mathbf{x}_{i} \mathbf{x}_{i}^{\top} \quad \text { and } \quad \boldsymbol{\Sigma}^{\mathbf{H}}:=\frac{1}{n} \sum_{i=1}^{n} \phi\left(\mathbf{x}_{i}\right) \phi\left(\mathbf{x}_{i}\right)^{\top} $$ The kernel matrix $\mathbf{K}$ is defined by: $$ \mathbf{K}_{i, j}:=k\left(\mathbf{x}_{i}, \mathbf{x}_{j}\right)=\left\langle\phi\left(\mathbf{x}_{i}\right), \phi\left(\mathbf{x}_{j}\right)\right\rangle_{\mathbb{R}^{H}} $$ We also define the data matrix and the corresponding matrix of the mapped data as: $$ \mathbf{X}:=\left(\begin{array}{c} \mathbf{x}_{1}^{\top} \\ \cdots \\ \mathbf{x}_{n}^{\top} \end{array}\right) \in \mathbb{R}^{n \times L} \quad \text { and } \quad \mathbf{\Phi}:=\left(\begin{array}{c} \phi\left(\mathbf{x}_{1}\right)^{\top} \\ \cdots \\ \phi\left(\mathbf{x}_{n}\right)^{\top} \end{array}\right) \in \mathbb{R}^{n \times H} . $$ Finally we denote the eigenpairs (eigenvalues and eigenvectors) of $\boldsymbol{\Sigma}^{\mathbf{H}}$ by $\left\{\left(\lambda_{i}, \mathbf{v}_{i}\right)\right\}_{i=1}^{H}$ and those of $\mathbf{K}$ by $\left\{\left(\rho_{j}, \mathbf{w}_{j}\right)\right\}_{j=1}^{n}$. We also assume that the vectors $\mathbf{v}_{i}$ and $\mathbf{w}_{j}$ are normalized. Thus: $$ \boldsymbol{\Sigma}^{\mathbf{H}} \mathbf{v}_{i}=\lambda_{i} \mathbf{v}_{i}, \quad\left\|\mathbf{v}_{i}\right\|_{2}=1 \quad \text { and } \quad \mathbf{K} \mathbf{w}_{j}=\rho_{j} \mathbf{w}_{j}, \quad\left\|\mathbf{w}_{j}\right\|_{2}=1 $$ Let us remind that we assume in the kernel setting that we can compute $k(\mathbf{x}, \mathbf{y})$ but that we cannot directly compute $\phi(\mathbf{x})$ What we would like to do is to first map the data into the high-dimensional space using the features map $\phi$ and then to apply the standard PCA algorithm in the high-dimensional space $\mathbb{R}^{H}$. This would amount to: (a) Computing the empirical covariance matrix $\boldsymbol{\Sigma}^{\mathbf{H}}$ of the mapped data $\phi\left(\mathbf{x}_{i}\right)$. (b) Computing the eigenvectors $\mathbf{v}_{1}, \cdots, \mathbf{v}_{N}$ associated with the $N$ largest eigenvalues of $\boldsymbol{\Sigma}^{\mathbf{H}}$. (c) Computing the projection $\Pi\left(\phi\left(\mathbf{x}_{i}\right)\right) \in \mathbb{R}^{L}$ for each data point onto these eigenvectors, where the $j$-th component of the projection is given by: $$ \Pi_{j}\left(\phi\left(\mathbf{x}_{i}\right)\right)=\left\langle\phi\left(\mathbf{x}_{i}\right), \mathbf{v}_{j}\right\rangle_{\mathbb{R}^{H}} $$ Write the kernel matrix $\mathbf{K}$ as a function of the features matrix $\boldsymbol{\Phi}$. What is the size of this matrix?
Principal component analysis can be employed in a nonlinear way by means of the kernel trick. The resulting technique is capable of constructing nonlinear mappings that maximize the variance in the data. The resulting technique is called kernel PCA.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In this exercise, we will see how to combine the Principal Component Analysis (PCA) and the kernel method into an algorithm known as kernel PCA. We are given $n$ observations in a low dimensional space $\mathbf{x}_{1}, \cdots, \mathbf{x}_{n} \in \mathbb{R}^{L}$ and we consider a kernel $k$ and its associated features $\operatorname{map} \phi: \mathbb{R}^{L} \mapsto \mathbb{R}^{H}$ which satisfies: $$ k(\mathbf{x}, \mathbf{y})=\langle\phi(\mathbf{x}), \phi(\mathbf{y})\rangle_{\mathbb{R}^{H}} $$ where $\langle\cdot, \cdot\rangle_{\mathbb{R}^{H}}$ is the standard scalar product of $\mathbb{R}^{H}$. We define the empirical covariance matrix and the empirical covariance matrix of the mapped observations as: $$ \boldsymbol{\Sigma}:=\frac{1}{n} \sum_{i=1}^{n} \mathbf{x}_{i} \mathbf{x}_{i}^{\top} \quad \text { and } \quad \boldsymbol{\Sigma}^{\mathbf{H}}:=\frac{1}{n} \sum_{i=1}^{n} \phi\left(\mathbf{x}_{i}\right) \phi\left(\mathbf{x}_{i}\right)^{\top} $$ The kernel matrix $\mathbf{K}$ is defined by: $$ \mathbf{K}_{i, j}:=k\left(\mathbf{x}_{i}, \mathbf{x}_{j}\right)=\left\langle\phi\left(\mathbf{x}_{i}\right), \phi\left(\mathbf{x}_{j}\right)\right\rangle_{\mathbb{R}^{H}} $$ We also define the data matrix and the corresponding matrix of the mapped data as: $$ \mathbf{X}:=\left(\begin{array}{c} \mathbf{x}_{1}^{\top} \\ \cdots \\ \mathbf{x}_{n}^{\top} \end{array}\right) \in \mathbb{R}^{n \times L} \quad \text { and } \quad \mathbf{\Phi}:=\left(\begin{array}{c} \phi\left(\mathbf{x}_{1}\right)^{\top} \\ \cdots \\ \phi\left(\mathbf{x}_{n}\right)^{\top} \end{array}\right) \in \mathbb{R}^{n \times H} . $$ Finally we denote the eigenpairs (eigenvalues and eigenvectors) of $\boldsymbol{\Sigma}^{\mathbf{H}}$ by $\left\{\left(\lambda_{i}, \mathbf{v}_{i}\right)\right\}_{i=1}^{H}$ and those of $\mathbf{K}$ by $\left\{\left(\rho_{j}, \mathbf{w}_{j}\right)\right\}_{j=1}^{n}$. We also assume that the vectors $\mathbf{v}_{i}$ and $\mathbf{w}_{j}$ are normalized. Thus: $$ \boldsymbol{\Sigma}^{\mathbf{H}} \mathbf{v}_{i}=\lambda_{i} \mathbf{v}_{i}, \quad\left\|\mathbf{v}_{i}\right\|_{2}=1 \quad \text { and } \quad \mathbf{K} \mathbf{w}_{j}=\rho_{j} \mathbf{w}_{j}, \quad\left\|\mathbf{w}_{j}\right\|_{2}=1 $$ Let us remind that we assume in the kernel setting that we can compute $k(\mathbf{x}, \mathbf{y})$ but that we cannot directly compute $\phi(\mathbf{x})$ What we would like to do is to first map the data into the high-dimensional space using the features map $\phi$ and then to apply the standard PCA algorithm in the high-dimensional space $\mathbb{R}^{H}$. This would amount to: (a) Computing the empirical covariance matrix $\boldsymbol{\Sigma}^{\mathbf{H}}$ of the mapped data $\phi\left(\mathbf{x}_{i}\right)$. (b) Computing the eigenvectors $\mathbf{v}_{1}, \cdots, \mathbf{v}_{N}$ associated with the $N$ largest eigenvalues of $\boldsymbol{\Sigma}^{\mathbf{H}}$. (c) Computing the projection $\Pi\left(\phi\left(\mathbf{x}_{i}\right)\right) \in \mathbb{R}^{L}$ for each data point onto these eigenvectors, where the $j$-th component of the projection is given by: $$ \Pi_{j}\left(\phi\left(\mathbf{x}_{i}\right)\right)=\left\langle\phi\left(\mathbf{x}_{i}\right), \mathbf{v}_{j}\right\rangle_{\mathbb{R}^{H}} $$ Write the kernel matrix $\mathbf{K}$ as a function of the features matrix $\boldsymbol{\Phi}$. What is the size of this matrix?
In the field of multivariate statistics, kernel principal component analysis (kernel PCA) is an extension of principal component analysis (PCA) using techniques of kernel methods. Using a kernel, the originally linear operations of PCA are performed in a reproducing kernel Hilbert space.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements are correct?
If statements 1 and 2 are true, it absolutely follows that statement 3 is true. However, it may still be the case that statement 1 or 2 is not true. For example: If Albert Einstein makes a statement about science, it is correct.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements are correct?
If the first statement is false, then the second is false, too. But if the second statement is false, then the first statement is true. It follows that if the first statement is false, then the first statement is true.The same mechanism applies to the second statement.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
(Backpropagation) Training via the backpropagation algorithm always learns a globally optimal neural network if there is only one hidden layer and we run an infinite number of iterations and decrease the step size appropriately over time.
The most common training technique is the backpropagation algorithm. Neural networks learn to model complex relationships between inputs and outputs and find patterns in data.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
(Backpropagation) Training via the backpropagation algorithm always learns a globally optimal neural network if there is only one hidden layer and we run an infinite number of iterations and decrease the step size appropriately over time.
The possibility of differentiating the activation function allows the direct use of the gradient descent and other optimization algorithms for the adjustment of the weights. Neural networks also started to be used as a general function approximation model. The best known training algorithm called backpropagation has been rediscovered several times but its first development goes back to the work of Paul Werbos.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about the $\mathrm{SVD}$ of an $N \times D$ matrix $\mathbf{X}$ are correct?
Applying singular-value decomposition (SVD) to matrix A {\displaystyle A} with dimensions p × m {\displaystyle p\times m} produces a singular system consisting of singular values { σ j } j = 1 k , ( σ j > 0 ∀ j = 1 , … , k ) , {\displaystyle \{\sigma _{j}\}_{j=1}^{k},{\text{ }}(\sigma _{j}>0{\text{ }}\forall j=1,\dots ,k),} vectors { v j } j = 1 m ∈ C m {\displaystyle \{v_{j}\}_{j=1}^{m}\in \mathbb {C} ^{m}} and { u j } j = 1 p ∈ C p {\displaystyle \{u_{j}\}_{j=1}^{p}\in \mathbb {C} ^{p}} such that they form orthonormal bases of C m {\displaystyle \mathbb {C} ^{m}} and C p {\displaystyle \mathbb {C} ^{p}} respectively: If U {\displaystyle U} and V {\displaystyle V} are matrices with u {\displaystyle u} 's and v {\displaystyle v} 's in the columns and Σ {\displaystyle \Sigma } is a diagonal p × m {\displaystyle p\times m} matrix having singular values σ i {\displaystyle \sigma _{i}} on the first k {\displaystyle k} -entries on the diagonal (all the other elements of the matrix are zeros): then the matrix A {\displaystyle A} can be rewritten as:
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which of the following statements about the $\mathrm{SVD}$ of an $N \times D$ matrix $\mathbf{X}$ are correct?
In particular, the decomposition can be interpreted as the sum of outer products of each left ( u k {\displaystyle \mathbf {u} _{k}} ) and right ( v k {\displaystyle \mathbf {v} _{k}} ) singular vectors, scaled by the corresponding nonzero singular value σ k {\displaystyle \sigma _{k}}: This result implies that A {\displaystyle \mathbf {A} } can be expressed as a sum of rank-1 matrices with spectral norm σ k {\displaystyle \sigma _{k}} in decreasing order. This explains the fact why, in general, the last terms contribute less, which motivates the use of the Truncated SVD as an approximation. The first term is the least squares fit of a matrix to an outer product of vectors.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider a linear regression problem with $N$ samples where the input is in $D$-dimensional space, and all output values are $y_{i} \in\{-1,+1\}$. Which of the following statements is correct?
An estimating equation motivated by multivariate linear regression is where r X Y ( s , t ) = cov ( X ( s ) , Y ( t ) ) {\displaystyle r_{XY}(s,t)={\text{cov}}(X(s),Y(t))} , R X X: L 2 ( S × S ) → L 2 ( S × T ) {\displaystyle R_{XX}:L^{2}({\mathcal {S}}\times {\mathcal {S}})\rightarrow L^{2}({\mathcal {S}}\times {\mathcal {T}})} is defined as ( R X X β ) ( s , t ) = ∫ S r X X ( s , w ) β ( w , t ) d w {\displaystyle (R_{XX}\beta )(s,t)=\int _{\mathcal {S}}r_{XX}(s,w)\beta (w,t)dw} with r X X ( s , w ) = cov ( X ( s ) , X ( w ) ) {\displaystyle r_{XX}(s,w)={\text{cov}}(X(s),X(w))} for s , w ∈ S {\displaystyle s,w\in {\mathcal {S}}} . Regularization is needed and can be done through truncation, L 2 {\displaystyle L^{2}} penalization or L 1 {\displaystyle L^{1}} penalization.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider a linear regression problem with $N$ samples where the input is in $D$-dimensional space, and all output values are $y_{i} \in\{-1,+1\}$. Which of the following statements is correct?
Consider a data set ( x 1 , y 1 ) , … , ( x n , y n ) {\displaystyle (x_{1},y_{1}),\ldots ,(x_{n},y_{n})} , where the x i {\displaystyle x_{i}} are Euclidean vectors and the y i {\displaystyle y_{i}} are scalars. The multiple regression model is formulated as y i = x i ⊤ β + ε i . {\displaystyle y_{i}=x_{i}^{\top }\beta +\varepsilon _{i}.} where the ε i {\displaystyle \varepsilon _{i}} are random errors.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider a matrix factorization problem of the form $\mathbf{X}=\mathbf{W Z}^{\top}$ to obtain an item-user recommender system where $x_{i j}$ denotes the rating given by $j^{\text {th }}$ user to the $i^{\text {th }}$ item . We use Root mean square error (RMSE) to gauge the quality of the factorization obtained. Select the correct option.
Matrix factorization is a class of collaborative filtering algorithms used in recommender systems. Matrix factorization algorithms work by decomposing the user-item interaction matrix into the product of two lower dimensionality rectangular matrices. This family of methods became widely known during the Netflix prize challenge due to its effectiveness as reported by Simon Funk in his 2006 blog post, where he shared his findings with the research community. The prediction results can be improved by assigning different regularization weights to the latent factors based on items' popularity and users' activeness.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider a matrix factorization problem of the form $\mathbf{X}=\mathbf{W Z}^{\top}$ to obtain an item-user recommender system where $x_{i j}$ denotes the rating given by $j^{\text {th }}$ user to the $i^{\text {th }}$ item . We use Root mean square error (RMSE) to gauge the quality of the factorization obtained. Select the correct option.
The original algorithm proposed by Simon Funk in his blog post factorized the user-item rating matrix as the product of two lower dimensional matrices, the first one has a row for each user, while the second has a column for each item. The row or column associated to a specific user or item is referred to as latent factors. Note that, in Funk MF no singular value decomposition is applied, it is a SVD-like machine learning model. The predicted ratings can be computed as R ~ = H W {\displaystyle {\tilde {R}}=HW} , where R ~ ∈ R u s e r s × i t e m s {\displaystyle {\tilde {R}}\in \mathbb {R} ^{users\times items}} is the user-item rating matrix, H ∈ R u s e r s × l a t e n t f a c t o r s {\displaystyle H\in \mathbb {R} ^{users\times latentfactors}} contains the user's latent factors and W ∈ R l a t e n t f a c t o r s × i t e m s {\displaystyle W\in \mathbb {R} ^{latentfactors\times items}} the item's latent factors.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Let us remind that we define the max-margin $M_\star$ as egin{align*} M_\star = \max_{\wv\in\mathbb R^D, \| \wv\|_2=1} M ext{ such that } y_n \xv_n^ op \wv \geq M ext{ for } n=1,\cdots, N \end{align*} and a max-margin separating hyperplane $ar \wv$ as a solution of this problem: egin{align*} ar \wv \in rg \max_{\wv\in\mathbb R^D, \| \wv\|_2=1} M ext{ such that } y_n \xv_n^ op \wv \geq M ext{ for } i=1,\cdots, N \end{align*} Bound the number of perceptron updates $t$ using the quantities $R$ and $M_\star$. Prove your result.
We want to find the maximum-margin hyperplane that divides the points having y i = 1 {\displaystyle y_{i}=1} from those having y i = − 1 {\displaystyle y_{i}=-1} . Any hyperplane can be written as the set of points x {\displaystyle \mathbf {x} } satisfying w ⋅ x − b = 0 , {\displaystyle \mathbf {w} \cdot \mathbf {x} -b=0,} where ⋅ {\displaystyle \cdot } denotes the dot product and w {\displaystyle {\mathbf {w} }} the (not necessarily normalized) normal vector to the hyperplane. The parameter b ‖ w ‖ {\displaystyle {\tfrac {b}{\|\mathbf {w} \|}}} determines the offset of the hyperplane from the origin along the normal vector w {\displaystyle {\mathbf {w} }} . If the training data are linearly separable, we can select two hyperplanes in such a way that they separate the data and there are no points between them, and then try to maximize their distance.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Let us remind that we define the max-margin $M_\star$ as egin{align*} M_\star = \max_{\wv\in\mathbb R^D, \| \wv\|_2=1} M ext{ such that } y_n \xv_n^ op \wv \geq M ext{ for } n=1,\cdots, N \end{align*} and a max-margin separating hyperplane $ar \wv$ as a solution of this problem: egin{align*} ar \wv \in rg \max_{\wv\in\mathbb R^D, \| \wv\|_2=1} M ext{ such that } y_n \xv_n^ op \wv \geq M ext{ for } i=1,\cdots, N \end{align*} Bound the number of perceptron updates $t$ using the quantities $R$ and $M_\star$. Prove your result.
We are given a training dataset of n {\displaystyle n} points of the form where the y i {\displaystyle y_{i}} are either 1 or −1, each indicating the class to which the point x i {\displaystyle \mathbf {x} _{i}} belongs. Each x i {\displaystyle \mathbf {x} _{i}} is a p {\displaystyle p} -dimensional real vector. We want to find the "maximum-margin hyperplane" that divides the group of points x i {\displaystyle \mathbf {x} _{i}} for which y i = 1 {\displaystyle y_{i}=1} from the group of points for which y i = − 1 {\displaystyle y_{i}=-1} , which is defined so that the distance between the hyperplane and the nearest point x i {\displaystyle \mathbf {x} _{i}} from either group is maximized. Any hyperplane can be written as the set of points x {\displaystyle \mathbf {x} } satisfying where w {\displaystyle \mathbf {w} } is the (not necessarily normalized) normal vector to the hyperplane. This is much like Hesse normal form, except that w {\displaystyle \mathbf {w} } is not necessarily a unit vector. The parameter b ‖ w ‖ {\displaystyle {\tfrac {b}{\|\mathbf {w} \|}}} determines the offset of the hyperplane from the origin along the normal vector w {\displaystyle \mathbf {w} } .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the composite function $f(x)=g(h(x))$, where all functions are $\mathbb{R}$ to $\mathbb{R}$. Which of the following is the weakest condition that guarantees that $f(x)$ is convex?
{\displaystyle g(\lambda ,\nu )=\inf _{x\in {\mathcal {D}}}{\mathcal {L}}(x,\lambda ,\nu )=\inf _{x\in {\mathcal {D}}}\left\{f_{0}(x)+\sum _{i=1}^{m}\lambda _{i}f_{i}(x)+\sum _{i=1}^{p}\nu _{i}h_{i}(x)\right\}.} The dual function g is concave, even when the initial problem is not convex, because it is a point-wise infimum of affine functions. The dual function yields lower bounds on the optimal value p ∗ {\displaystyle p^{*}} of the initial problem; for any λ ≥ 0 {\displaystyle \lambda \geq 0} and any ν {\displaystyle \nu } we have g ( λ , ν ) ≤ p ∗ {\displaystyle g(\lambda ,\nu )\leq p^{*}} . If a constraint qualification such as Slater's condition holds and the original problem is convex, then we have strong duality, i.e. d ∗ = max λ ≥ 0 , ν g ( λ , ν ) = inf f 0 = p ∗ {\displaystyle d^{*}=\max _{\lambda \geq 0,\nu }g(\lambda ,\nu )=\inf f_{0}=p^{*}} .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the composite function $f(x)=g(h(x))$, where all functions are $\mathbb{R}$ to $\mathbb{R}$. Which of the following is the weakest condition that guarantees that $f(x)$ is convex?
George Pólya provided a proof similar to what follows. Let f(x) = ex–1 – x for all real x, with first derivative f′(x) = ex–1 – 1 and second derivative f′′(x) = ex–1. Observe that f(1) = 0, f′(1) = 0 and f′′(x) > 0 for all real x, hence f is strictly convex with the absolute minimum at x = 1. Hence x ≤ ex–1 for all real x with equality only for x = 1.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Matrix Factorizations: The function $f(\mathbf{v}):=g\left(\mathbf{v} \mathbf{v}^{\top}\right)$ is convex over the vectors $\mathbf{v} \in \mathbb{R}^{2}$, when $g: \mathbb{R}^{2 \times 2} \rightarrow \mathbb{R}$ is defined as
For vector valued functions f ∈ H {\displaystyle f\in {\mathcal {H}}} we can write Γ ( x i , x j ) = k ( x i , x j ) A {\displaystyle \Gamma (x_{i},x_{j})=k(x_{i},x_{j})A} , where k is a scalar reproducing kernel, and A is a symmetric positive semi-definite T × T {\displaystyle T\times T} matrix. Henceforth denote S + T = { PSD matrices } ⊂ R T × T {\displaystyle S_{+}^{T}=\{{\text{PSD matrices}}\}\subset \mathbb {R} ^{T\times T}} . This factorization property, separability, implies the input feature space representation does not vary by task.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Matrix Factorizations: The function $f(\mathbf{v}):=g\left(\mathbf{v} \mathbf{v}^{\top}\right)$ is convex over the vectors $\mathbf{v} \in \mathbb{R}^{2}$, when $g: \mathbb{R}^{2 \times 2} \rightarrow \mathbb{R}$ is defined as
For vector valued functions f ∈ H {\displaystyle f\in {\mathcal {H}}} we can write Γ ( x i , x j ) = k ( x i , x j ) A {\displaystyle \Gamma (x_{i},x_{j})=k(x_{i},x_{j})A} , where k is a scalar reproducing kernel, and A is a symmetric positive semi-definite T × T {\displaystyle T\times T} matrix. Henceforth denote S + T = { PSD matrices } ⊂ R T × T {\displaystyle S_{+}^{T}=\{{\text{PSD matrices}}\}\subset \mathbb {R} ^{T\times T}} . This factorization property, separability, implies the input feature space representation does not vary by task.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
(Neural networks) Training only the first layer of a deep neural network using the logistic loss is equivalent to training a logistic regression over a transformed feature space.
The "loss layer", or "loss function", specifies how training penalizes the deviation between the predicted output of the network, and the true data labels (during supervised learning). Various loss functions can be used, depending on the specific task. The Softmax loss function is used for predicting a single class of K mutually exclusive classes. Sigmoid cross-entropy loss is used for predicting K independent probability values in {\displaystyle } . Euclidean loss is used for regressing to real-valued labels ( − ∞ , ∞ ) {\displaystyle (-\infty ,\infty )} .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
(Neural networks) Training only the first layer of a deep neural network using the logistic loss is equivalent to training a logistic regression over a transformed feature space.
This composition leads to a fast, layer-by-layer unsupervised training procedure, where contrastive divergence is applied to each sub-network in turn, starting from the "lowest" pair of layers (the lowest visible layer is a training set). The observation that DBNs can be trained greedily, one layer at a time, led to one of the first effective deep learning algorithms. : 6 Overall, there are many attractive implementations and uses of DBNs in real-life applications and scenarios (e.g., electroencephalography, drug discovery).
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are given a training set $S=\left\{\left(x_{n}, y_{n}\right)\right\}_{n=1}^{N}$ for classification with $y_{n} \in\{0,1\}$. Ninety percent of the labeled data has label 0. You split the data randomly into two equal parts, train on the first part, and then test on the second part. You get an accuracy of 85 percent. What is your reaction? Explain.
When computing accuracy in multiclass classification, accuracy is simply the fraction of correct classifications: This is usually expressed as a percentage. For example, if a classifier makes ten predictions and nine of them are correct, the accuracy is 90%. Accuracy is also called top-1 accuracy to distinguish it from top-5 accuracy, common in convolutional neural network evaluation.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are given a training set $S=\left\{\left(x_{n}, y_{n}\right)\right\}_{n=1}^{N}$ for classification with $y_{n} \in\{0,1\}$. Ninety percent of the labeled data has label 0. You split the data randomly into two equal parts, train on the first part, and then test on the second part. You get an accuracy of 85 percent. What is your reaction? Explain.
You ran a classification on the same dataset which led to the following values for the confusion matrix categories: TP = 90, FP = 4; TN = 1, FN = 5.In this example, the classifier has performed well in classifying positive instances, but was not able to correctly recognize negative data elements. Again, the resulting F1 score and accuracy scores would be extremely high: accuracy = 91%, and F1 score = 95.24%. Similarly to the previous case, if a researcher analyzed only these two score indicators, without considering the MCC, they would wrongly think the algorithm is performing quite well in its task, and would have the illusion of being successful.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Our task is to classify whether an animal is a dog (class 0) or a cat (class 1) based on the following features: egin{itemize} \item $x_1$: height \item $x_2$: length of whiskers \item $x_3$: thickness of fur \end{itemize} We perform standard normal scaling on the training features so that they have a mean of zero and standard deviation of 1. We have trained a Logistic Regression model to determine the probability that the animal is a cat, $p(1 | \mathbf{x,w})$. Our classifier learns that cats have a lower height and longer whiskers than dogs, while the thickness of fur is not relevant to the classification outcome. Which of the following is true about the weights~$\wv$ learned by the classifier?
The classifier overpredicts in favor of cats ("positive" samples): 99.99% of cats are classified correctly and only 1% of dogs are classified correctly. The image dataset consists of 100000 images, 90% of which are pictures of cats and 10% are pictures of dogs. In such a situation, the probability that the picture containing dog will be classified correctly is pretty low: P ( C − | − ) = 0.01 {\displaystyle P(C-|-)=0.01} Not all the metrics are noticing this low probability: P 4 = 0.0388 {\displaystyle \mathrm {P} _{4}=0.0388} F 1 = 0.9478 {\displaystyle \mathrm {F} _{1}=\mathbf {0.9478} } J = 0.0099 {\displaystyle \mathrm {J} =0.0099} (Informedness / Youden index) M K = 0.8183 {\displaystyle \mathrm {MK} =\mathbf {0.8183} } (Markedness)
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Our task is to classify whether an animal is a dog (class 0) or a cat (class 1) based on the following features: egin{itemize} \item $x_1$: height \item $x_2$: length of whiskers \item $x_3$: thickness of fur \end{itemize} We perform standard normal scaling on the training features so that they have a mean of zero and standard deviation of 1. We have trained a Logistic Regression model to determine the probability that the animal is a cat, $p(1 | \mathbf{x,w})$. Our classifier learns that cats have a lower height and longer whiskers than dogs, while the thickness of fur is not relevant to the classification outcome. Which of the following is true about the weights~$\wv$ learned by the classifier?
Given a sample of 12 pictures, 8 of cats and 4 of dogs, where cats belong to class 1 and dogs belong to class 0, actual = ,assume that a classifier that distinguishes between cats and dogs is trained, and we take the 12 pictures and run them through the classifier, and the classifier makes 9 accurate predictions and misses 3: 2 cats wrongly predicted as dogs (first 2 predictions) and 1 dog wrongly predicted as a cat (last prediction). prediction = With these two labelled sets (actual and predictions) we can create a confusion matrix that will summarize the results of testing the classifier: In this confusion matrix, of the 8 cat pictures, the system judged that 2 were dogs, and of the 4 dog pictures, it predicted that 1 was a cat. All correct predictions are located in the diagonal of the table (highlighted in bold), so it is easy to visually inspect the table for prediction errors, as they will be represented by values outside the diagonal. In abstract terms, the confusion matrix is as follows: where P = Positive; N = Negative; TP = True Positive; FP = False Positive; TN = True Negative; FN = False Negative. Plugging the numbers from the formula: MCC = 6 × 3 − 1 × 2 ( 6 + 1 ) × ( 6 + 2 ) × ( 3 + 1 ) × ( 3 + 2 ) = 16 1120 ≈ 0.478 {\displaystyle {\text{MCC}}={\frac {6\times 3-1\times 2}{\sqrt {(6+1)\times (6+2)\times (3+1)\times (3+2)}}}={\frac {16}{\sqrt {1120}}}\approx 0.478}
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider two fully connected networks, A and B, with a constant width for all layers, inputs and outputs. Network A has depth $3L$ and width $H$, network B has depth $L$ and width $2H$. Everything else is identical for the two networks and both $L$ and $H$ are large. In this case, performing a single iteration of backpropagation requires fewer scalar multiplications for network A than for network B.
The universal approximation property of width-bounded networks has been studied as a dual of classical universal approximation results on depth-bounded networks. For input dimension dx and output dimension dy the minimum width required for the universal approximation of the Lp functions is exactly max{dx + 1, dy} (for a ReLU network). More generally this also holds if both ReLU and a threshold activation function are used.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider two fully connected networks, A and B, with a constant width for all layers, inputs and outputs. Network A has depth $3L$ and width $H$, network B has depth $L$ and width $2H$. Everything else is identical for the two networks and both $L$ and $H$ are large. In this case, performing a single iteration of backpropagation requires fewer scalar multiplications for network A than for network B.
In the same paper it was shown that ReLU networks with width n + 1 were sufficient to approximate any continuous function of n-dimensional input variables. The following refinement, specifies the optimal minimum width for which such an approximation is possible and is due to.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following matrix-factorization problem. For the observed ratings $r_{u m}$ for a given pair $(u, m)$ of a user $u$ and a movie $m$, one typically tries to estimate the score by $$ f_{u m}=\left\langle\mathbf{v}_{u}, \mathbf{w}_{m}\right\rangle+b_{u}+b_{m} $$ Here $\mathbf{v}_{u}$ and $\mathbf{w}_{m}$ are vectors in $\mathbb{R}^{D}$ and $b_{u}$ and $b_{m}$ are scalars, indicating the bias. Assume that our objective is given by $$ \frac{1}{2} \sum_{u \sim m}\left(f_{u m}-r_{u m}\right)^{2}+\frac{\lambda}{2}\left[\sum_{u \in \mathbf{U}}\left(b_{u}^{2}+\left\|\mathbf{v}_{u}\right\|^{2}\right)+\sum_{m \in \mathbf{M}}\left(b_{m}^{2}+\left\|\mathbf{w}_{m}\right\|^{2}\right)\right] $$ where $\lambda>0$. Here $\mathbf{U}$ denotes the set of all users, $M$ the set of all movies, and $u \sim m$ represents the sum over all $(u, m)$ pairs for which a rating exists. Write the optimal values of $b_{u}$, provided that all other values are fixed.
The solution to the problem is given by first computing a singular value decomposition of E e s t {\displaystyle \mathbf {E} _{\rm {est}}}: E e s t = U S V T {\displaystyle \mathbf {E} _{\rm {est}}=\mathbf {U} \,\mathbf {S} \,\mathbf {V} ^{T}} where U , V {\displaystyle \mathbf {U} ,\mathbf {V} } are orthogonal matrices and S {\displaystyle \mathbf {S} } is a diagonal matrix which contains the singular values of E e s t {\displaystyle \mathbf {E} _{\rm {est}}} . In the ideal case, one of the diagonal elements of S {\displaystyle \mathbf {S} } should be zero, or at least small compared to the other two which should be equal. In any case, set S ′ = ( s 1 0 0 0 s 2 0 0 0 0 ) , {\displaystyle \mathbf {S} '={\begin{pmatrix}s_{1}&0&0\\0&s_{2}&0\\0&0&0\end{pmatrix}},} where s 1 , s 2 {\displaystyle s_{1},s_{2}} are the largest and second largest singular values in S {\displaystyle \mathbf {S} } respectively. Finally, E ′ {\displaystyle \mathbf {E} '} is given by E ′ = U S ′ V T {\displaystyle \mathbf {E} '=\mathbf {U} \,\mathbf {S} '\,\mathbf {V} ^{T}} The matrix E ′ {\displaystyle \mathbf {E} '} is the resulting estimate of the essential matrix provided by the algorithm.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following matrix-factorization problem. For the observed ratings $r_{u m}$ for a given pair $(u, m)$ of a user $u$ and a movie $m$, one typically tries to estimate the score by $$ f_{u m}=\left\langle\mathbf{v}_{u}, \mathbf{w}_{m}\right\rangle+b_{u}+b_{m} $$ Here $\mathbf{v}_{u}$ and $\mathbf{w}_{m}$ are vectors in $\mathbb{R}^{D}$ and $b_{u}$ and $b_{m}$ are scalars, indicating the bias. Assume that our objective is given by $$ \frac{1}{2} \sum_{u \sim m}\left(f_{u m}-r_{u m}\right)^{2}+\frac{\lambda}{2}\left[\sum_{u \in \mathbf{U}}\left(b_{u}^{2}+\left\|\mathbf{v}_{u}\right\|^{2}\right)+\sum_{m \in \mathbf{M}}\left(b_{m}^{2}+\left\|\mathbf{w}_{m}\right\|^{2}\right)\right] $$ where $\lambda>0$. Here $\mathbf{U}$ denotes the set of all users, $M$ the set of all movies, and $u \sim m$ represents the sum over all $(u, m)$ pairs for which a rating exists. Write the optimal values of $b_{u}$, provided that all other values are fixed.
Suppose S i ∼ W p ( n i , Σ ) , i = 1 , … , r + 1 {\displaystyle S_{i}\sim W_{p}\left(n_{i},\Sigma \right),i=1,\ldots ,r+1} are independently distributed Wishart p × p {\displaystyle p\times p} positive definite matrices. Then, defining U i = S − 1 / 2 S i ( S − 1 / 2 ) T {\displaystyle U_{i}=S^{-1/2}S_{i}\left(S^{-1/2}\right)^{T}} (where S = ∑ i = 1 r + 1 S i {\displaystyle S=\sum _{i=1}^{r+1}S_{i}} is the sum of the matrices and S 1 / 2 ( S − 1 / 2 ) T {\displaystyle S^{1/2}\left(S^{-1/2}\right)^{T}} is any reasonable factorization of S {\displaystyle S} ), we have ( U 1 , … , U r ) ∼ D p ( n 1 / 2 , . . . , n r + 1 / 2 ) . {\displaystyle \left(U_{1},\ldots ,U_{r}\right)\sim D_{p}\left(n_{1}/2,...,n_{r+1}/2\right).}
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Let $\xv_1, . . . , \xv_N$ be a dataset of $N$ vectors in $\R^D$. What does it mean for the data vectors $\xv_1, . . . , \xv_N$ to be centered, as for principle component analysis (PCA) to be meaningful? Use the notation $x_{nd}$ for individual entries.
Given a column-vector, v {\displaystyle \mathbf {v} \,} of size n, the centering property of C n {\displaystyle C_{n}\,} can be expressed as C n v = v − ( 1 n J n , 1 T v ) J n , 1 {\displaystyle C_{n}\,\mathbf {v} =\mathbf {v} -({\tfrac {1}{n}}J_{n,1}^{\textrm {T}}\mathbf {v} )J_{n,1}} where J n , 1 {\displaystyle J_{n,1}} is a column vector of ones and 1 n J n , 1 T v {\displaystyle {\tfrac {1}{n}}J_{n,1}^{\textrm {T}}\mathbf {v} } is the mean of the components of v {\displaystyle \mathbf {v} \,} . C n {\displaystyle C_{n}\,} is symmetric positive semi-definite. C n {\displaystyle C_{n}\,} is idempotent, so that C n k = C n {\displaystyle C_{n}^{k}=C_{n}} , for k = 1 , 2 , … {\displaystyle k=1,2,\ldots } .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Let $\xv_1, . . . , \xv_N$ be a dataset of $N$ vectors in $\R^D$. What does it mean for the data vectors $\xv_1, . . . , \xv_N$ to be centered, as for principle component analysis (PCA) to be meaningful? Use the notation $x_{nd}$ for individual entries.
For instance it could be the answers to a survey or economic data in an econometrics analysis. As in the continuous version, we assume that X is centered, otherwise we can let X := X − μ X {\displaystyle X:=X-\mu _{X}} (where μ X {\displaystyle \mu _{X}} is the mean vector of X) which is centered. Let us adapt the procedure to the discrete case.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the loss function $L: \R^d o \R$, $L(\wv) = rac{eta}{2}\|\wv\|^2$, where $eta > 0$ is a constant. We run gradient descent on $L$ with a stepsize $\gamma > 0$ starting from some $\wv_0 eq 0$. Which of the statements below is true?
The basic idea behind the steepest descent is to find a local minimum of the loss function by iterating on F m − 1 ( x ) {\displaystyle F_{m-1}(x)} . In fact, the local maximum-descent direction of the loss function is the negative gradient.Hence, moving a small amount γ {\displaystyle \gamma } such that the linear approximation remains valid: F m ( x ) = F m − 1 ( x ) − γ ∑ i = 1 n ∇ F m − 1 L ( y i , F m − 1 ( x i ) ) {\displaystyle F_{m}(x)=F_{m-1}(x)-\gamma \sum _{i=1}^{n}{\nabla _{F_{m-1}}L(y_{i},F_{m-1}(x_{i}))}} where γ > 0 {\displaystyle \gamma >0} . For small γ {\displaystyle \gamma } , this implies that L ( y i , F m ( x i ) ) ≤ L ( y i , F m − 1 ( x i ) ) {\displaystyle L(y_{i},F_{m}(x_{i}))\leq L(y_{i},F_{m-1}(x_{i}))} .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the loss function $L: \R^d o \R$, $L(\wv) = rac{eta}{2}\|\wv\|^2$, where $eta > 0$ is a constant. We run gradient descent on $L$ with a stepsize $\gamma > 0$ starting from some $\wv_0 eq 0$. Which of the statements below is true?
Let it be L ( x T , u 1 , . . . , u T ) {\displaystyle L(x_{T},u_{1},...,u_{T})} , then minimizing it by gradient descent gives where η {\displaystyle \eta } is the learning rate. The vanishing/exploding gradient problem appears because there are repeated multiplications, of the form
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In the following let $\kappa_{1}\left(\mathbf{x}, \mathbf{x}^{\prime}\right)$ and $\kappa_{2}\left(\mathbf{x}, \mathbf{x}^{\prime}\right)$ be two valid kernels. Show that the following is also valid kernel: $\kappa\left(\mathbf{x}, \mathbf{x}^{\prime}\right)=f(\mathbf{x}) f\left(\mathbf{x}^{\prime}\right)$ for any real-valued function $f$.
Let T + , S + {\displaystyle {\mathcal {T}}^{+},{\mathcal {S}}^{+}} be the set of positive measurable functions on ( S , S ) , ( T , T ) {\displaystyle (S,{\mathcal {S}}),(T,{\mathcal {T}})} . Every kernel κ {\displaystyle \kappa } from S {\displaystyle S} to T {\displaystyle T} can be associated with a linear operator A κ: T + → S + {\displaystyle A_{\kappa }\colon {\mathcal {T}}^{+}\to {\mathcal {S}}^{+}} given by ( A κ f ) ( s ) = ∫ T κ ( s , d t ) f ( t ) . {\displaystyle (A_{\kappa }f)(s)=\int _{T}\kappa (s,\mathrm {d} t)\;f(t).} The composition of these operators is compatible with the composition of kernels, meaning A κ 1 A κ 2 = A κ 1 ⋅ κ 2 {\displaystyle A_{\kappa ^{1}}A_{\kappa ^{2}}=A_{\kappa ^{1}\cdot \kappa ^{2}}} == References ==
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In the following let $\kappa_{1}\left(\mathbf{x}, \mathbf{x}^{\prime}\right)$ and $\kappa_{2}\left(\mathbf{x}, \mathbf{x}^{\prime}\right)$ be two valid kernels. Show that the following is also valid kernel: $\kappa\left(\mathbf{x}, \mathbf{x}^{\prime}\right)=f(\mathbf{x}) f\left(\mathbf{x}^{\prime}\right)$ for any real-valued function $f$.
In fact, this isometry procedure can make both the scalar-valued kernel and the input space too difficult to work with in practice as properties of the original kernels are often lost.An important class of matrix-valued reproducing kernels are separable kernels which can factorized as the product of a scalar valued kernel and a T {\displaystyle T} -dimensional symmetric positive semi-definite matrix. In light of our previous discussion these kernels are of the form γ ( ( x , t ) , ( y , s ) ) = K ( x , y ) K T ( t , s ) {\displaystyle \gamma ((x,t),(y,s))=K(x,y)K_{T}(t,s)} for all x , y {\displaystyle x,y} in X {\displaystyle X} and t , s {\displaystyle t,s} in T {\displaystyle T} . As the scalar-valued kernel encodes dependencies between the inputs, we can observe that the matrix-valued kernel encodes dependencies among both the inputs and the outputs. We lastly remark that the above theory can be further extended to spaces of functions with values in function spaces but obtaining kernels for these spaces is a more difficult task.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus