question
stringlengths
6
3.53k
text
stringlengths
17
2.05k
source
stringclasses
1 value
In Support Vector Machines (SVM), we want to maximize the margin
Computing the (soft-margin) SVM classifier amounts to minimizing an expression of the form We focus on the soft-margin classifier since, as noted above, choosing a sufficiently small value for λ {\displaystyle \lambda } yields the hard-margin classifier for linearly classifiable input data. The classical approach, whic...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In Support Vector Machines (SVM), we want to maximize the margin
See support vector machines and maximum-margin hyperplane for details.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Implement the function `check_words` that checks if the words of a strings have common words with a list. Write your code in python. Your code should be agnostic to lower/upper case.
CLASS words ideally would be a very short list of data types relevant to a particular application. Common CLASS words might be: NO (number), ID (identifier), TXT (text), AMT (amount), QTY (quantity), FL (flag), CD (code), W (work) and so forth. In practice, the available CLASS words would be a list of less than two doz...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Implement the function `check_words` that checks if the words of a strings have common words with a list. Write your code in python. Your code should be agnostic to lower/upper case.
The system can check the data in the CDMS and compare them to the dictionaries. Items that do not match can be flagged for further checking. Some systems allow for the storage of synonyms to allow the system to match common abbreviations and map them to the correct term.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
When using linear regression, how do you help prevent numerical instabilities? (One or multiple answers)
In these cases, the least squares estimate amplifies the measurement noise and may be grossly inaccurate. Various regularization techniques can be applied in such cases, the most common of which is called ridge regression. If further information about the parameters is known, for example, a range of possible values of ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
When using linear regression, how do you help prevent numerical instabilities? (One or multiple answers)
The numerical methods for linear least squares are important because linear regression models are among the most important types of model, both as formal statistical models and for exploration of data-sets. The majority of statistical computer packages contain facilities for regression analysis that make use of linear ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Hypothesize a reason for the difference in performance between the Linear regression and the Gradient Boosting Regressor.
"Improved Boosting Algorithms Using Confidence-rated Predictions". Machine Learning. 37 (3): 297–336.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Hypothesize a reason for the difference in performance between the Linear regression and the Gradient Boosting Regressor.
"Improved Boosting Algorithms Using Confidence-rated Predictions". Machine Learning. 37 (3): 297–336.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You write a Python code to optimize the weights of your linear regression with 10 features \textbf{using gradient descent} for 500 epochs. What is the minimum number of for-loops you need to perform your optimization?
Another possible training algorithm is gradient descent. In gradient descent training, the weights are adjusted at each time step by moving them in a direction opposite from the gradient of the objective function (thus allowing the minimum of the objective function to be found), w ( t + 1 ) = w ( t ) − ν d d w H t ( w ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You write a Python code to optimize the weights of your linear regression with 10 features \textbf{using gradient descent} for 500 epochs. What is the minimum number of for-loops you need to perform your optimization?
Many improvements on the basic stochastic gradient descent algorithm have been proposed and used. In particular, in machine learning, the need to set a learning rate (step size) has been recognized as problematic. Setting this parameter too high can cause the algorithm to diverge; setting it too low makes it slow to co...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which loss function(s) should you use? (One or multiple answers)
For most optimization algorithms, it is desirable to have a loss function that is globally continuous and differentiable. Two very commonly used loss functions are the squared loss, L ( a ) = a 2 {\displaystyle L(a)=a^{2}} , and the absolute loss, L ( a ) = | a | {\displaystyle L(a)=|a|} . However the absolute loss has...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which loss function(s) should you use? (One or multiple answers)
In mathematical optimization and decision theory, a loss function or cost function (sometimes also called an error function) is a function that maps an event or values of one or more variables onto a real number intuitively representing some "cost" associated with the event. An optimization problem seeks to minimize a ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In a nutshell, the "second album syndrome" is a theory that states that the second album of a band always sucks You have the following regression output regarding the score_diff: the difference in scores between the second and the first album (second - first): Dep. Variable: score_diff R-squared: -0.000 Interpret...
The first is a failure to distinguish between systems of notation (which may have both additive and divisive aspects) and the music notated under such a system. The second involves a failure to understand the divisive and additive aspects of meter itself. Winold recommends that, "metric structure is best described thro...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In a nutshell, the "second album syndrome" is a theory that states that the second album of a band always sucks You have the following regression output regarding the score_diff: the difference in scores between the second and the first album (second - first): Dep. Variable: score_diff R-squared: -0.000 Interpret...
Searching for other aspects of hierarchical structure of music there is a controversial discussion, if the organization of tension and resolution in music can be described as hierarchical structure or only as a purely sequential structure. According to Patel research in this area has produced apparently contradictory e...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Fill the missing line of code: (one answer)\\ \hspace*{.5cm} \#code missing\\ \hspace*{.5cm} np.mean(np.random.randn(1000))\\
Line 7, for example, cannot be reached again. For your understanding, you can imagine 2 different variables d: As a result, you could get something like this. The variable d1 would be replaced by b
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Fill the missing line of code: (one answer)\\ \hspace*{.5cm} \#code missing\\ \hspace*{.5cm} np.mean(np.random.randn(1000))\\
An example of the recent code would be more like this: RANDOMIZE SET WINDOW 0,20,0,20 SET COLOR 5 !Set the pen and text colour to 5 as true basic has 0-15 colours PRINT "Welcome To ..." !Print "Welcome To ..." on the user's screen. DO !Begin the loop LET x=rnd*20 !Let the value 'x' equal a random number between '0' and...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The [t-statistic](https://en.wikipedia.org/wiki/T-statistic) is the ratio of the departure of the estimated value of a parameter from its hypothesized value to its standard error. In a t-test, the higher the t-statistic, the more confidently we can reject the null hypothesis. Use `numpy.random` to create four samples,...
In statistics, the t-statistic is the ratio of the departure of the estimated value of a parameter from its hypothesized value to its standard error. It is used in hypothesis testing via Student's t-test. The t-statistic is used in a t-test to determine whether to support or reject the null hypothesis.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The [t-statistic](https://en.wikipedia.org/wiki/T-statistic) is the ratio of the departure of the estimated value of a parameter from its hypothesized value to its standard error. In a t-test, the higher the t-statistic, the more confidently we can reject the null hypothesis. Use `numpy.random` to create four samples,...
A t-test is a type of statistical analysis used to compare the averages of two groups and determine if the differences between them are more likely to arise from random chance. It is any statistical hypothesis test in which the test statistic follows a Student's t-distribution under the null hypothesis. It is most comm...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The data contains information about submissions to a prestigious machine learning conference called ICLR. Columns: year, paper, authors, ratings, decisions, institution, csranking, categories, authors_citations, authors_publications, authors_hindex, arxiv. The data is stored in a pandas.DataFrame format. Create 3 new...
This series started publishing in 1972 and publishes papers related to computational statistics. It publishes 6 issues each year. Based on Web of Science, the five most cited papers in the journal are: Iman RL, Conover WJ. A distribution-free approach to inducing rank correlation among input variables, 1982, 519 cites.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The data contains information about submissions to a prestigious machine learning conference called ICLR. Columns: year, paper, authors, ratings, decisions, institution, csranking, categories, authors_citations, authors_publications, authors_hindex, arxiv. The data is stored in a pandas.DataFrame format. Create 3 new...
pandas is a software library written for the Python programming language for data manipulation and analysis. In particular, it offers data structures and operations for manipulating numerical tables and time series. It is free software released under the three-clause BSD license.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
/True or false:/ Is the following statement true or false? Justify your answer. "The node with the highest clustering coefficient in an undirected graph is the node that belongs to the largest number of triangles.:"
A high clustering coefficient for a network is another indication of a small world. The clustering coefficient of the i {\displaystyle i} 'th node is C i = 2 e i k i ( k i − 1 ) , {\displaystyle C_{i}={2e_{i} \over k_{i}{(k_{i}-1)}}\,,} where k i {\displaystyle k_{i}} is the number of neighbours of the i {\displaystyle...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
/True or false:/ Is the following statement true or false? Justify your answer. "The node with the highest clustering coefficient in an undirected graph is the node that belongs to the largest number of triangles.:"
In graph theory, a clustering coefficient is a measure of the degree to which nodes in a graph tend to cluster together. Evidence suggests that in most real-world networks, and in particular social networks, nodes tend to create tightly knit groups characterised by a relatively high density of ties; this likelihood ten...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What is the output of the following block of Python code? (one answer) \\ \verb|my_string = `computational'| \\ \verb|print(my_string[1])|\\ \verb|print(my_string[3:5])| \vspace{0.25cm}
Python has a "string format" operator % that functions analogously to printf format strings in C—e.g. "spam=%s eggs=%d" % ("blah", 2) evaluates to "spam=blah eggs=2". In Python 2.6+ and 3+, this was supplemented by the format() method of the str class, e.g. "spam={0} eggs={1}".format("blah", 2).
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What is the output of the following block of Python code? (one answer) \\ \verb|my_string = `computational'| \\ \verb|print(my_string[1])|\\ \verb|print(my_string[3:5])| \vspace{0.25cm}
If P is a program which outputs a string x, then P is a description of x. The length of the description is just the length of P as a character string, multiplied by the number of bits in a character (e.g., 7 for ASCII). We could, alternatively, choose an encoding for Turing machines, where an encoding is a function whi...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In Machine Learning, we want to learn the \textbf{parameters W} for the mapping function f: $y=f(x,W) +\epsilon$ where x is the input, y the output, and $\epsilon$ the error term.\\ (One or multiple answers)
In the setting of supervised learning, a function of f: X → Y {\displaystyle f:X\to Y} is to be learned, where X {\displaystyle X} is thought of as a space of inputs and Y {\displaystyle Y} as a space of outputs, that predicts well on instances that are drawn from a joint probability distribution p ( x , y ) {\displays...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In Machine Learning, we want to learn the \textbf{parameters W} for the mapping function f: $y=f(x,W) +\epsilon$ where x is the input, y the output, and $\epsilon$ the error term.\\ (One or multiple answers)
Of course, we cannot hope to do so perfectly, since the y i {\displaystyle y_{i}} contain noise ε {\displaystyle \varepsilon } ; this means we must be prepared to accept an irreducible error in any function we come up with. Finding an f ^ {\displaystyle {\hat {f}}} that generalizes to points outside of the training set...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Principle Component Analysis (PCA) is a technique for...
Principal component analysis (PCA) is a widely used method for factor extraction, which is the first phase of EFA. Factor weights are computed to extract the maximum possible variance, with successive factoring continuing until there is no further meaningful variance left. The factor model must then be rotated for anal...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Principle Component Analysis (PCA) is a technique for...
Principal component analysis (PCA) is a popular technique for analyzing large datasets containing a high number of dimensions/features per observation, increasing the interpretability of data while preserving the maximum amount of information, and enabling the visualization of multidimensional data. Formally, PCA is a ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In order to summarize the degree distribution in a single number, would you recommend using the average degree? Why, or why not? If not, what alternatives can you think of? Please elaborate!
For many practical purposes, a degree is a small enough angle that whole degrees provide sufficient precision. When this is not the case, as in astronomy or for geographic coordinates (latitude and longitude), degree measurements may be written using decimal degrees (DD notation); for example, 40.1875°. Alternatively, ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
In order to summarize the degree distribution in a single number, would you recommend using the average degree? Why, or why not? If not, what alternatives can you think of? Please elaborate!
The number is usually slightly larger than the degree because some were found twice or mistakes were made. The number could be less if some zeros were missed. Stage two is more traditional than the other two.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are using a 3-layer fully-connected neural net with \textbf{ReLU activations}. Your input data has components in [0, 1]. \textbf{You initialize all your weights to -10}, and set all the bias terms to 0. You start optimizing using SGD. What will likely happen?
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 conver...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are using a 3-layer fully-connected neural net with \textbf{ReLU activations}. Your input data has components in [0, 1]. \textbf{You initialize all your weights to -10}, and set all the bias terms to 0. You start optimizing using SGD. What will likely happen?
Even if the cost function has globally continuous gradient, good estimate of the Lipschitz constant for the cost functions in deep learning may not be feasible or desirable, given the very high dimensions of deep neural networks. Hence, there is a technique of fine-tuning of learning rates in applying standard GD or SG...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are working on a dataset with lots of outliers, and want to perform a regression task. Everything else being equal, and assuming that you do not do any pre-processing, which loss function will be less affected by these outliers?
The squared loss has the disadvantage that it has the tendency to be dominated by outliers—when summing over a set of a {\displaystyle a} 's (as in ∑ i = 1 n L ( a i ) {\textstyle \sum _{i=1}^{n}L(a_{i})} ), the final sum tends to be the result of a few particularly large a-values, rather than an expression of the aver...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are working on a dataset with lots of outliers, and want to perform a regression task. Everything else being equal, and assuming that you do not do any pre-processing, which loss function will be less affected by these outliers?
The square loss function is both convex and smooth. However, the square loss function tends to penalize outliers excessively, leading to slower convergence rates (with regards to sample complexity) than for the logistic loss or hinge loss functions. In addition, functions which yield high values of f ( x → ) {\displays...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
/True or false:/ Is the following statement true or false? Justify your answer. "The node with the highest clustering coefficient in an undirected graph is the node that belongs to the largest number of triangles."
A high clustering coefficient for a network is another indication of a small world. The clustering coefficient of the i {\displaystyle i} 'th node is C i = 2 e i k i ( k i − 1 ) , {\displaystyle C_{i}={2e_{i} \over k_{i}{(k_{i}-1)}}\,,} where k i {\displaystyle k_{i}} is the number of neighbours of the i {\displaystyle...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
/True or false:/ Is the following statement true or false? Justify your answer. "The node with the highest clustering coefficient in an undirected graph is the node that belongs to the largest number of triangles."
In graph theory, a clustering coefficient is a measure of the degree to which nodes in a graph tend to cluster together. Evidence suggests that in most real-world networks, and in particular social networks, nodes tend to create tightly knit groups characterised by a relatively high density of ties; this likelihood ten...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Split the given data into a training set (70%) and a testing set (30%). We refer to these as "random split" in the subsequent tasks. The data is in a pandas.DataFrame format.
This halves reliability estimate is then stepped up to the full test length using the Spearman–Brown prediction formula. There are several ways of splitting a test to estimate reliability. For example, a 40-item vocabulary test could be split into two subtests, the first one made up of items 1 through 20 and the second...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Split the given data into a training set (70%) and a testing set (30%). We refer to these as "random split" in the subsequent tasks. The data is in a pandas.DataFrame format.
Then, of all the randomly generated splits, the split that yields the highest score is chosen to split the node. Similar to ordinary random forests, the number of randomly selected features to be considered at each node can be specified. Default values for this parameter are p {\displaystyle {\sqrt {p}}} for classifica...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
A model you trained seems to be overfitting. You decide to significantly increase the strength of the regularization. This will always improve the test error.
Increasing M reduces the error on training set, but setting it too high may lead to overfitting. An optimal value of M is often selected by monitoring prediction error on a separate validation data set. Besides controlling M, several other regularization techniques are used. Another regularization parameter is the dept...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
A model you trained seems to be overfitting. You decide to significantly increase the strength of the regularization. This will always improve the test error.
The overfitting occurs because the model attempts to fit the (stochastic or deterministic) noise (that part of the data that it cannot model) at the expense of fitting that part of the data which it can model. When either type of noise is present, it is usually advisable to regularize the learning algorithm to prevent ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are using a 3-layer fully-connected neural, and you are using \textbf{$f(x) = 2x$ as your activation function} . Your input data has components in [0, 1]. \textbf{You initialize your weights using Kaiming (He) initialization}, and set all the bias terms to 0. You start optimizing using SGD. What will likely happen?
Consider a multilayer perceptron (MLP) with one hidden layer and m {\displaystyle m} hidden units with mapping from input x ∈ R d {\displaystyle x\in R^{d}} to a scalar output described as F x ( W ~ , Θ ) = ∑ i = 1 m θ i ϕ ( x T w ~ ( i ) ) {\displaystyle F_{x}({\tilde {W}},\Theta )=\sum _{i=1}^{m}\theta _{i}\phi (x^{T...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are using a 3-layer fully-connected neural, and you are using \textbf{$f(x) = 2x$ as your activation function} . Your input data has components in [0, 1]. \textbf{You initialize your weights using Kaiming (He) initialization}, and set all the bias terms to 0. You start optimizing using SGD. What will likely happen?
Consider a multilayer perceptron (MLP) with one hidden layer and m {\displaystyle m} hidden units with mapping from input x ∈ R d {\displaystyle x\in R^{d}} to a scalar output described as F x ( W ~ , Θ ) = ∑ i = 1 m θ i ϕ ( x T w ~ ( i ) ) {\displaystyle F_{x}({\tilde {W}},\Theta )=\sum _{i=1}^{m}\theta _{i}\phi (x^{T...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What is a good representation for scores when classifying these three target classes: Car, Bike and Bus, in the context of logistic regression. (One or multiple answers)
Because CART analysis is not only binary, but also recursive, the result can be that a predictor variable will be divided again, yielding two cutoff scores. The standard form for each predictor is that a score of one is added when CART analysis creates a partition. One study (Kerby, 2003) selected as predictors the fiv...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
What is a good representation for scores when classifying these three target classes: Car, Bike and Bus, in the context of logistic regression. (One or multiple answers)
Instead, it represents them as specific to a Car. We can model this notion using inner classes as follows: We have the top-level class Car. Instances of class Car are composed of four instances of the class Wheel.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Decision trees...
Decision trees are a popular method for various machine learning tasks. Tree learning "come closest to meeting the requirements for serving as an off-the-shelf procedure for data mining", say Hastie et al., "because it is invariant under scaling and various other transformations of feature values, is robust to inclusio...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Decision trees...
J.R. Quinlan (1986). "Induction of Decision Trees". Machine Learning.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
$L_1$ regularization often results in sparser solutions than $L_2$ regularization.
Such ℓ 1 {\displaystyle \ell _{1}} regularization problems are interesting because they induce sparse solutions, that is, solutions w {\displaystyle w} to the minimization problem have relatively few nonzero components. Lasso can be seen to be a convex relaxation of the non-convex problem min w ∈ R d 1 n ∑ i = 1 n ( y ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
$L_1$ regularization often results in sparser solutions than $L_2$ regularization.
Such ℓ 1 {\displaystyle \ell _{1}} regularization problems are interesting because they induce sparse solutions, that is, solutions w {\displaystyle w} to the minimization problem have relatively few nonzero components. Lasso can be seen to be a convex relaxation of the non-convex problem min w ∈ R d 1 n ∑ i = 1 n ( y ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which method can be used for dimensionality reduction ?
Dimensionality reduction, as the name suggests, is reducing the number of random variables using various mathematical methods from statistics and machine learning. Dimensionality reduction is often used to reduce the problem of managing and manipulating large data sets. Dimensionality reduction techniques generally use...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Which method can be used for dimensionality reduction ?
Dimensionality reduction, or dimension reduction, is the transformation of data from a high-dimensional space into a low-dimensional space so that the low-dimensional representation retains some meaningful properties of the original data, ideally close to its intrinsic dimension. Working in high-dimensional spaces can ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Having the following stats: - $X \sim Uniform(0,1)$ - $Y \sim Uniform(0,1)$ - $Z = X/2 + Y/2 + 0.1$ - $K = Y + 0.1$ What are the expected values and the variance of 𝑋, 𝑌, 𝑍, and 𝐾?
We can model our uncertainty of x {\displaystyle x} by an aprior uniform distribution over an interval {\displaystyle } , and thus x {\displaystyle x} will have variance of σ X 2 = x 0 2 / 3. {\displaystyle \sigma _{X}^{2}=x_{0}^{2}/3.} .
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Having the following stats: - $X \sim Uniform(0,1)$ - $Y \sim Uniform(0,1)$ - $Z = X/2 + Y/2 + 0.1$ - $K = Y + 0.1$ What are the expected values and the variance of 𝑋, 𝑌, 𝑍, and 𝐾?
The expected value is: E ⁡ ( X ( k ) ) = k n + 1 . {\displaystyle \operatorname {E} (X_{(k)})={k \over n+1}.} This fact is useful when making Q–Q plots. The variance is: V ⁡ ( X ( k ) ) = k ( n − k + 1 ) ( n + 1 ) 2 ( n + 2 ) . {\displaystyle \operatorname {V} (X_{(k)})={k(n-k+1) \over (n+1)^{2}(n+2)}.}
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
When are paired t-tests helpful? Justify.
Paired samples t-tests typically consist of a sample of matched pairs of similar units, or one group of units that has been tested twice (a "repeated measures" t-test). A typical example of the repeated measures t-test would be where subjects are tested prior to a treatment, say for high blood pressure, and the same su...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
When are paired t-tests helpful? Justify.
Testing cycle time is reduced and analysis is simpler. Test cases are balanced, so it's straightforward to isolate defects and assess performance. This provides a significant cost savings over pair-wise testing.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Mean Square Error loss:
For the squared error loss case, the result is δ ( x ) = ∫ − ∞ ∞ θ f ( x 1 − θ , … , x n − θ ) d θ ∫ − ∞ ∞ f ( x 1 − θ , … , x n − θ ) d θ . {\displaystyle \delta (x)={\frac {\int _{-\infty }^{\infty }\theta f(x_{1}-\theta ,\dots ,x_{n}-\theta )d\theta }{\int _{-\infty }^{\infty }f(x_{1}-\theta ,\dots ,x_{n}-\theta )d\...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Mean Square Error loss:
The use of mean squared error without question has been criticized by the decision theorist James Berger. Mean squared error is the negative of the expected value of one specific utility function, the quadratic utility function, which may not be the appropriate utility function to use under a given set of circumstances...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You need to debug your Stochastic Gradient Descent update for a classification of three bridge types. Manually compute the model output for the feature vector $x=(1, 0, 0, 0, 0)$ and $W$ contains only zeros. The model is logistic regression, \textit{i.e.}, $\textrm{softmax}(Wx)$. Remember: \begin{equation} \te...
Lasso, elastic net, group and fused lasso construct the penalty functions from the ℓ 1 {\displaystyle \ell ^{1}} and ℓ 2 {\displaystyle \ell ^{2}} norms (with weights, if necessary). The bridge regression utilises general ℓ p {\displaystyle \ell ^{p}} norms ( p ≥ 1 {\displaystyle p\geq 1} ) and quasinorms ( 0 < p < 1 {...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You need to debug your Stochastic Gradient Descent update for a classification of three bridge types. Manually compute the model output for the feature vector $x=(1, 0, 0, 0, 0)$ and $W$ contains only zeros. The model is logistic regression, \textit{i.e.}, $\textrm{softmax}(Wx)$. Remember: \begin{equation} \te...
A global optimum is guaranteed because the objective function is convex. The gradient of log likelihood is represented by: ∂ L ( w ) ∂ w = ∑ i ϕ ( x i , y i ) − E p ( y | x i ; w ) ϕ ( x i , y ) {\displaystyle {\frac {\partial L(w)}{\partial w}}=\textstyle \sum _{i}\displaystyle \phi (x^{i},y^{i})-E_{p(y|x^{i};w)}\phi ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
For this homework you will use a dataset of 18,403 music reviews scraped from Pitchfork¹, including relevant metadata such as review author, review date, record release year, review score, and genre, along with the respective album's audio features pulled from Spotify's API. The data consists of the following columns: ...
The main idea of the website is to allow the users to add albums, EPs, singles, videos and bootlegs to the database and to rate them. The rating system uses a scale of minimum a half-star (or 0.5 points) to maximum five stars (or 5 points). Users can likewise leave reviews for RYM entries as well as create user profile...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
For this homework you will use a dataset of 18,403 music reviews scraped from Pitchfork¹, including relevant metadata such as review author, review date, record release year, review score, and genre, along with the respective album's audio features pulled from Spotify's API. The data consists of the following columns: ...
Automatic methods of musical similarity detection, based on data mining and co-occurrence analysis, have been developed to classify music titles for electronic music distribution.Glenn McDonald, the employee of The Echo Nest, music intelligence and data platform, owned by Spotify, has created a categorical perception s...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following PyTorch code: class ThreeLayerNet (nn.Module): def __init__(): super().__init__() def forward(x): x = nn.Linear(100, 10)(x) x = nn.ReLU()(x) x = nn.Linear(10, 200)(x) x = nn.ReLU()(x) x = nn.Line...
BRNNs can be trained using similar algorithms to RNNs, because the two directional neurons do not have any interactions. However, when back-propagation through time is applied, additional processes are needed because updating input and output layers cannot be done at once. General procedures for training are as follows...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the following PyTorch code: class ThreeLayerNet (nn.Module): def __init__(): super().__init__() def forward(x): x = nn.Linear(100, 10)(x) x = nn.ReLU()(x) x = nn.Linear(10, 200)(x) x = nn.ReLU()(x) x = nn.Line...
Pseudocode for a stochastic gradient descent algorithm for training a three-layer network (one hidden layer): initialize network weights (often small random values) do for each training example named ex do prediction = neural-net-output(network, ex) // forward pass actual = teacher-output(ex) compute error (prediction ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Does the disparity in class proportions hurt the model? If yes, how can you fix it? If not, justify the reasons behind your choice. Hint: The learning objective of a classifier can be modified by altering the importance of each class in the computation of the loss function. Based you answer on the following confusion ...
Deviations from the identity function indicate a poorly-calibrated classifier for which the predicted probabilities or scores can not be used as probabilities. In this case one can use a method to turn these scores into properly calibrated class membership probabilities. For the binary case, a common approach is to app...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Does the disparity in class proportions hurt the model? If yes, how can you fix it? If not, justify the reasons behind your choice. Hint: The learning objective of a classifier can be modified by altering the importance of each class in the computation of the loss function. Based you answer on the following confusion ...
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 F...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Write modular code (i.e., a function) to divide your training data into 𝑁 folds and perform cross-validation. For each possible combination of the two hyperparameters (see below for the range of values that you should try for each hyperparameter), train your model in a cross-validation setup with 𝑁=20 folds.
In 2-fold cross-validation, we randomly shuffle the dataset into two sets d0 and d1, so that both sets are equal size (this is usually implemented by shuffling the data array and then splitting it in two). We then train on d0 and validate on d1, followed by training on d1 and validating on d0. When k = n (the number of...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Write modular code (i.e., a function) to divide your training data into 𝑁 folds and perform cross-validation. For each possible combination of the two hyperparameters (see below for the range of values that you should try for each hyperparameter), train your model in a cross-validation setup with 𝑁=20 folds.
In 2-fold cross-validation, we randomly shuffle the dataset into two sets d0 and d1, so that both sets are equal size (this is usually implemented by shuffling the data array and then splitting it in two). We then train on d0 and validate on d1, followed by training on d1 and validating on d0. When k = n (the number of...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are using a 3-layer fully-connected neural net with \textbf{ReLU activations}. Your input data has components in [0, 1]. \textbf{You initialize your weights by sampling from $\mathcal{N}(-10, 0.1)$ (Gaussians of mean -10 and variance 0.1)}, and set all the bias terms to 0. You start optimizing using SGD. What will ...
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 conver...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
You are using a 3-layer fully-connected neural net with \textbf{ReLU activations}. Your input data has components in [0, 1]. \textbf{You initialize your weights by sampling from $\mathcal{N}(-10, 0.1)$ (Gaussians of mean -10 and variance 0.1)}, and set all the bias terms to 0. You start optimizing using SGD. What will ...
Weight initialization is another approach that has been proposed to reduce the vanishing gradient problem in deep networks. Kumar suggested that the distribution of initial weights should vary according to activation function used and proposed to initialize the weights in networks with the logistic activation function ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The data contains information about submissions to a prestigious machine learning conference called ICLR. Columns: year, paper, authors, ratings, decisions, institution, csranking, categories, authors_citations, authors_publications, authors_hindex, arxiv. The data is stored in a pandas.DataFrame format. Create two f...
pandas is a software library written for the Python programming language for data manipulation and analysis. In particular, it offers data structures and operations for manipulating numerical tables and time series. It is free software released under the three-clause BSD license.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The data contains information about submissions to a prestigious machine learning conference called ICLR. Columns: year, paper, authors, ratings, decisions, institution, csranking, categories, authors_citations, authors_publications, authors_hindex, arxiv. The data is stored in a pandas.DataFrame format. Create two f...
For example, this “fractional count” (FC) received by each author would be 0.1 for an article with 10 authors. If an author is affiliated with more than one institution, that author’s FC is then subdivided equally across their affiliated institutions. The process is similar for countries and regions, though the fact th...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Interpreting the results obtained throughout this homework, create a short text (max. 250 words) where you: Present and explain a credible causal diagram capturing the relationship between the variables below, and justify your causal diagram given the questions answered in this homework: "Skill": an individual's innat...
Relative age effects are caused by birth date eligibility rules but can be affected by parents, coaches and athletes through other mechanisms, the Pygmalian effect, Galatea effect, and Matthew effect are examples of effects which impact player motivation.In addition to these social factors contextual differences change...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Interpreting the results obtained throughout this homework, create a short text (max. 250 words) where you: Present and explain a credible causal diagram capturing the relationship between the variables below, and justify your causal diagram given the questions answered in this homework: "Skill": an individual's innat...
Attribution theory has been applied to a variety of sports and exercise contexts, such as children's motivation for physical activity and African soccer, where attributions are placed toward magic and rituals, such as what magicians are consulted before the game begins, rather than the technical and mechanical aspects ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Calculate the mean of individuals who remain alive in the data. The data is stored in a pandas.DataFrame and the respective column is "alive".
For an extinct or completed cohort (all people born in the year 1850, for example), it can of course simply be calculated by averaging the ages at death. For cohorts with some survivors, it is estimated by using mortality experience in recent years. The estimates are called period cohort life expectancies.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Calculate the mean of individuals who remain alive in the data. The data is stored in a pandas.DataFrame and the respective column is "alive".
The form of the estimator stated at the beginning of the article can be obtained by some further algebra. For this, write q ^ ( s ) = 1 − d ( s ) / n ( s ) {\displaystyle {\hat {q}}(s)=1-d(s)/n(s)} where, using the actuarial science terminology, d ( s ) = | { 1 ≤ k ≤ n: τ k = s } | {\displaystyle d(s)=|\{1\leq k\leq n\...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
For this homework you will use a dataset of 18,403 music reviews scraped from Pitchfork¹, including relevant metadata such as review author, review date, record release year, review score, and genre, along with the respective album's audio features pulled from Spotify's API. The data consists of the following columns: ...
Style modeling implies building a computational representation of the musical surface that captures important stylistic features from data. Statistical approaches are used to capture the redundancies in terms of pattern dictionaries or repetitions, which are later recombined to generate new musical data. Style mixing c...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
For this homework you will use a dataset of 18,403 music reviews scraped from Pitchfork¹, including relevant metadata such as review author, review date, record release year, review score, and genre, along with the respective album's audio features pulled from Spotify's API. The data consists of the following columns: ...
It tracks styles, genres, and subgenres, along with the tone of the music and the platforms on which the music is sold. It then connects that data together, in a way that can intelligently tell you about an entire type of music, whether a massive genre like classical, or a tiny one like sadcore.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Your friend Charlie was training a neural net, and observed something very curious. During training, the same network, with the same exact weights, doesn't always give the same prediction for a given example. What can cause this behavior?
Neural networks learn (or are trained) by processing examples, each of which contains a known "input" and "result", forming probability-weighted associations between the two, which are stored within the data structure of the net itself. The training of a neural network from a given example is usually conducted by deter...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Your friend Charlie was training a neural net, and observed something very curious. During training, the same network, with the same exact weights, doesn't always give the same prediction for a given example. What can cause this behavior?
That is to say that given the same input stimulus, you will not get the same output from the network. The dynamics of these networks are governed by probabilities so we treat them as stochastic (random) processes so that we can capture these kinds of dynamics between different areas of the brain.
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
We saw in class that we can quickly decrease the spatial size of the representation using pooling layers. Is there another way to do this without pooling?
A major drawback to Dropout is that it does not have the same benefits for convolutional layers, where the neurons are not fully connected. Even before Dropout, in 2013 a technique called stochastic pooling, the conventional deterministic pooling operations were replaced with a stochastic procedure, where the activatio...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
We saw in class that we can quickly decrease the spatial size of the representation using pooling layers. Is there another way to do this without pooling?
Pooling: In a CNN's pooling layers, feature maps are divided into rectangular sub-regions, and the features in each rectangle are independently down-sampled to a single value, commonly by taking their average or maximum value. In addition to reducing the sizes of feature maps, the pooling operation grants a degree of l...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The \textbf{parameters} (weights \textbf{W}) are learned with ... (One answer)
In "prefix-tuning" or "prompt tuning", floating-point-valued vectors are searched directly by gradient descent, to maximize the log-probability on outputs. Formally, let E = { e 1 , … , e k } {\displaystyle \mathbf {E} =\{\mathbf {e_{1}} ,\dots ,\mathbf {e_{k}} \}} be a set of soft prompt tokens (tunable embeddings), w...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The \textbf{parameters} (weights \textbf{W}) are learned with ... (One answer)
In supervised learning, a sequence of training examples ( x 1 , y 1 ) , … , ( x p , y p ) {\displaystyle (x_{1},y_{1}),\dots ,(x_{p},y_{p})} produces a sequence of weights w 0 , w 1 , … , w p {\displaystyle w_{0},w_{1},\dots ,w_{p}} starting from some initial weight w 0 {\displaystyle w_{0}} , usually chosen at random....
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The \textbf{hyperparameters} are learned with ... (One answer)
The traditional way of performing hyperparameter optimization has been grid search, or a parameter sweep, which is simply an exhaustive searching through a manually specified subset of the hyperparameter space of a learning algorithm. A grid search algorithm must be guided by some performance metric, typically measured...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The \textbf{hyperparameters} are learned with ... (One answer)
Sometimes, hyperparameters cannot be learned from the training data because they aggressively increase the capacity of a model and can push the loss function to an undesired minimum (overfitting to, and picking up noise in the data), as opposed to correctly mapping the richness of the structure in the data. For example...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
We report the final performance (e.g., accuracy) on the ... (One answer)
The cycle is repeated, finishing with a final workshop. At this stage the Participants are requested to submit not their self reported results, but the actual executables (or SDKs) to their algorithms. The Challenge Team then runs these algorithms through a battery of tests on large sequestered datasets. This phase ult...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
We report the final performance (e.g., accuracy) on the ... (One answer)
Some were told that their early guesses were accurate. Others were told that their successes were distributed evenly through the thirty trials. Afterwards, they were surveyed about their performance.
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 v...
After the most like-minded users are found, their corresponding ratings are aggregated to identify the set of items to be recommended to the target user. The most important disadvantage of taking context into recommendation model is to be able to deal with larger dataset that contains much more missing values in compar...
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 v...
Specifically, the predicted rating user u will give to item i is computed as: r ~ u i = ∑ f = 0 n f a c t o r s H u , f W f , i {\displaystyle {\tilde {r}}_{ui}=\sum _{f=0}^{nfactors}H_{u,f}W_{f,i}} It is possible to tune the expressive power of the model by changing the number of latent factors. It has been demonstrat...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider a classification problem on linearly separable data. We train an SVM model and a logistic regression model. For logistic regression (LR) we add a small regularization term (penalty on weights) in order to make the optimum well-defined. Each model gives us a margin. Consider a datapoint $\mathbf{x}_{0}$ that is...
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 techniq...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider a classification problem on linearly separable data. We train an SVM model and a logistic regression model. For logistic regression (LR) we add a small regularization term (penalty on weights) in order to make the optimum well-defined. Each model gives us a margin. Consider a datapoint $\mathbf{x}_{0}$ that is...
For proper loss functions, the loss margin can be defined as μ ϕ = − ϕ ′ ( 0 ) ϕ ″ ( 0 ) {\displaystyle \mu _{\phi }=-{\frac {\phi '(0)}{\phi ''(0)}}} and shown to be directly related to the regularization properties of the classifier. Specifically a loss function of larger margin increases regularization and produces ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider a learning algorithm that has the property that it depends only very weakly on the input data. E.g., this could be SGD where we choose a very small step size and only run for very few iterations. To go to the extreme, you can imagine a learning algorithm that always outputs the same model irrespective of the t...
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 conver...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider a learning algorithm that has the property that it depends only very weakly on the input data. E.g., this could be SGD where we choose a very small step size and only run for very few iterations. To go to the extreme, you can imagine a learning algorithm that always outputs the same model irrespective of the t...
To achieve this, the learning algorithm is presented some training examples that demonstrate the intended relation of input and output values. Then the learner is supposed to approximate the correct output, even for examples that have not been shown during training. Without any additional assumptions, this problem cann...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the Poisson distribution with parameter $\lambda$. It has a probability mass function given by $p(i)=\frac{\lambda^{i} e^{-\lambda}}{i !}$, $i=0,1, \cdots$ (i) Write $p(i)$ in the form of an exponential distribution $p(i)=h(i) e^{\eta \phi(i)-A(\eta)}$. Explicitly specify $h, \eta, \phi$, and $A(\eta)$ (ii) Co...
Given a set of parameters θ and an input vector x, the mean of the predicted Poisson distribution, as stated above, is given by λ := E ⁡ ( Y ∣ x ) = e θ ′ x , {\displaystyle \lambda :=\operatorname {E} (Y\mid x)=e^{\theta 'x},\,} and thus, the Poisson distribution's probability mass function is given by p ( y ∣ x ; θ )...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Consider the Poisson distribution with parameter $\lambda$. It has a probability mass function given by $p(i)=\frac{\lambda^{i} e^{-\lambda}}{i !}$, $i=0,1, \cdots$ (i) Write $p(i)$ in the form of an exponential distribution $p(i)=h(i) e^{\eta \phi(i)-A(\eta)}$. Explicitly specify $h, \eta, \phi$, and $A(\eta)$ (ii) Co...
The Poisson family of distributions is parametrized by a single number λ > 0: P = { p λ ( j ) = λ j j ! e − λ , j = 0 , 1 , 2 , 3 , … | λ > 0 } , {\displaystyle {\mathcal {P}}={\Big \{}\ p_{\lambda }(j)={\tfrac {\lambda ^{j}}{j! }}e^{-\lambda },\ j=0,1,2,3,\dots \ {\Big |}\;\;\lambda >0\ {\Big \}},} where pλ is the pro...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
We consider a classification problem on linearly separable data. Our dataset had an outlier---a point that is very far from the other datapoints in distance (and also far from margins in SVM but still correctly classified by the SVM classifier). We trained the SVM, logistic regression and 1-nearest-...
Computing the (soft-margin) SVM classifier amounts to minimizing an expression of the form We focus on the soft-margin classifier since, as noted above, choosing a sufficiently small value for λ {\displaystyle \lambda } yields the hard-margin classifier for linearly classifiable input data. The classical approach, whic...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
We consider a classification problem on linearly separable data. Our dataset had an outlier---a point that is very far from the other datapoints in distance (and also far from margins in SVM but still correctly classified by the SVM classifier). We trained the SVM, logistic regression and 1-nearest-...
Whereas the original problem may be stated in a finite-dimensional space, it often happens that the sets to discriminate are not linearly separable in that space. For this reason, it was proposed that the original finite-dimensional space be mapped into a much higher-dimensional space, presumably making the separation ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Fitting a Gaussian Mixture Model with a single Gaussian ($K=1$) will converge after one step of Expectation-Maximization.
However, the one-dimensional case has limited real world applications. Also, the convergence of the algorithm in higher dimensions with a finite number of the stationary (or isolated) points has been proved. However, sufficient conditions for a general kernel function to have finite stationary (or isolated) points have...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
Fitting a Gaussian Mixture Model with a single Gaussian ($K=1$) will converge after one step of Expectation-Maximization.
A more complex model will usually be able to explain the data better, which makes choosing the appropriate model complexity inherently difficult. One prominent method is known as Gaussian mixture models (using the expectation-maximization algorithm). Here, the data set is usually modeled with a fixed (to avoid overfitt...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The primal formulation of the soft-margin SVM is NOT equivalent to $\ell_2$ adversarial training for a linear model trained with the hinge loss ($\ell(z) = \max\{0, 1 - z\}$).
Computing the (soft-margin) SVM classifier amounts to minimizing an expression of the form We focus on the soft-margin classifier since, as noted above, choosing a sufficiently small value for λ {\displaystyle \lambda } yields the hard-margin classifier for linearly classifiable input data. The classical approach, whic...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus
The primal formulation of the soft-margin SVM is NOT equivalent to $\ell_2$ adversarial training for a linear model trained with the hinge loss ($\ell(z) = \max\{0, 1 - z\}$).
Consider a binary classification problem with a dataset (x1, y1), ..., (xn, yn), where xi is an input vector and yi ∈ {-1, +1} is a binary label corresponding to it. A soft-margin support vector machine is trained by solving a quadratic programming problem, which is expressed in the dual form as follows: max α ∑ i = 1 ...
https://www.kaggle.com/datasets/conjuring92/wiki-stem-corpus