Question
Assume that you have a logistic regression classifier, trained to predict whether an input musical lyric sample was written by one of two artists: Beyonce
Assume that you have a logistic regression classifier, trained to predict whether an input musical lyric sample was written by one of two artists: Beyonce or Taylor Swift. The classifier accepts five features. It also accepts a bias, b. The model uses a sigmoid activation.
The feature types passed into the model are unigrams and other manually engineered features and are associated with the following learned weights:
The bias can be found by letting b = 1 wb, where wb = 0.5. Stopwords include the following words: {a, and, it, of, the}. For binary features (e.g., contains X ), True = 1 and False = 0. For # repetitions, the value should be the number of tokens that appear in the sample for the second or subsequent time (e.g., in I want to see you out that door baby bye bye bye the second and third bye are repetitions). Given the sample text below, extract its feature values and compute the output probability for both writers: YBeyonce and YTaylorSwift: and the haters gonna hate hate hate hate hate Choose the highest of those two values to select the predicted class label. Show your work to receive full points, and provide both YBeyonce and YTaylorSwift and the predicted label.
1 \begin{tabular}{lcc} Feature & Weight (Beyonc) & Weight (Taylor Swift) \\ \hline # words & 0.26 & 0.25 \\ # stopwords & 0.04 & 0.02 \\ # repetitions & 0.16 & 0.36 \\ contains shake & 0.05 & 0.73 \\ contains haters & 0.05 & 0.04 \end{tabular} 1 \begin{tabular}{lcc} Feature & Weight (Beyonc) & Weight (Taylor Swift) \\ \hline # words & 0.26 & 0.25 \\ # stopwords & 0.04 & 0.02 \\ # repetitions & 0.16 & 0.36 \\ contains shake & 0.05 & 0.73 \\ contains haters & 0.05 & 0.04 \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started