# Questions tagged [mathematics]

Mathematics in a data science or machine learning context refers to the mathematical underpinnings for algorithms, optimization, statistics, and linear algebra etc.

196 questions
Filter by
Sorted by
Tagged with
6 views

### Is it possible for the (Cross Entropy) test loss to increase for a few epochs while the test accuracy also increases?

I came across the question stated in the title: When training a model with the cross-entropy loss function, is it possible for the test loss to increase for a few epochs while the test accuracy also ...
9 views

### using logsumexp in softmax

I saw this equation in somebody's code which is an alternative approach to implementing the softmax in order to avoid underflow by division by large numbers. softmax = e^(matrix - logaddexp(matrix)) = ...
• 299
9 views

### Growth Edge in Link Prediction

I have 2 CSV files representing edge in social networks in 2 consecutive generations. I am trying to predict future edges. My initial tough is to train a linear regression on the first generation with ...
6 views

### Geometric Deep Learning - G-Smoothing operator on polynomials

(Note: My question resolves about a problem stated in the following lecture video: https://youtu.be/ERL17gbbSwo?t=413 Hi, I hope this is the right forum for these kind of questions. I'm currently ...
1 vote
16 views

### Structured policies in dynamic programming: solving a toy example

I am trying to solve a dynamic programming toy example. Here is the prompt: imagine you arrive in a new city for $N$ days and every night need to pick a restaurant to get dinner at. The qualities of ...
8 views

### Efficient Searching for a basis of information as a hyperparameter in a large possible hyperparameter space

I have a set of inputs, let's call them 'I', that can be fed through a complicated group of functions to produce/calculate a wide variety of outputs (let's call them 'O'). I want to find a subset of ...
• 13
26 views

### Strategies for complicated inverse function approximation

I have a dataset G. There is a complicated set of mathematical functions I can use to calculated the values 'W' for any given point in G. f(G) $\rightarrow$ W To the best of my knowledge these ...
• 13
1 vote
17 views

### Confused on Naive Bayes classifier

In the last part of Andrew Ng's lectures about Gaussian Discriminant Analysis and Naive Bayes Classifier, I am confused as to how Andrew Ng derived $(2^n) - 1$ features for Naive Bayes Classifier. ...
17 views

### How to measure statistical similarity or discrepancy between a dataset and a distribution?

Is any way to measure statistical similarity or discrepancy between a dataset and a distribution? I have do some research, but find most of method are intended to describe discrepancy between data and ...
• 21
19 views

### what exactly is the "order"-parameter in pandas interpolation?

what exactly is the "order"-parameter in pandas interpolation? it is mentioned in the doc: ...
21 views

### Why NMF use frobenius norm?

I read about using NMF for recommendation systems. (Non-negative matrix factorization for recommendation systems) NMF tries to minimize Frobenius norm of (V - WH) . ...
• 285
11 views

### How come the cost function changed in linear regression in andrew Ng stanford course in two different videos?

I'm a little bit confused, here is the cost function Andrew gave at the first place to minimize but when he derived using probability, we minimize the same one but in a different sign here h(theta) ...
31 views

### Understanding Kneser-Ney Formula for implementation

