instruction
stringlengths
9
38.7k
I plant engineer asked me to analyze some data they have regarding production. It has multiple materials quantities, machines parameters, and final product quality (which he wants to predict). The data has a time stamps every 3 hours for the last year, 25 parameters (all continuous variables). I tried to detrend the s...
I don't have much experience using logistic regression and therefore I wanted to pick your thoughts for what I should do with my model. I am using logistic regression to see how do different variables affect my dependent variable. I have 30 independent variables and some of them are dummy variables. I have used the glm...
I have four years of monthly data, but I want to use three years to test the forecast of a model which uses only one year of historical data in a rolling way. For example: historical data from Jan-2016 to Dec-2016 will be used to forecast Jan-2017 to Dec-2017 but then Feb-2016 to Jan-2017 data will be used to forecast...
While reading the book Applied Predictive Modelling, I stumbled over the following sentence (Page 202): For example, uninformative predictors with high correlations to informative predictors had abnormally large importance values. The context is trees and the procedure of getting the importance of predictors by ana...
How and why are random number generators (RNGs) important in computational statistics? I understand that randomness is important when choosing samples for many statistical tests to avoid bias towards either hypothesis, but are there other areas of computational statistics where random number generators are important?
I am playing with convolutional neural networks using Keras+Tensorflow to classify categorical data. I have a choice of two loss functions: categorial_crossentropy and sparse_categorial_crossentropy. I have a good intuition about the categorial_crossentropy loss function, which is defined as follows: $$ J(\textbf{w}) =...
Please, could someone let me know how I can add noise to a synthetic value. I have a temperature value and I need to add noise to this value and made a graph of this noise. To be more clear with my question I have a single value of temperature of 1088.24(Kelvin), that is a result of thermodynamic calculation of temper...
I have been reading through the Tutorial on ABC rejection and ABC SMC for parameter estimation and model selection by Tina Toni and Michael P. H. Stumpf. I can't work out how to calculate the weights for the SMC approach. Could anyone run through this step by step example to help me understand? For t=0 Say I take a sam...
I’m trying to reconcile the implementation of REINFORCE with the math. To begin, the R algorithm attempts to maximize the expected reward. How it’s commonly implemented in neural networks in code is by taking the gradient of reward times logprob. loss = reward*logprob loss.backwards() In other words, Where theta are...
Consider elastic net regression with glmnet-like parametrization of the loss function$$\mathcal L = \frac{1}{2n}\big\lVert y - \beta_0-X\beta\big\rVert^2 + \lambda\big(\alpha\lVert \beta\rVert_1 + (1-\alpha) \lVert \beta\rVert^2_2/2\big).$$ I have a data set with $n\ll p$ (44 and 3000 respectively) and I am using repe...
I am trying to understand avnoa on two logistic regression models. I noticed that the chisq (Chisq) test and likelihood ratio test (LRT) are returning the exact same results in this following toy example. Why? > fit1=glm(am~mpg+hp,mtcars, family = binomial()) > fit2=glm(am~mpg+hp+wt,mtcars, family = binomial()) > anova...
I have an SVM model with polynomial kernel. I have output of feature weights, but they are all the individual features. Is there a way to know which interactions between individual features are most important in the separation of data points for the SVM model?
I recently came across a statement that the unconstrained primal L2-regularized SVM formulation $$ \min_\mathbf{w} \lambda \|\mathbf{w}\|^2_2 + \sum_i \max (0, \; 1 - y_i \mathbf{w}^T\mathbf{x}_i) $$ is equivalent to a primal constrained formulation \begin{align} \min_\mathbf{w} \sum_i \max (0, \; 1 - y_i \mathbf{w}^T...
If $X \sim N\left(\mu, \frac{\sigma^2}{n}\right)$, what can we say about the behaviour of $\text{Var}\{\Phi(X)\}$ with respect to $n$? Is it true that this variance behaves as $O(n^{-1})$ for $n$ large enough? I would show this using the Maclaurin series on $\Phi(x)$, assuming $x \ll 1$. Would this be correct? If so,...
Imagining the following situation where A/B are independent results: A is a 51% result, given N datapoints B is a 50% result, given M datapoints how many data points (ie N and M) do you need to have confidence that the difference between A/B is statistically significant?
The score of a random variable is the partial derivative w.r.t. $\theta$ of the log likelihood of that parameter given a dataset $x$. I'm having trouble interpreting this quantity. Why it is called "score"?
When introducing L2 regularization on my neural network, there is a point during training where the error starts to increase after having reached a value very close to 0. This is due to the fact that when $\Delta_{w}$ gets closer to 0, the most influenced term in weight update become $\lambda w$, that makes the weight ...
I need some help understanding what values I need to put into a two-tailed logistic regression power analysis are in G*Power. I am trying to see if hypertension (my binary independent) makes a difference on having a headache (my binary dependent). The prevalence of having a headache, irrespective of hypertension is 0...
I'm trying to A/B test (using a t-test) if a test variation leads to an increase in time spent on the website. Should I: Method 1: Treat time spent by a user on two different days as two different data points or Method Method 2: Average them out and treat them as a single data point? (A user stays in the same group o...
Based on a set of candidate lambda values, I'm using cv.glmnet() to select the best Lasso lambda. Next, I want to use a different dataset to run 5-fold CV for Lasso using the lambda.min selected by cv.glmnet(), as lambda. The goal is to check the predictors selected by Lasso, in each fold. However, I realized that, ne...
I want to test whether there is a correlation between the spatial distances of 18 plots and the dissimilarity in their species composition. I also have information about whether they are urban (as a binary distance matrix). I thought I could use a mantel's test but after doing some readings I think this would be inappr...
It is well established that centering a variable, i.e. subtracting the mean of that variable from every value produces a variable with zero mean. For example: > data = c(1,2,3,4,5,6,7,8,9) > mean = mean(data) > data.centered = data-mean > mean(data.centered) [1] 0 So far, so good. However, an attempt at centering a lo...
Is passing weight as a parameter to the xgb.DMatrix same as multiplying our predictor (say y) by the weight ? In more detail, I have a dataset which has the number an accident with 3 possible values, 0, 1, 2. And I want to weight it by the number of days per year the user has been driving, which has values like 1/365,...
I recently ran into a discussion with a college who used Random Forrest Variable importance to discover causal links between some actions of web users and their characteristics. As I come from econometrics, I was wondering whether this is a good approach, since I intuitively would have fitted a Logistic Regression (the...
Derive the expectation and variance of the following: $\frac{1}{n(b-a)}$$\sum_{i=1}^n 1$$_{Y_i∈(a,b]}$, b>a. My thoughts with this are to put the summation in an integral and then multiply by n. Is this a correct way of thinking? Is a moment generating function needed?
I'm having difficulties in finding examples of a Verification Data-mining/KDD approach. Let me explain what I mean by that. In the notorious article From Data Mining to KDD by Fayyad et al the following definition is mentioned: "The knowledge discovery goals are defined by the intended use of the system. We can distin...
I am doing an ROC analysis for the first time. I taught myself the basics by reading a few articles and tutorials online, but I am in a bit over my head. I am using the pROC package in R to run the analysis. My question involves using a discrete predictor (ranging from 1-20) to try and identify a threshold for a binary...
I know the form of a modified exponential and gompertz curve but I cannot understand the difference between the two..How does fitting a gompertz curve differ from that of a modified exponential..please explain..
if I have a data set with 3 within-subjects conditions, with different number of trials on each (e.g., cond. A = 8 trials, cond. B = 6 trials, cond. C = 5 trials), what repeated measures technique can I use to evaluate for a within-subjects effect? Is using repeated measures ANOVA fine? I tried using a repeated measure...
I am reading Cochrane's (p.35) book on Time series and I'm a bit rusty on my linear algebra so I was hoping someone could help me derive the variance of a VAR process. Consider a VAR(1): $x_{t} = Ax_{t-1} + Cw_{t}$ where $C = [\sigma_{\epsilon} \quad0 \quad \sigma_{\epsilon}]'$ and $E(w_{t}w_{t}') = I$ Then he says t...
I would have thought there'd be an answer to this question on here already, but I've been unable to find it, so I apologize if this is a repost. If I have a regression model of the form Y ~ X + X^2, and both the X and X^2 terms come back significant, can I safely interpret both of these results? For example, let's say...
I am wondering how a logged control variable is interpreted in a linear probability model. The interpretation in the following lin-log model is clear: (1) y = b0 + b1*log(x1) Here, a 1% increase in x1 changes y by b1/100 units. Now I have the following linear probability model with a logged (control) variable: (2) P...
I have a (software) system which was failing, with a particlular failure mode, about 0.5% of the time. This was low enough that it was not noticed during inital development. After performing several regression tests however we found a particular intermittent (race condition) failure mode. One bug was fixed, which dropp...
This article$^1$ on p.16 specifies Haldane's prior as: $$p(\theta) = \frac{1}{θ(1−θ)}$$. However, other$^2$ source on p.6 specifies Haldane's prior as proportional to $\frac{1}{θ(1−θ)}$, i.e. $$p(\theta) \propto \frac{1}{θ(1−θ)}$$. Could anyone clarify which expression is the accurate one. 1. Approximation of improp...
Usually, in survival analysis, we interpret survival $S(t) = P(T > t)$ but I came across the definition $S(t) = P(T >= t)$ in the context of nonparametric methods (lifetable and kaplan-meier). In case of nonparametric methods, we should interpret survival as probability of event occurence after t or exactly in time t ...
I have been thinking about this question for the past couple days and have not been able to come to a conclusion. I am running a logistic regression and want to calculate the % change in predicted probability from adding a variable of interest. I am using STATA for this is and here is my code. First, I run a regression...
I am looking to conduct a research study and need some advice on potential statistics to analyze my data. I want to present problems of varying difficulty (easy, moderate, hard) to all participants. I also want to assess neuroticism as a continuous variable. My DV is also continuous variable (time to solve the problems...
Consider the basic linear regression model $y = A \theta$ with $y\in R^n$ and $A \in R^{n\times k}$ measurements and $\theta \in R^k$ parameters to be estimated. In my case, $\theta$ are physically meaningful parameters that I would like to estimate for further interpretation. A situation that I encounter frequently is...
I am working on Problem 1.13 from Statistical Models and Methods for Lifetime Data, 2nd ed., by Jerald Lawless, and I have been stuck on part (b) for some time now; I would greatly appreciate any assistance. I will summarize the problem below. Suppose that given $\lambda>0$, $T$ is an exponential random variable with ...
As stated in the question: Is the case in general that given the graph below the following relationship will hold? P(A, C) = P(A) P(C) I will edit later to ask this question in a general mathematical framework right now I do not have time to format.
I have the following regression $$y_i=a_1+b_1x_i+c_1z_i+d_1w_i$$ $$x_i=a_2+b_2y_i+c_2z_i+d_2w_i$$ a, b, c, d are coefficients. x is endogenous.z and w are exogenous to errors. In this simultaneous regressions, I determined the variable z as an instrument for y in the regression x and the variable w as an instrument for...
I have two outcomes with 5 weekly effects for each one that stem from a synthetic cohort analysis. The two tables below show the p-value for each week (for the null that the effect is zero in that week), along with a joint p-value (for the null that all five effects are zero). Outcome 1: Week p-value for eac...
How does the posterior of a Bayesian Instrumental variable model look like? I am aware that the Posterior $ \propto $ Likelihood * Priors. But I am not sure how the Posterior function looks like for an Instrumental variable model. For eg, for a linear regression model ($Y = X \beta + \epsilon$), we have: Posterior $\...
Quick question on GLMM with repeated measures (crossover) design and how to deal with missing covariate data. In this context, 28 participants complete 2 conditions (crossover design with 1 week washout between conditions) comparing glucose effect (AUC) of 1) sugary drink vs. 2) water. I am adjusting for several covari...
I am working with R on a linear regression, time series. I have a dataframe that is looking like in the example, daily recordings from 1st of January 1993 until 31st of December 2010. Date AT31102 1 1993-01-01 46.609 2 1993-01-02 42.273 3 1993-01-03 56.000 4 1993-01-04 63.348 5 1993-01-05...
I'm looking for some references on the following problem. You're given a pre-trained classifier network, say ResNet-50, on images that are 255x255, from which you can extract the last fully connected layer (2048 dimensional) to get features. The goal is to then leverage the pre-trained model for a different classificat...
I have daily data of new member joins from 2017/01/01 to today. I was tasked to perform forecast daily new member joins for the next month (e.g. now is Jan/31, I'm to forecast for the whole Feb). Preliminary screening shows that: 1) The data has no seasonal component 2) There is no obvious trend (even polynomial ones) ...
I'd like to compare the (continuous) responses of two unpaired groups. The end objective is to test whether one of the groups will be 'superior' to the other (either by a mean or a median comparison). However, I've come across 4 issues in the data: Non-normality: Visual approaches such as QQ-plot/histograms, and stati...
I have seen at some points the use of the Radon-Nikodym derivative of one probability measure with respect to another, most notably in the Kullback-Leibler divergence, where it is the derivative of the probability measure of a model for some arbitrary parameter $\theta$ with respect to the real parameter $\theta_0$: $$...
I am trying to forecast time series data for next $n$ time periods and I am using various forecasting techniques like simple moving average, exponential smoothing (Single,double,triple) and auto.arima(). I am getting equal forecasting values for simple moving average and single exponential smoothing and at times, even...
I think I am confused due to the lax notation typically used when dealing with probabilities and not having a formal probability background. Bayes' Rule tells me that $$Pr(X_t=a|X_{t+1}=b)Pr(X_{t+1}=b) = Pr(X_{t+1}=b|X_t=a)Pr(X_t=a)$$ Detailed balance is that for a transition matrix P there exists a stationary distrib...
Hi I want to analyze the patients related data which includes fields like age, gender, mortality, medication, diagnosis etc. I am not able to decide an objective to do this. I want to come up with solutions which will help the hospitals in reducing for example the death rate or the no of patients falling from the bed. ...
I am a newbie to Xgboost and I would like to use it for regression, in particular, car prices prediction. I started following a tutorial on XGboost which uses XGBClassifier and objective= 'binary:logistic' for classification and even though I am predicting prices, there is an option for objective = 'reg:linear' in XGBC...
Been thinking through fitting a kind of Gaussian mixture model in more of a neural network style (kind of similar to RNADE or RMADE by Larochelle, without going into details) and see that this could scale really nicely to very large dimensions if I could avoid having to know both $\Sigma$ AND $\Sigma^{-1}$ per the mult...
In page 202 of the latest draft of Richard S. Sutton's RL book, the average-reward setting for RL is introduced, and there the author states the equivalence: $$\lim_{h\to \infty} \frac{1}{h} \sum_{t=1}^h \mathbb E[R_t | A_{0:t-1}\sim \pi] = \lim_{t\to\infty} \mathbb E[R_t| A_{0:t-1}\sim \pi]~. $$ Why is this true? How ...
I can't seem to understand the whole idea of Cox Process in spatial point pattern. Can someone explain it in layman's term? thank you
I am using logistic Regression for my analysis. My Accuracy score and AUC score are different X_train, X_test, y_train, y_test =train_test_split(x, you, test_size=0.3,random_state=0) LogReg=LogisticRegrssion() LogReg.fit(X_train,y_train) y_pred=LogReg.predict(X_test) accuracy_score(y_test,y_pred) accuracy_score=0...
Are there any sharp tail bounds for an $F_{p,q}$ distribution? That is, if $X \sim F_{p,q}$, then for a $t_1,t_2 > 0$, what are the sharpest $\delta_1$ and $\delta_2$ known such that $$P(X > t_1) \leq 1 - \delta_1(t_1, p,q)\,, $$ $$P(X < t_2) \leq 1 - \delta_2(t_2, p,q)\,. $$ In principle, once could use sharp tail b...
Let the cumulative distribution function of a random variable $X$ has been given as follows: $F(x)=\begin{cases} 0 & \text{ if } x<0 \\ \frac{x^2}{10} & \text{ if } 0<x<1\\ \frac{x+2}{8} & \text{ if } 1\leq x\leq2 \\ \frac{c(6x-x^2-1)}{2} & \text{ if } 2\leq x\leq3 \\ 1 & \text{ if } x>3 \end{cases}$ The constant ...
Let's say I am running a regression over the full sample and I get my coefficient values for each variable. y = intercept + alpha X1 + beta X2 coef: y = 1.8354 + 0.23234 X1 + 0.4564 X2 I woudl like to the check the values I obtained using bootstraping (because I don't have any hold out sample ). Running a bootstrap...
I have a problem which I'd like to apply machine learning (supervised classification) to, however, the data is sequential and each row in the data vector has its own length. This implies that the number of features in each row is non-constant (think time-series data - for example - day-by-day data). So this means that ...
Task Binary classification for an imbalanced dataset with 70 positive samples and 700 negative samples Data Oversample positive samples to match the number of negatives. Each sample has 10 features. Model By cross-validation, the tree-based methods gave better performance than Logistic regression and two-layered dense...
Question: Is it correct to use k-fold cross validation for choosing the best forecasting model among several regression models? Case: Data come from a time series (e.g. prices), but I have access only to a random fraction of them. Instead of having 365data/year, I have only some of these observations in a casual order ...
In Structural Equation Modeling one approach to deal with categorical Mediators is the "underlying latent variable approach". However using this approach e.g. with the MPlus software, only thresholds are calculated, which can be used to calculate the probabilities for the categories of the categorical variable. The int...
I fitted a plane into a set of points in R3 using minimization of L2 error (taken from this post: https://gist.github.com/amroamroamro/1db8d69b4b65e8bc66a6). data = cluster_data[:ALLOWED_PEAKS, :] grid_steps = 20 # regular grid covering the domain of the data mn = np.min(data, axis=0) mx = np.max(data, axis=0) X, Y ...
How Can I show a test statistics invariant under specific transformation like shift or scalar or orthogonal transformation. Is there any routine way to do that? Is it enough to show that test statistics not changes with general form of the transformation? any help will be appreciated.
The formula for the conditional probability of $\text{A}$ happening given that $\text{B}$ has happened is:$$ P\left(\text{A}~\middle|~\text{B}\right)=\frac{P\left(\text{A} \cap \text{B}\right)}{P\left(\text{B}\right)}. $$ My textbook explains the intuition behind this in terms of a Venn diagram. Given that $\text{B}$ ...
I'm aware of the issues regarding the use of relative risk in a case control study. But a colleague recently told me that odds ratios are inappropriate for cross-sectional and cohort studies but can't seem to elaborate further. I think he's just assuming that since relative risk is used in cohort studies rather than ca...
I want to regress points on goal difference (soccer-related data) over a 15-year period. However, not all of the seasons contain the same number of teams (there were 10, 11 or 12 teams, predominantly 12, in any given season). The independent variable is goal difference and the dependent variable is points (ie: regress...
I am trying to prove a lemma. Consider $X_1,.,X_n$ to be i.i.d random variables. Show that, in particular: $$E\|\hat{\mu}-\mu \|^2=\frac{1}{n}\text{trace}(\Sigma)$$ I have the following partial solution: $$E\|\hat{\mu}-\mu\|^2=E(\hat{\mu}-\mu)^T(\hat{\mu}-\mu)$$, since $\|x\|=x^Tx$, now using the definition of $\hat\mu...
I'm trying to figure out what the "weight" argument is actually doing when I use it in a glm function. Does it simply divide each element in the target vector by the corresponding element in the weight vector? This is how I'm used to weighting working in modeling, but it doesn't appear to work this way in R when I use ...
I have a classification problem for which I have a dataset composed by 89 istances (59 of class 0 and 30 of class 1). Given the small dataset I perform a leave-one-out cross validation and then compute the AUC on the out-of-sample scores. I get an AUC of 0.08.... I don't understand...should the AUC be more than 0.5?
I've been reading more about linear regression and the assumptions it makes. What are the consequences of violating some of the assumptions involved? For instance, you need the dataset to exhibit little or no multicollinearity. What happens if I ignore this? For instance, suppose I have a dataset where x_3 and x_4 ar...
How can I see the influence of the features in my model (e.g. what is the impact of a specific feature on the target variable)? Saw a great article (https://medium.com/applied-data-science/new-r-package-the-xgboost-explainer-51dd7d1aa211) "Making the XGBoost interpretable", but that package is not working. So, If I b...
My goal is to identify city and (US) state of both inventor and assignee of US patents from the 1910's and 1920's. These patents are provided by google and look like so, like so or like so. The information on inventor's location is stored in the header and the for the very old ones in the first paragraph, and for the...
I'm trying to understand the output generated from a least trimmed squares regression. As far as I understand, least trimmed squarres performs basic OLS, then you order the residuals and only include the observations with the k-smallest residuals in another OLS regression, which is then your least trimmed squares estim...
I am building a mixed-effects model with nlme package. The output of the model is as seen below, and includes the time variable, namely day and one categorical variable for treatment with 4 categories.. The reference category that is not shown here is treatedWT. And of course the interaction between these 2 variables i...
During training of a deep network on data with high class-imbalance, I notice the network's predictions tend to mimic the class distribution in the training batches. What is the expected behavior of a network's predictions, when trained on batches that alternate on the sampling method? That is for example over the fir...
My understanding of attention is that a weighted combination of a set of vectors is somehow combined with the decoder's hidden state. How exactly is it combined? Is it added to the hidden state before it enters the cell at each time step? In particular, I'm using LuongAttention, an AttentionWrapper, and a GRUCell.
Suppose I have a set of numbers, for example - exam scores of 20 students. Can there be more than half of students scoring above the mean ? similarly, can more than half the class score above the median and mode ?
I used durbinWatsonTest() on a non-time-series dataset: durbinWatsonTest(automobileRegression) And the following is the result I get: lag Autocorrelation D-W Statistic p-value 1 0.3437134 1.309245 0 Alternative hypothesis: rho != 0 Is that possible to get the p value=0? Any advice is appreciated....
According to linear regression formula, assuming the predictors are nonrandom, $${\rm var}[\hat{\beta}]=MSE *(X'X)^{-1}$$ where MSE is an unbiased estimator of the population variance. Intuitively, when the number of predictors (p + 1) is greater than the number of data, the regression model is overfitting the data, va...
I have time series data about 10 individuals. For each of them I have 120 repeated measures over time (a monthly measure for 10 years). I have a dependent variable (Y) and several predictors (X1, X2, ...). I made a two-level multilevel model, with repeated measures nested within individuals. So far I used multilevel mo...
I have a problem to train my classifier. I have 10 different kinds of music genres, each genre with 100 songs, after making an Mfccs I have a numpy array of (1293, 20) If all together with np.vstack I have an array of (1293000, 20) and another for the labels. When I run model.fit (features, labels), it takes a lot of ...
Background I have the following multilevel (mixed effects) growth model: $$y_{it} =\beta_{0} + \beta_{1}Time_{it} + \beta_{2}Time^2_{it} + \beta_{3}GHP_{i} + \beta_4Baseline_{i} + \beta_5(Time_{it}*GHP_{i}) + \beta_6(Time^2_{it}*GHP_{i}) + u_{0i} + u_{1i}Time_{it} + u_{2i}Time^2_{it} + e_{it} $$ where $y$ reflects dep...
We are performing an inter-comparison experiment for three devices that can measure concentration (cells/mL). We take one solution and run it through each device, and we compute mean concentration and variance on that device. I would like to find the average of the means and weight it according to sample size and varia...
In trying to interpret my output from a Confirmatory Factor Analysis, I find myself pondering the relationship between the standardized and unstandardized factor loadings. Is there a formula in terms of the unstandardized estimates and the various standard deviations or variances that will yield the standardized estima...
I used the bootstrap method to calculate the 95% CI of a rate ratio, but wonder how I could calculate a p-value to test the significance of the rate ratio by bootstrap? Any help would be much appreciated!
I am having a difficult time understanding how to prove the formulas for the variance of the parameters (beta0 and beta1) in SLR form. I have no idea how to start this problem...any help would be much appreciated! where T is the time, and is ranges from t = 1, 2, ..., T Edit: I have tried to leverage the matrix form o...
Displayed below are the contours and their respective covariance matrices according to Andrew Ng's notes (pdf). Why are the first and second contours elliptical and not circular? The variance along both axes is the same. Here's one last set of examples generated by varying $\Sigma$: The plots above used, respectiv...
In an econometric point of view when I have a variable such as unemployment rate which is a percentage, should I transform it with logarithm? This question came to my mind cause when we have variable in levels we use log so when I differenciate it I get a variation. In the case of unemployment if I take the logarithm a...
In elements of statistical learning, beginning of chapter 5.2 they state ‘we assume X is one dimensional’. I understand this as meaning X has one feature and N samples. However in chapter 5.2.2(extract below) they present an example where, to my understanding, X is no more one dimensional since there are X1, X2,... ...
Let's say I have some [multivariate] data and want to fit a GMM to it. So I have $P_x=\sum_{i=1}^{n}\alpha_i{N(x;\theta_i)}$, where $x$ is an observation from the data, $\theta_i$ is the mean and covariance matrix parameters for the ith Gaussian, and $\sum_{i=1}^{n}\alpha_i=1$, i.e. it is a contrast to ensure a valid ...
Let $Z \sim \mathcal N(\mu, \Sigma)$ be in $\mathbb R^d$. What are the mean and covariance matrix of $Z_+ = \max(0, Z)$ (with the max computed elementwise)? This comes up e.g. because, if we use the ReLU activation function inside a deep network, and assume via the CLT that the inputs to a given layer are approximately...
I am trying to use squared loss to do binary classification on a toy data set. I am using mtcars data set, use mile per gallon and weight to predict transmission type. The plot below shows the two types of transmission type data in different colors, and decision boundary generated by different loss function. The square...
Suppose I want to sample from a continuous distribution $p(x)$. If I have an expression of $p$ in the form $$p(x) = \sum_{i=1}^\infty a_i f_i(x)$$ where $a_i \geqslant 0, \sum_i a_i= 1$, and $f_i$ are distributions which can easily be sampled from, then I can easily generate samples from $p$ by: Sampling a label $i$ w...
I am working through a problem where it requires me to derive a least squares estimator for the model $Y_i = \beta_1X_i + \varepsilon_i$. I thought that the estimated $\beta_1$ would simply be the sample mean of Y over the sample mean of X(since the regression function passes through the origin and the mean of the two ...
From what I've read the KL-Divergence between $P||Q$ is the extra amount of "bits" you need to describe $P$ if you are encoding it with $Q$.(Analysis of Kullback-Leibler divergence). I want to know when does $Q$ gives me at least "some" information about $P$? My logic is as follows: We normally need $H(P)$ bits to de...
I am new in R. I have the following problem: I have a dataset which presents the minimum of a set of n random variables (x1, x2,..., xn). The formula is Min(x1, x2,...,xn) = 1-(1-F(x))^n. It can be assumed that the random variables xi's are IID. Now I want to fit a distribution on xi's. In other words I would like to...
I read elsewhere in this forum a comment (which I have since been unable to find again) about Exponential Smoothing models not having unit roots. I (sort of) know how to figure out the roots of an ARIMA model, but how do you calculate the roots of an exponential smoothing model (whether, simple, double, or triple)?