instruction
stringlengths
9
38.7k
I am modelling a VECM with structural breaks. I am following Joyeux (2007) way of doing it with dummy variables, including the different trace and eigenvalue stats for cointegration with structural breaks. I also read Dr. Giles' blog about this. But how should I do it if both time series have different structural break...
Does anyone know how to handle non normality of residuals in VECM? I have tried transforming the data into log, exp, and Box-cox but nothing has changed. Any suggestion will do. Thank you.
The target feature in my data is numeric, continuous. I have several predictive features, some of them are categorical. Now in order to train a linear regression model, I've used dummy variables and created new binary features in the data. So each categorical feature created new binary features of 1 and 0. These are th...
I have to write a project about clustered linear regression. The only resource I have been able to find is https://doi.org/10.1016/S0950-7051(01)00154-X Any other articles/books that you can point me to please?
I am a PhD Candidate just beginning the data analysis phase of my dissertation. I have minimal experience with statistical modeling, so I have had to do a lot of self-teaching so please bear with me. I have 1.5 years worth of longitudinal data from individual tortoises, which I would like to fit in a Generalized Additi...
According to the slides (section 6), mean-field variational inference (aka. MFVI) assumes the latent variables ($z=\{z_1,..,z_m\}$ are independent from each other, and on top of this assumption, we can derive the update rule for each latent variable distribution $p(z_i)$ using Lagrange multiplier, and then iteratively ...
Below you can see a convolutional network with 24 convolutional layers. I am trying to understand the shape of the network. Given the input image with shape 448x448x3, we apply first conv filter of shape 7x7x64 with stride = 2 followed by a maxpool layer with 2x2 with stride 2. The output as I calculated it is as follo...
In linear regression, $y_i = x_i^T \beta + \epsilon_i$, $i=1,\dots,n$, and $Var(\epsilon_i)=\sigma^2$. It is well known that the residuals $e_i$ have variance $Var(e_i) = \sigma^2 (1-h_{ii})$, where $h_{ii}$ is the leverage of observation $i$, and that is not equal to $\sigma^2$. It is commonly believed that the levera...
Suppose I wish to know the variance within a sample or of the population from which it is drawn. However, I do not have true measurements for most of my "observations". Think of them as like wooden blocks or books on a shelf. It is easy to line them up from biggest to smallest, even though we have not taken accurate i...
If the standard deviation of x, sd(x), increases, the correlation cor(x,y) increases as well. Why? If the standard deviation increases 10%, the correlation increases 10% as well. Why?
> I have added my solution here $ U_x $ be the number of $ y's $ those are smaller than $ x's $ in independent random samples $ X_1, X_2 ,\ldots, X_n $ and $ Y_1, Y_2,\ldots,Y_m ;$ find $ E(U_x)$ . At first, I thought of calculating $ E( \min (X , Y )) $ which can be calculated using the cumulative probability funct...
I train a GLM via model<- glm(formula=y \sim x_1+x_2,family=Gamma (link=log),data=...) I now would like to get the probability density function of $f_{\theta(x_1,x_2)}(y)$ for pairs of feature $(x_1,x_2)$ and output $y$. Is there any way to get it?
I am doing a simple project on a mining dataset and came across some problems: Should I use the declustered values to model the variogram? Do I apply ordinary kriging to the original or to the declustered values? Also, it is worth saying that I applied the cell method for declustering and eventually, as the more dens...
sorry not the smartest question, tried to google this and search forum, but questions remain. So x1 correlates with y by r=0.8. If I now add x2 and x3 to the model, the whole model correlates with r=0.82 to y. So I only gain 0.02 of r by adding x2 and x3. So are x2 and x3 not important for the model?! What I would like...
I'm applying LogisticRegression on breastcancer dataset. Steps : - 1- A correlation matrix resulted in only four features having >0 correlation value w.r.t. the target. 2- I used these four features and got very low test and train accuracies (0.55-0.63) with LogisticRegression and some other models. 3- I took 4 more fe...
Two assumptions of linear regression are: Linearity: $E[Y_i|X_i] = \beta^{*t}X_i = E[\epsilon_i] = 0$ The variance is fixed and it isn't dependent on $i$. Or in other words, homoscedasticity. The simplest check is to plot the residuals ($e_i = Y_i - \hat{Y_i}$) as the Y-axis and the predicted values as the X-axis. ...
Hi! The above image is from "Latent Variable Models" by Loehlin and Beaujean (p.146). It's a four group-model, with male idential twins, female idential twins, male fraternal twins, and female fraternal twins. The latent variable Num1 refers to the numerical ability of "twin 1", and Num2 belongs to "twin 2." The same ...
Here is a question Consider an ARMA(1,1) model estimated using a sample of T observations. a) Write the equation of the model assuming zero mean b) Write the expression for a one- and two-step ahead forecasts from the model As i understand the one step ahead forecast looks like this y(T+1)=py(T)+θuT+uT+1 but how do we ...
In this paper, The Mediating Role of Perceived Value: Team Identification and Purchase Intention of Team-Licensed Apparel, three different Models (A,B and C respectively) are analyzed based on a survey with 9 questions about team identification (3 ordered categorical variables), perceived value (3 ordered categorical v...
I'm working at some research for claim reserve and I use the glmreserve (Over-dispersed Poisson) function in R. It generate p-value and I don't know what's that mean. Can someone help me what is this p-value mean ? is it for the model?
Say I have a matrix probs $\in N\times4$ where each row is a categorical distribution. However I have also a mask $\in N\times4$ that is meant to remove actions that are not available. What I used to do is to than apply the following: $$ softmax(probs \cdot mask) $$ and to do this, I would have in the mask either $1$ o...
If I understood correctly, PR Curve it's just the mean of F1 score computed multiple times with different thresholds. In the task of outlier detection those are two suggested metrics given the fact that the datasets are highly inbalanced. My question is, if I know in advance the contamination factor (the percetange of ...
I have an A/B test to improve number of orders. The result came back showing a positive impact on the number of orders per visitors (aka, Conversion Rate) but not significant on the average revenue per order. Using these information, can I calculate the confidence interval of revenue per visitor? Example data: confiden...
These are the linear regression assumptions: Linearity: The relationship between X and the mean of Y is linear. Homoscedasticity: The variance of residual is the same for any value of X. Independence: Observations are independent of each other. Normality: For any fixed value of X, Y is normally distributed. Do they a...
I know there are already several posts about the relationship between covariance and independence in this forum but I couldn’t find the answer to the issue bugging me on those posts. Let me firstly say I know that: (1) independence between RVs means covariance = 0, but covariance = 0 does not necessarily mean independe...
Let $$\mathrm{Cov}(X,Y,Z) = \mathrm E[(X-\mathrm E(X))(Y-\mathrm E(Y))(Z-\mathrm E(Z))]$$ This can be regarded as a generalization of covariance to three random variables. I am writing a text where I need to use this quantity, but I have not encountered it in the literature, so I'm not sure if there is a standard name ...
For example, the value of education is greater (in terms of relative wages) in country A than in country B. The independent variable is years of education and the dependent variable is the relative wage.
I conducted an experiment where I counted the number of infected leaves per plant. There were four replicate plants per treatment (total two treatments). So my response variable is positive count data, ranging from 0-392. I'm going to use generalized linear mixed models to see the effect of weather variables and mulchi...
Wondering 1) which of the two ways of calculating confidence intervals is correct, and 2) if they both are correct, are they the same or different? How do they reconcile? CI = [Coef x1 ± 2*SE(coef x1)] CI = [Sample mean ± Margin of error] Number 1's source is page 76 in ISLR 2nd Edition: Number 2's source is page ...
My goal is to understand which variables out of 10 actually explain my dependent variable for a voter/election research. Now I have put all 10 variables into a multiple regression and have filtered out all that have p value over 0.1. Now I have a model with 3 variables, all p values at 0.014 or far below and r=0.8. It ...
I am curious on how to find the probability a random variable X is greater than Y (given their means and variance, and also that they are independent.) I stumbled across this post: probability of one random variable being greater than another but am unsure how to answer this question with not necessarily normal distrib...
Recently, I have been reading about how Confidence Intervals in the Frequentist setting are often misinterpreted (e.g. The importance of a correct interpretation of a confidence interval). Supposedly, many people incorrectly use the following understanding to incorrectly draw conclusions from Frequentist Confidence Int...
I have two questions about fiducial inference. does fiducial inference compute a confidence interval or a point estimate? What is a fiducial distribution and where are we going to use it because in my research three is just about fiducial interval. Thank you!
For my statistical analysis, I have two methods and a specific bone to be measured by both methods. Multiple variables should be measured for both bones like height, depth, width, angles, etc. So I want to know which test is the best for comparing the mean difference between these two samples.
Suppose I want to generate a random Brownian motion $B$ on $[0,1]$ such that: $B_0=x_0$ $B_1=x_1$ $\max B_t = M$ $\min B_t = m$ The first two conditions a not difficult to impose. However I have trouble incorporating the 3th and 4th conditions, especially the fact that $M$ and $m$ have to actually be attained (rather...
Can anyone help? I want to predict a price variable using five dummy variables. Data conditions: contains an up-trend component not stationary I'm confused about whether to split the data or not. It's hard to find a definite answer, I've done a lot of research but couldn't find a suitable answer/syntax for my problem...
I have these equation for updating the weight the same. $$w^{(b+1)}_{i} = \frac{w_i^{(b)} \exp(-\alpha_by_ih_b(x_i))}{\sum_{j=1}^{n}w_j^{(b)} \exp(-\alpha_by_jh_b(x_j))}$$ and $$w^{(b+1)}_{i}=\frac{\exp(-y_if_b(x_i))}{\sum_{j=1}^{n} \exp(-y_jf_b(x_i))} $$ Where, $$f_b = \sum_{p\le b}\alpha_bh_b$$ I want to use inductio...
I used the "Matchit" package in R to perform propensity score matching on my data set and want to calculate the average treatment effect afterward. I use a caliper of 0.2 Std. deviations and the full method to avoid a 1:1 matching ratio (Purpose: Increase validity). I used the following code: x <- matchit(Treatment ~ x...
For voter research, I want to understand how people form a certain opinion on a hot topic, measured on a five step opinion scale Y. Prior theory suggests 10 independent variables, (refering to them as x) might explain Y. Number of observations is 250. My goal is to understand which of these 10 independent variables hav...
Is $\mathbf K_z(\mathbf z,\mathbf z^{\prime})=\sigma(\mathbf z^T\mathbf w+b)\sigma(\mathbf (z^{\prime})^T\mathbf w+b)$ with nonlinear function $\sigma$, generally a valid covariance function (kernel) for a Gaussian process? In Yarin gal's paper "Dropout as a Bayesian Approximation: Appendix", section 3.1 (p.5), the au...
I am having some doubts about understanding nested cross-validation. I'm conducting research with a small dataset and would like to get the nested cross-validation design correctly. My dataset is $50\times 212$, where the response variable is the age of the subject (rows: subjects, columns: features). I have 4 age grou...
I have a question about SVM training in overlapping class distributions, where we are trying to minimize $$ \dfrac{1}{2} \Vert \mathbf w \Vert_2^2 + C \sum_{n = 1}^N \xi_n \, , $$ subject to $y_n(\mathbf w \cdot \boldsymbol \phi(\mathbf x_n) + b) \geq 1 - \xi_n$, where $N$ is the number of training samples, $\xi_n \geq...
Assume a simple Linear Regression problem, where we have $n$ data points $x$, and one target variable $y$. My confusion, or more precisely misconceptions start at the following equation and its definition, read in an ML book Let $\bar{y}(x)$ the expected value of the target variable conditioned on $x$: $\bar{y}(x) = E_...
I am trying to implement Cox proportional hazard model in Python. Although, I know how to calculate the derivates of the Log likelihood, in the case of ties the likelihood function is modified. So I have two queries$$ l'(B) = \sum_j \delta_j * [s_j - d_j * \frac{\sum_{k\in R(Tj)} x_k e^{x_k*B}}{\sum_{k\in R(Tj)} e^{x_k...
suppose I've got data $X$ from a model driven by parameter $\theta$. Model of data is represented by conditional density (likelihood function) $$f(x|\theta).$$ Suppose the prior density of $\theta$ is denoted by $$f(\theta).$$ My question is, is it consistent with bayesian theory to choose ANY probability density as a ...
This is a follow-up to my previous question: "Basic understanding of control variables in observational studies" I have understood the answer, but am still trying to figure out what I think of the Wikipedia example that I'd cited. Basically, the example is the effect of age on happiness, and discusses whether you shoul...
I have a disease rate calculated for people aged <50 (early-onset) and aged 50+ (late-onset), for every US county. The rate ratio is the early-onset rate divided by the late-onset rate for every county. Then I calculated the correlation coefficients (CC) between the rate ratio and 40 county-level risk factors (e.g., ob...
What is the difference between i) random variables, ii) distributions of random variables, and iii) random samples? While trying to figure out how to average random samples from various random variables I learned that the operations summation for random variables and distributions of random variables are different. I w...
I have been using the rms package in R to perform Cox regression on time-to-event data. I have used the plot(Predict()) function to create plots of regression lines in the log relative hazard and relative hazard scale against continuous covariates. An example plot (not my own) in the log relative hazard scale is shown...
I'm trying to understand Linear Regression. In wikipedia, I was confronted with the following assumption: Weak exogeneity: This essentially means that the predictor variables x can be treated as fixed values, rather than random variables. This means, for example, that the predictor variables are assumed to be error-fr...
I'm trying to prove the identity in the title. I have tried all the results I'm aware of but I can't find the way out. I know that $$P(A) = P(A\cap B)+ P(A\cap B^c),$$ and that $$P(A\cup B) = P(A)+P(B)-P(A\cap B),$$ but I don't see how to combine these (or other properties I am missing) to get the desired result... Any...
People don’t naturally think in probabilistic ways, they often form priors through point estimates because it’s less cognitively taxing to reduce everything down to single numbers. So if the fundamental premise of Bayesian Inference is a method formulated mathematically of updating our prior hypothesis from evidence pr...
I'm writing a paper on how the European stock market liquidity has been affected by the pandemic. I'm using daily stock data for 5 countries which doesn't include any weekend data. This financial data includes a dependent liquidity measure and independent variables like returns,market cap,... . I end up with 100 stocks...
I made a Linear Regression model that predicts better than my Lasso Regression & Random Forest The linear regression model does not follow the assumptions (linearity) Can I still use it for predictions?
Usually, people tend to confuse the interpretation of confidence intervals. The following two statements are said to be quite confusing (even to myself): A 95% Confidence Interval means that the population parameter will be contained within this interval with a probability of 0.95 (incorrect) A 95% Confidence Interval...
I'm on page 69 of ISLR 2nd Edition. I've created a linear regression modeled after the toy dataset in the book, where we predict number of unit sales given a particular TV advertising budget. Here are the linear regression results and its respective RSE and MSE: I have 2 questions: Do we use the RSE or the MSE to det...
The problem comes from Exercise 6.1 of "Pattern Recognition and Machine Learning" by Christopher M. Bishop: Consider the dual formulation of the least squares linear regression problem given in Section 6.1. Show that the solution for the components $a_n$ of the vector $\bf a$ can be expressed as a linear combination o...
I have this piecewise pdf function: with the CDF: When I graph the CDF above, I get this graph which looks weird for a CDF and I dunno how to explain what is happening. It looks more like an inverse CDF graph. I am new to this stuff but I need to get it right for my research work. EDIT: I am new to PDFs and CDFs so ...
I'm reading the paper "The Generalized Lasso Problem and Uniqueness" by Ali and Tibshirani (2019). They mention this: I didn't get the idea of that. As I understand the lasso, the solution depends on $\lambda$, and with every $\lambda$ we get a different set of solutions, so different $\hat\beta$, and as a result $X ...
I am reading Understanding Diffusion Models: A Unified Perspective, but I am confused about equation 45. Concretely, the consistency term: $$ \sum_{t=1}^{T-1} \mathbb{E}_{q(x_{t-1},x_t,x_{t+1}|x_0)}\left[\log \frac{p_\theta(x_t|x_{t+1})}{q(x_t|x_{t-1})}\right] = -\sum_{t=1}^{T-1} \mathbb{E}_{q(x_{t-1},x_{t+1}|x_0)}\lef...
If a treatment has constant success probability of $p$ per trial, the probability of success on trial $k$ is given by the First Success Distribution. $$P(K\!=\!k\,|\,p) = p(1-p)^{k-1} \qquad k = 1, 2, 3, ...$$ Let $q = 1-p$, $$P(K\!=\! k\,|\,p) = pq^{k-1}$$ $$P(K \le k \,|\, p) = 1 - q^k$$ $$P(K > k \,|\,p) = q^k$$ Le...
How can I improve my quantile estimation method for estimating values between the 5% and 95% confidence intervals for a multimodal distribution (as a mixture of gaussians) ? Where the CI are only for the rightmost and leftmost part of the multimodal distribution. Further, the number of gaussians in the mixture is not k...
I have a very small dataset and worked with the auto.arima()function to forecast data. I went as follows: removed outliers ###remove outlier 2004, 2009 Dr_ts_1 <- ts(Dr_ts[-c(10,16)], start = 1994, end = 2019) plot.ts(Dr_ts_1) checked for stationarity & to reach it I had to use second-order differentiation. ### c...
I was reading a paper and couldn't understand the following transition. Could someone tell me where the term of $p^k (\frac{1}{2} − c′)$ comes from in the following transition? Def: Cumulative function of interest $$ F(x) = \begin{cases} 0 & \text{for } x < -c' \\ p^k & \text{for } x \in [-c', 0) \\ (p + (1...
In straight line fitting, the model is: $$y_{i} = \alpha + \beta x_{i} + \epsilon_{i}$$ Here, for each $i$, $y_{i}$ and $\epsilon_{i}$ are considered to be random variables, where as $x_{i}$ is understood to be "fixed". What I don't understand is in regards to which universe, or experiment, these are considered to be r...
I'm doing ANCOVA analysis. So, the assumption of Levene's test is violated which means I have to run a non-parametric test. Does that mean I can't interpret other results that I obtained from the data (e.g can I still reject or accept the null hypothesis if the Levene's test is violated?)
Consider any random variable $X$ and any random sample $(X_1,\dots, X_n)$ such that $X_i \sim X$. As is well-known, $E(X)$ is the constant that minimizes the MSE of $X$, i.e., $E(X) = \arg\min_a E[(a-X)^2]$. It seems that the minimizer does not change if we consider minimization over statistics from the random sample $...
I have some basic statistics foundations (Lean Six Sigma, Industrial Engineering in College), but I'm completely new to survival analysis, and relatively new to Data Science. So I'm looking to sanity-check my reasoning and whether my interpretation of the results is good. Some context: I've got a large survival dataset...
I am trying to model a behavior using the Theory of Planned Behavior (TPB) as my main framework. I have an active survey; currently with 110 answers. I'm using R with lavaan to run the following model. sem_factors_4 <- ' Att_x =~ ATT_good + ATT_important + self_1 + self_2 + ATT_useful PBC_x =~ PBC...
Suppose I have observed count data $x_1,...,x_k$. I have a hypothesis that this data was drawn from a multinomial distribution (derived from theory) with event probabilities $p_1,...,p_k$. It is simple to construct a test to reject the null hypothesis that my observed data comes from this predicted distribution: I simp...
I am trying to look at the feature importance in my model. The most important feature according to the gini importance in my xgboost is %97 zero in my dataset. Meaning that 97% of all values in the column are 0, and it is the most important feature according to the model. Also, when I plot the SHAP values, that feature...
I have a simple Cox proportional hazards model, with a small made-up data set. There are three groups, and the data is generated so that the time-to-event is larger in the third group than the other two. Please note that this code is copied from another poster's example (see the following link: KM versus Cox model): ti...
Since the F test deals with testing multiple categories/features/independent variables, do we always use a F test in determining if the independent variables are significant in multiple linear regression? Or not always? It would make sense since T/Z test only tests 1 variable's significance at a time, so would not be a...
Suppose $X\sim \text{Gamma}(\alpha, \beta). $ Determine the distribution of $Y = 1/X.$ This is what I reached as a solution: the distribution of $Y = 1/X$ is a gamma distribution with shape parameter $\alpha+1$ and scale parameter $1/(\beta\cdot y).$
It's my first time learning Monte carlo simulation, I have been given a task to predict the average Y variable (dependent variable) using a given dataset and to estimate the values of the parameter coefficients and standard errors of the coefficients of the linear regression model. Now, I've done the linear model and e...
In the forward diffusion process described by Ho, et al. the probability distribution for the next step is: $$q(\mathbf{x}_t|\mathbf{x}_{t-1}) = N(\mathbf{x}_t;\sqrt{1-\beta_t}\mathbf{x}_{t-1},\beta_t\mathbf{I})$$ What is the purpose of scaling the mean of the distribution by $\sqrt{1 - \beta_t}$? I think this has some...
I will do research using NN with 1 hidden layer. To calculate loss using binary cross entropy and for the activation function using sigmoid. I found the derivative formula from Sadowski, 2016 (link: https://www.ics.uci.edu/~pjsadows/notes.pdf) as follows: A weight Wji connecting hidden layer unit j to output unit i...
I am conducting a multiple meta-regression of proportions and was hoping that I could get some help. Outcome variable is complications rates (logit transformed) and moderators are publication year and material type. When I do the following: metareg.yearmaterial = rma(yi, vi, data=ies.logit, mods=year + material, ...
I'm newbie in NN and I get confused about frequency t in adam optimizer. if I have NN with architecture like this: Can't it be said that Xk (k=1,2,..., n), where n is the number of input data? in the example above n=4. In adam optimization we calculate the gradient t with the following formula: is it right if we can ...
I am using R to make a table describing my dataset. My goal is to estimate the adjusted mean of a continuous variable across different groups (e.g. age groups, BMI categories) and calculate a p-value for the trend (across ordered groups) or heterogeneity (in unordered groups). I am using this code for the means and het...
I have a problem, where I try to identify if a machine performs an activity when it is not supposed to, or performs it an unusual number of times. I am attempting to this using an anomaly detection technique. For several days (100) I recorded the time (in seconds) and the number of times that an activity was performed ...
I am struggling to render the output of a SARIMA model into an intelligible linear expression that I can use to make projections manually. I encountered this answer on CrossValidated, but I am not well-versed in psi/pie weights, and am hoping to avoid the need to calculate them. This sample code makes me think that I c...
I'm doing research where I am getting the delayed effects of my Xs on my Y using a 2-way fixed effects approach. Since all of my Xs will end up being delayed, should I lag my Y by -1 or should I lag all of my Xs by +1? Or does it not matter? Since I'm getting different coefficients from doing both approaches, I am also...
My question is from the book "An introduction to statistical learning" (2nd edition), chapter 13, exercise 2. Suppose that we test m hypotheses, and control the Type I error for each hypothesis at level α. Assume that all m p-values are independent, and that all null hypotheses are true. What is the distribution and st...
I have two (classically) estimated coefficients from 2 different models, $\alpha_{m1}$ and $\alpha_{m2}$, say, with 95% confidence intervals. I maintain that model m2 is mis-specified and that the parameters are statistically distinct. However a referee argues that since the central value of $\alpha_{m2}$ falls withi...
I have a dataset like below and want to calculate Pearson Correlation Coefficient as described in https://peerj.com/articles/cs-1108/#table-4 . If I understand correctly, x can be numerical(temperature) or binary and y is a timeseries measured at different time intervals. Could you please someone explain me how to ca...
I have 10 independent variables (IV) that may predict my dependent variable. There's a lot of multicollinearity in my data (r between IVs is r=0.4 on average but not higher than r=0.8). I suspect that's because of layered effects: Like IV2 and IV3 directly influence the dependent variable, but IV2 itself is influenced ...
I've come across a "sort of" simple probability problem but I don't know where to start to model it mathematically. The process is the following: Flip a coin. If I get tails I roll a die, write down its value and go back to step 1; otherwise the process goes to step 3. Add up all the values obtained from rolling the d...
If I know that the posterior $p(\theta_1,\dots,\theta_m|y)$ can be written $p(\theta_1|\theta_2,\dots,\theta_m,y)p(\theta_2|\theta_3,\dots,\theta_m|y)\dots p(\theta_m|y)$ where $p(\cdot|y)$ in each factor is known, then I simulate posterior by drawing posterior $\theta_m$ first, $\theta_{m-1}$,... and last $\theta_1$....
An answer here stated the following: Here is another place where typical regression teaching sources are slippery. In some cases, they refer to the estimates $\hat \beta_0$ and $\hat \beta_1$ as functions of the (fixed) data that has been collected, and sometimes they refer to them as functions of the (random) potenti...
I am using scikit-learn r2_score function and I would like to understand what the option 'variance_weighted' calculates. In the documentation page it tells: Scores of all outputs are averaged, weighted by the variances of each individual output. Does it mean that the output is a weighted average whose weights are the v...
I have trained a classifier and evaluated my classifier's performance on the testing set by Area Under the Precision-recall curve. My testing set comes from 2000 different categories, and my classifier doesn't consider the input category in the classification. I want to check the performance of my classifier for each c...
I am trying to perform a cluster analysis on a dataset. The plot of clusters vs. gap statistic is below. I do not know how to interpret the decrease of the gap statistic and its values which are negative. Therefore, I have no idea about how many clusters can I choose then based on this figure for an optimal clustering?...
I know the question is a bit general but I am a bit stuck. I am using a glm model with the binomial family to predict if a specific occurrence is going to happen or not. The problem is I have more than 150 potential predictors and millions of observations. I am struggling to improve the model. I an=m using the p value ...
I am looking at monthly death data and am trying to understand if there's a sound way to determine if the patterns in the current month are different from the same month in previous years. For example, is the proportion of male deaths different in December 2022 than it was for December 2017-2021? What would be the best...
I'm starting to work through Bishop's "Pattern Recognition and Machine Learning" book, and have run into unfamiliar statistics notation. In Eq. 160, Bishop writes the PDF for a quantity $t$ as $$p(t|x, \mathbf{w}, \beta) = {\cal N}(t|y(x, \mathbf{w}), \beta^{-1}) \tag{1.60}$$ where $y(x, \mathbf{w})$ is some known func...
let's consider the lasso problem as: $$ \frac{1}{2}\|y-X\beta\|_2^2 + \lambda\|\beta\|_1 $$ and referring to The lasso by Patrick Breheny he says the correlation between a predictor and residuals, must exceed a certain minimum threshold λ before it is included in the model. what if we chose λ equals 2 or any value ...
I am doing ridge regression and am wondering why it uses squared L2 norm. This post Why l2 norm squared but l1 norm not squared? gave some thought about why using it. But a further question arises: when will using L2 and squared L2 norm be equivalent? In my case, I am dealing with a completely orthonormal case. It is a...
How do i read age:gender1? Gender1 is male. Call: glm(formula = cardio ~ gender + age + gender * age, family = binomial, data = CVtrain) Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -1.060e+01 3.328e-01 -31.843 < 2e-16 *** age 5.164e-02 2.108e-03 24.492 < 2e-1...
I am on page 87 of ISLR 2nd edition. What are the indications that one should be using interaction variables in their linear regression model? Basically: When do you know "ah, I should be using interaction variables"? Are there any general rules or hard-and-fast rules that I should be looking out for? Eg. If 2 variabl...