I am trying to implement this formula in Python $$\frac{\text{max}(c_{KN}(w^{i}_{i-n+1} - d), 0)}{c_{KN}(w^{i-1}_{i-n+1})} + \lambda(c_{KN}(w^{i-1}_{i-n+1})\mathbb{P}(c_{KN}(w_{i}|w^{i-1}_{i-n+2})$$ ...
• 237
1 vote
23 views

### Ridge regression terms [closed]

Can anybody let me know the definition of these terms? I know we solve this for Beta but I want to have the definition
10 views

### Random number generator and JL lemma

Suppose we are given access to a random number generator U, which generates independent random real variables distributed uniformly in the range [0,1). Show that this can be used to produce an ...
1 vote
79 views

### Does T-test requires Standard deviation or variance for calculation

Might be a novice question, but the main difference between a t-test and z-test, I was able to understand, is that the z-test calculation requires the SD value of the sample where as in a t-test, we ...
• 163
5 views

### straight line or going down

I want to cluster data points based on the pattern ( six points each )so if it is going down or straight line or going with ups and downs! do you have any ideas how can I achieve it accuratly, I tried ...
13 views

### Understanding the step of SGD for binary classification

I cannot understand the step of SGD for binary classification. For example, we have $y$ - true labels $\in \{0,1\}$ and $p=f_\theta(x)$-predicted labels $\in [0,1]$. Then, the update step of SGD is ...
• 101
32 views

### What are the mathematical topics that I need for Machine Learning & Data Science? [duplicate]

I would like to start studying ML & DS, but I feel I am a bit lost, so I don't really know what to study, what the prerequisites are, I mean I know I should study linear algebra, calculus, and ...
32 views

### Converting similarity value into a dissimilarity value

Suppose we have similarity values between some data point in the interval $[0, 1]$. How can I transform this similarity values into a dissimilarity values in the interval $[0, ∞]$?
• 101
43 views

### Equations in "Batch normalization: theory and how to use it with Tensorflow"

I read the article Batch normalization: theory and how to use it with Tensorflow by Federico Peccia. The batch normalized activation is $$\bar x_i = \frac{x_i - \mu_B}{\sqrt{\sigma_B^2 + \epsilon}}$$...
• 103
1 vote
28 views

### How important is real analysis/measure theory to this field? [closed]

I am a college student, struggling to decide whether or not to take pure maths electives on topics such as real analysis and measure theory. If I were to take them then I would definitely have to ...
45 views

### Deriving VIF equation from the matrix form of Least Squares equation

I have been working through the derivation of the formula used to calculate the Variance Inflation Factor associated with a model. I am hoping to start with the Least Squares equation as defined in ...
• 81
54 views

I was reading a document about Reinforcement Learning policy gradient http://web.stanford.edu/class/cs234/CS234Win2019/slides/lnotes8.pdf when I encountered this expression $\nabla_{\theta} \mathbb{... 1 vote 0 answers 36 views ### Association rules - Find 100% confidence rules [closed] Suppose there are 100 items, numbered 1 to 100, and also 100 baskets, also numbered 1 to 100. Item i is in basket b if and only ... • 11 1 vote 0 answers 14 views ### GloVe dot product optimized for non-comutative data whilst the operation itself being commutative To my current knowledge, GloVe word vectors dot product are optimized to be the w_i ⋅ w_j = log⁡(P(ⅈ|j)) The probability being computed from a cooccurance matrix. However, dot product is a commutative ... • 23 0 votes 0 answers 21 views ### Is Regression Line an 1-D affine subspace of 2-D vector space? Background I currently read a book called "Mathematics for Machine Learning" and I read chapter 2 which is about Linear Algebra, especially on subchapter 2.8 which is about Affine Space. The ... 0 votes 0 answers 7 views ### Clustering features of a class based upon the difference between features of a reference class and the particular class across multiple datasets? I want to separate (generalized separation) the features of several classes based on the difference between the features (floating point values) of the particular class and a reference class across 7 ... • 101 1 vote 0 answers 18 views ### Right way to compare model scores for Next Best Action I have around 15 classification models for different products built in different ways (some are RF, some are Gradient Boosting, some were downsampled in one way, others in other way, some are built in ... 0 votes 1 answer 10 views ### The formula of loss function uses '(i)' as power of expected and real variables. What does that mean? In the formula below, could one understand$y^{(i)}$as$y_i$? If not, what is the fundamental difference ? $$j(\theta_0, \theta_1) = \frac{1}{2m}\sum_{i=1}^m(h_{\theta}(x^{(i)})-y^{(i)})^2$$ 0 votes 0 answers 12 views ### transforms in mathematical equations How to write transform model in mathematical equations, from the start to the end, that's include the formula of y^. instead of coding and visualizations I'm looking for the mathematical equations, as ... 0 votes 0 answers 22 views ### What can I use to limit the range of a Cantor pairing function to 255? I have 2 data input sets [0-20] and [0-7] and I need a pairing function like CANTOR to restrict the mapped value to [0 - 255]. Would it be feasible to use MOD(256) to restrict the result? 4 votes 1 answer 50 views ### How do I minimizie cost for EV charging? I want to find a charging schedule that minimize cost of charging an EV. The main objective is to have a fully charged car for the next morning, but the sub objective is to minimize cost based these ... 0 votes 1 answer 40 views ### Summarize 3 variables into one and calculate a „skill“value + ranking I have a data set that looks like this: Name Top Speed Number Sprints Cumulative Sprint distance Xyz 55 300 33.3 Xyz123 45 350 32.0 Top Speed is in km/h. Cumulated Sprint distance is in km. Number ... 1 vote 1 answer 52 views ### Why does stochastic gradient descent lead us to a minimum at all? Why do we think that stochastic gradient descent is going to find a minimum at all? I mean on each iteration SGD moves in the direction that reduces only current batch's error (SGD doesn't care about ... • 121 0 votes 0 answers 16 views ### Sequential batch processing vs parallel batch processing? In deep learning based model training, in general batch of inputs are passed. For example for training a deep learning model with [512] dimensional input feature vector, say for batch size= 4, we ... • 111 14 votes 4 answers 1k views ### Do you actually need math for your data science job? I am a physicist working in a data scientist role. I was told everywhere that my degree is a very good starting point because I know a lot of math and it is crucial for this job. But other than ... • 141 3 votes 2 answers 783 views ### Which is meant by +/-9.2e18 years in timespan? I was able to convert the 9.2e18 AD to a date, but I am confused about the exact date. Which date is 9.2e18 AD and and 9.2e18 BC? Time span (absolute) - [9.2e18 BC, 9.2e18 AD] i.e +/- 9.2e18 years ... 0 votes 1 answer 34 views ### How does TensorFlow compute gradients of nonelementary integrals? I was reading about custom activation functions, autodiff etc, trying to understand it all. I think I have a glimpse of it now, but right after closing the book I thought "what about the ... 1 vote 0 answers 46 views ### Understanding the math behind linear classification [closed] For example we have$X$train data,$y$and$w$Our margin is$M = y_i \langle w, x_i \rangle$If$M_i > 0$classifier return True predict and otherwise, if$M_i < 0$we get False predict. How ... -1 votes 1 answer 26 views ### Why do we use 'T' when we are to say matrix-vector product? [closed] On the first picture author uses$T$meaning matrix-vector product But other website do not use$T$, but says that$x$is a vector, I do not understand if it is important or not 2 votes 1 answer 41 views ### What are the math Prerequisite for understanding 'First Order Motion Model for Image Animation' Paper? This is the 'First Order Motion Model for Image Animation' Paper. But I don't understand most of the mathematical things in the paper. What are the math Prerequisite for understanding this paper? 0 votes 0 answers 18 views ### Can transformers be used to solve for a number of independent polynomial inequalities or polynomial equations? I'm interested in solving constraint satisfaction problems involving polynomial functions of real variables using transformers. The papers available only deal with boolean SATs in CNF format e.g., ... • 1 1 vote 0 answers 76 views ### What is the purpose of defining such measure as metric or non-metric? proximity measures can be metrics or non-metrics. the following criteria defines a metric dissimilarity measurement: here is for a metric similarity measurement I would like to know the consequences ... 2 votes 0 answers 81 views ### Creating neural network to solve for equations I have a dataset like: The v1 variable is a mathematical expression. Currently, I am using hyperopt to solve for these parameters and am using v1,v2,v3 in regression to predict y and then minimize ... 0 votes 0 answers 45 views ### prove E[(TSS - RSS)/p] >$\sigma^2\$ in multiple linear regression

In Intro to statistical learning, Chapter-3 for Linear Regression, in the subsection 3.2.2 , Unit "One: Is There a Relationship Between the Response and Predictors?" , it is mentioned that: ...
1 vote
11 views

### Incorrect derivative [duplicate]

Currently I'm reading a book named "Grokking Deep Learning" and I'm confused with the way author takes derivative from function. Let me explain. We have loss function, where pred is ...
33 views

### How to compare two one hot encoded data frames based on column names?

I have two datasets with shapes (329, 159) and (26,24). Both of them are one-hot encoded. The columns in the smaller dataset are present in the larger dataset. The smaller dataset has scores that I ...
1 vote