instruction
stringlengths
9
38.7k
Let's assume that a professor is manually altering specific grades for a few students. Is it possible to check with some statistical method that the grades are the originals or not? For example for this dataset. Given the fact that he/she is doing it for a small amount of students like 5% overall. grades dataset This i...
How can I compute precision, recall and F-measure when we define a cost matrix for evaluation? In my problem I have 3 different classes, and some errors are more dangerous than others. I would like my evaluation metrics to take into account this information.
I have a diagnostic test performed on 100 participants at baseline. I then follow up these participants for variable periods of time and have data regarding survival. I have used a Cox regression model to calculate a hazard ratio, and used the Mantel-cox log rank to test whether a positive test predicts death. I would...
I have between-subject design with 3 different groups where I capture interval data (on scale 1-4 where equal spacing amongst scores can be assumed). The data in groups is not normally distributed with distributions of different shape across all three groups. This means I can not use one way ANOVA to compare means or ...
Suppose i have the following two variables var1 var2 0 -869 5000 3593 10000 8055 15000 12517 20000 16979 25000 21441 30000 25903 35000 30365 40000 ...
I have the following probit model: $$ \pi_t=\gamma y_{t-1}+\alpha\cdot\pi_{t-1}+\textbf{$X'\beta$} $$ with $P(Y=1)=\Phi(\pi_t)$. Now I want to simulate the model to see how it behaves when certain assumptions aren't fulfilled, but I'm not really sure if I'm doing it correctly. To model autocorrelation I just added an...
This question is related to a new hobby project i want to start. I have some experience with ML techniques and neural networks, although only for regression problems as of now. In my classification problem i get an image of multiple game cards, like those of a trading card game. I want to identify which card is shown a...
I am trying to find a way to visualize the data related to road accidents. The data has following dimensions: Year Accident happened (Numeric) | Location of Accident (String) | Count of Accidents (Numeric) | Education Level of Driver (String) I tried using the Google Bubblechart but that expects 3 numeric dimension...
Canonical Time Warping is a state-of-the-art technique for time alignment. According to the original paper, it helps account for individual varieties when aligning sequences derived from different subjects performing similar event (e.g., aligning sensor data referred to two subjects' walking), by maximizing sequences c...
I'm having some difficulties understanding how duality leads to the common form of LASSO problem and with Karush-Kuhn-Tucker condition called complementary slackness. I have two questions: We know that, given an optimization problem $$ \begin{align*} &\min_x f(x)\\ &s.t. \quad h_i(x) \leq 0 \, ,\quad i=1,\dots, m \en...
I need to find similarity between two multiset. For example, $$A = \{a, a, b, c, d\}$$ $$B = \{a, b, b, d\}$$ I know that I can use Jaccard Index but it gives same weight for each element. As element a has occurred two times in A so I want to put extra weight on it. So, In this case, what's the best algorithm or formu...
I am asking a high level question on what is the model "type" for unlock a cell phone using fingerprint / face. It seems to me supervised learning cannot be used, because we do not have labeled data. Is it a "anomaly detection"? Where we model the normal patterns of a authenticated user and reject abnormal patterns?...
Let $\bf{X_{1}}\sim N_p(\mu_1,\Sigma_1)$ and $\bf{X_2\sim N_p(\mu_2,\Sigma_2)}$. Find the likelihood ratio test for $$H_0:\mu_1=\mu_2\ vs\ \mu_1\neq \mu_2$$ with know $\bf{\Sigma_1}$ and $\bf{\Sigma_2}$. I'm lost in how to do this in the multivariate case, most of the books I've seen found no examples just men...
In Why Most Published Reasearch Findings Are False the author claims that the positive predictive value (PPV) of a $2\times2$ table can be expressed as: $PPV= (1-\beta)\cdot R / ((1-\beta)\cdot R + \alpha) \,,$ where $\alpha$: significance level $1-\beta$: statistical power $R$: pre-study odds for a probed effect to r...
Is there any research/literature on the topic of optimization where the location of the optimum changes over time? Nonetheless I am interested in an optimal solution at any given time. It's hard for me to find anything, maybe because I don't know the specific terms. I am especially interested in bayesian-optimization/m...
I have a file "d" that has posting date column in normal date format and PP.sales column. "sos" means sum of sales and I understand na.rm removes NA values and its keeping all the rows for defined criteria. d <- d[, j = .("sos" = sum(PP.Sales, na.rm = T)), by = .(Profit.Center, month(Posting.Date), year(...
I have a collection of 12 binary time courses (see the picture attached). By binary, I mean that their value is either 1 or 0. In the image I attached, each time course is a different color, and it is considered a value of 1 when the line is present, and a value of 0 when not present. I am interested in finding pattern...
So, I have a linear mixed model (using the function lmer() in R) as follows: lmer(set_metabolites ~ scale(total_metabolite_B) + scale(BMI) + scale(Age) + (1|Family) Meaning, that I have a 1 metabolite (metabolite_B) that I want to test against a set of metabolites (n = 300) for 1000 individuals. In the model I control...
I'm trying to investigate whether there is correlation between a number of variables when I have different conditions, and I need some help of identifying what method I should use. Let me give an example, as it's easier to understand. X subjects (females and males) took part in a study. They performed a search task usi...
I'm a PhD student doing research into topic analysis of electronic communication. I'm currently looking at using LDA in python to input a body of text, remove stop words stem etc then generate a number of topic clusters based on the number of available non-stopped words. I'm curious as to how LDA handles duplicate word...
so I have this problem: Y1 and Y2 are uncorrelated discrete random variables Var[2Y1-Y2]= 17 Var[Y1+2Y2]= 5 What is Var[Y1-Y2] Hint: What is Var[aY2 + bY2] in terms of Var[Y1]and Var[Y2] when Y1 and Y2 are uncorrelated? I'm unsure of what to make of the hint, but could someone explain how to utilize the hint ot solve ...
I have a dataset that contains bivariate data (x, y). Upon visual inspection, I can see that when the data are above certain threshold value (x_crit, y_crit), there is strong correlation between x and y. Below this value the two variables are largely not correlated. I have a large number of such datasets so visual ins...
This question is in regards to the Secret X game on Price is Right. It's basically tic-tac-toe, but without the O's. Please see the link below for more details on how the game is played. http://priceisright.wikia.com/wiki/Secret_%27X%27 In all the times I've watched contestants play the Secret X game on the Price is ...
I'm trying to make a time series linear regression for forecasting purposes. I have picked eight features that logically are tied to the independent variable (separate time series data sets). I wrote some SAS code that loops through all of the combinations of the eight features creating a regression for each combinati...
Currently, I am interested in building a recommendation system. I want to build it as a learning to rank problem using either xgboost/lightgbm. I am reading two papers about the process: https://pdfs.semanticscholar.org/8f4f/d9ee2c55648a48ad571c02d821799904faa7.pdf http://delivery.acm.org/10.1145/3110000/3109897/p251...
I am aware of the "log-sum-exp" trick for calculating the logarithm of sums that handles overflow and underflow issues. However, I would like to know more about how it works. In particular, I am wondering: what is the most numerically precise way to evaluate the following expression using the "log-sum-exp" trick? The e...
I want to identify repeated behavioural patterns in a trader's account. The trader will typically transfer funds into his account denominated in a particular asset, buy and sell different assets, then (not necessarily) transfer out the asset, which can be a different asset than the one transferred into the account. I w...
I have some experience with machine learning, but no background in deep learning at all. The idea of a GAN looks so cool, and there are so many sources out there that talks about the idea, but there is no good source that I could find which can convey how to train GANs to a deep learning beginner. Here are my detailed ...
I was wondering how you would calculate the power of a one sided and two sided t test and whether it differed from the z test. I know for a z test it is $p(z < z_{alpha} - abs(u_{a} - u_0)/(s/sqrt(n)))$ for one sided and for two sided you replace the $z_{alpha}$ by $z_{alpha/2}$. For a t test would it be the same thing...
I'm working on some data which is a time-series of measurements with values around $1.5*10^8$ (small variations, around 1000) Basically, I compute a model for my data, with a polynomial of this form : $$\ a_0 + \sum_{i=0}^{n} a_i*x^{(2*i-1)} $$ But when I do the least-square estimation of the coefficients for differen...
I am studying neural nets and softmax is showing up a lot. I understood what softmax does: it quashes a set of real values to a probability distribution i.e. the new set can be interpreted as a probability distribution. My question is: While training neural nets is the temperature of softmax also a trainable parameter...
I am currently running tests between XGBoost/lightGBM for their ability to rank items. I am reproducing the benchmarks presented here: https://github.com/guolinke/boosting_tree_benchmarks. I have been able to successfully reproduce the benchmarks mentioned in their work. I want to make sure that I am correctly implemen...
For the perceptron algorithm, what will happen if I update weight vector for both correct and wrong prediction instead of just for wrong predictions? What will be the plot of number of wrong predictions look like w.r.t. number of passes? The algorithm of perceptron is the one proposed by Rosenblatt (1958) as below: My...
I made a histogram and QQ-plot, using this code: hist(ang$Pkt, , ylim=c(0,0.05), freq = F, breaks = 10) curve(dnorm(x, mean=mean(ang$Pkt), sd=sd(ang$Pkt)), add=TRUE, col="red", lty="dotted", xaxt="n") qqnorm(ang$Pkt) qqline(ang$Pkt, col ="red") I got those two images: According to what I f...
Let $X$ and $Y$ be two real random variables with cumulative distribution functions $F_X$ and $F_Y$, respectively. Define $d = \sup(F_X(x) - F_Y(x))$. If $\hat F_X$ and $\hat F_Y$ are empirical versions of $F_X$ and $F_Y$ respectively, then an estimator of $d$ is $\hat d = \sup(\hat F_X(x) - \hat F_Y(x))$ Does anyone k...
In high dimensional statistical inference I saw a term Ratio-consistent estimator which I am not familiar with it. anyone know the meaning of it? As an example you can see this article page 31. thanks.
I am trying to get an intuitive understanding of why there exists biased but consistent estimator. Suppose $X_i \sim \mathcal{N}(\mu, 1)$. One example I came across is this: $$W_n(X_1,\cdots,X_n) = \frac{1}{n} \sum_{i=1}^n X_i + \frac{1}{n}$$ I see that $W_n$ is biased due to the $\frac{1}{n}$ term, but is consistent....
Suppose there are $K$ studies (with IPD). For a certain time $t$, we have estimated survival rates $\hat{S}_1(t)$, $\ldots$, $\hat{S}_K(t)$. I want to pool those estimated survival rates in a meta-analysis (using a survival rate $\hat{S}(t)$ to represent $K$ survival rates)? Could someone give me some ideas?
I cannot understand it intuitively because quota sample means you just collect samples until each sample criterion is filled. Meanwhile, response rate means the proportion of people who refused to participate. So, what should I use as the denominator when calculating the response rate in quota sampling method? Please h...
want to use GLM to model the binary data. I have 3 different covariates, X1, X2 and X3. X1 is estimated with 14 basis functions and X2 and X3 are estimated with 10 basis functions. Hence I have 14+10+10=34 basis functions. When I run GLM I will get 35 coefficients (one extra is for the constant term). I want to be able...
I noticed that unfoundedness is a key cornerstone of the Rubin Causal Model. That is, if outcomes are $Y$, treatment is $T$, and covariates are $X$, then we have: $$ (Y(0),Y(1))\perp T|X $$ I am wondering why this is needed. Is it because for certain estimators, in order to prove they are unbiased, we need this assumpt...
In the Chapter 3 of Think Stats by Allen Downey book. The following is the excerpt from the book: First, I compute the distribution as observed by students, where the probability associated with each class size is “biased” by the number of students in the class. def BiasPmf(pmf, label): new_pmf = pmf.Copy(label=...
I've conducted an experiment on whether the presence of an insect that uses animal carcasses for food and reproduction impacts the soil in the immediate area and am now attempting to analyze the data. During my analysis, I've started to question the validity of my statistical approach/test, primarily because I am not a...
I am using model-based clustering to split a sample into 4 clusters, and would like to know if gender is a determining factor for the clustering of this sample. My attempt was to compute the in-cluster gender proportion for each cluster, and using the original sample (without clustering case) as a reference, then cond...
When one is checking whether two categorical variables are independent, it is customary to construct a contingency table and use the chi-square test. However, why can the chi-square distribution with k degrees of freedom (i.e. the sum of squares of k standard normal variables) stand proxy for contingency tables with k ...
For a VAR($p$) model based on $k$ series, according to the 5th edition of Time Series Analysis by Box and Jenkins (page 517) the AIC is computed as: $$AIC_p = \text{ln}(|\hat\Sigma_p|) +2pk^2/ N$$ where $|\hat\Sigma_p|$ is the determinant of the ML estimate of the residual covariance matrix. However according to New i...
I want to know the effects of weight matrices being singular when using neural networks. Is there any supported literature? For non-square weights matrices, I am concerned about lower rank matrices. Thanks.
I want to generate data from a zero-inflated Poisson distribution in R using the mpath package in the following way: n <- 50 p <- 20 r <- 0.5 # true parameter values beta <- numeric(p) beta[1] <- 1.8 beta[2] <- 0.5 beta[5] <- -0.3 gamma <- numeric(p) gamma[1] <- 0.4 gamma[2] <- -0.5 gamma[3] <- 0.9 S <- matri...
Does anyone tell me how to find the variance of sample median when random samples are normally distributed?? I know that I need to use the order statistics, but actually I don't understand how to apply it.
If a network is trained using ANN classifier, how can we know which feature was most important for predicting the target variable? I mean: How to create a "feature ranking" among the features (from high importance value to low)? I have seen some literature about decision trees/AdaBoost but I am typically interested in ...
Obviously the easiest way to get the AIC of a linear model is by using the lm function and then the AIC command. However, this simple method can be very time consuming, as actually with the lm function R computes a lot of stuff which isn't strictly needed to calculate the AIC of the model. When this is done for thousan...
If I draw a sample of size n without replacement from the set {1,2,3,...,N}- what is the expected value of the sample maximum? (n < N). Possible to get a closed form solution?
I would like to perform PCA on my data set (n=179). My result currently ends up with only one factor. I do not really know how to proceed further since I wanted to do Cluster analysis afterwards but I think with only one factor it is not possible.
I see lots of online p-value calculators for conversion rate, like this one: http://www.experimentationhub.com/p-value.html How can that work, without knowing the variance/SD? I believe it's because conversion rate (i.e. the percentage of visitors to a web site who bought something) is just the average of a dummy (Bool...
suppose g is a deterministic function, and X a rv. Then we define Y=g(X) and $f_Y(y) = f_X(g^{-1}(y))/|g'(g^{-1}(y))|$ But I don't understand at all why the $/|g'(g^{-1}(y))|$ is there. Seems like it would make perfect sense without it.
I recently came across a paper that runs pairs of regressions, in which one regression includes unit fixed effects and the other regression does not include unit fixed effects. The paper then compares the coefficient of interest of the fixed effects (FE) regression with the corresponding coefficient if the no fixed ...
When modeling data sampled in the field, I often come across the problem of determining the Family of the dependend variable for GLM (or GLMM). An example: in an ecological study, I have ~ 60 patches. I have sampled territories of an animal species within these patches as well as a set of explanatory variables. The num...
So I've been tinkering around with the backpropagation algorithm and to try to get a better understanding of how it works and my calculus is quite rusty. I've derived the gradient for linear regression using a MSE loss function, but have nowhere to check it against. So if $MSE=\frac{1}{2n}\sum_{i=1}^{n}\left ( \hat{y} ...
What can be said in general about the rate of convergence of EM algorithm? For example, if I let the parameters to be $\theta$, starting point to be $\theta^0$, and the optimal solution is $\theta^*$, so that $||\theta^t-\theta^*||<\alpha||\theta^0-\theta^*||$, what can be said about $\alpha$ in general? Also, how can...
I have a messy beta-exponential distribution that has 3 variables that I have to fit to from a dataset with 50 observations. The problem is that I only know how to use Newton-Raphson for 1 variable. My question is what optimization method can I use to fit this distribution, in conjunction with the method of maximum li...
I was reading an article the other day about how 90% of people think of themselves as "above average" in terms of intelligence. Assuming that by average they are referring to arithmetic mean, what would be the maximum possible percentage of a sample or population that could actually have some measure of intelligence, s...
There are many posts about post hoc testing but I did not find an answer to my question. my model: mod<-lmer(T ~ A*B + C + (1|D), REML=TRUE, data=dat) A,B,C are categorical with 2, 4 and 2 levels respectively. I want to check the effect of the variable A on T (I use the package lsmeans but any other suggestion is w...
I am finding it difficult to differentiate between exact colinearity and multi colinearity in multiple regression models. If we have a multiple regression model i:e: yi = b1+ b2*xi2+ b3*xi3 + ei where yi is dependent variable and x2 and x3 are independent variable. If there is a relationship between x2 and x3 like x2...
I'm new to machine learning and would appreciate some guidence. I'm doing product categorization, using a database of 25,000 products. each product consists of: name ,description, price, image, and few more numeric features. I'm not sure how to deal with a combination of text and numeric features. regarding the text pa...
I have a time series with about 200 to 250 observations (depending on the cross-section) and I do different rolling forecasts. The maximum forecast horizon is 20. I would like to evaluate the forecast for the whole horizon (not just x-steps ahead) at each point in time. Since the literature basically always only evalu...
Suppose $\vec x \sim N(\vec \mu, \Sigma)$ is multivariate normal. I want to see that $$\mathrm{Cov}(\vec x^TA\vec x,\vec x^TB\vec x) = 2 \mathrm{Tr}(A \Sigma B \Sigma) + 4 \vec \mu^TA \Sigma B \vec \mu$$ I have been searching the internet for a while, and found multiple sources confirming it, but no proof, for example ...
Let me set the context for the idealized question below: The search for extraterrestrial intelligence (SETI) has been listening for radio waves from extraterrestrial sources for half a century, with only negative results. Assume that our own radio broadcasts over the past half century have reached some distance throu...
To ask my question, consider the following example. I have data on the price of 100 stocks over time. I want to have good indicators on the price of my stocks without having to look into the data of each stock every day. The first thing I can do is average all the prices on the stocks at each time, but with this data s...
I am currently trying to solve an exercise (Information Theory, Inference, and Learning Algorithms, by David J.C. MacKay, ch 28 exercise 28.1) The exercise is as follows: Random variables $x$ come independently from a probability distribution $P(x)$. According to model $H_{0}$, $P(x)$ is a uniform distribution. \begin{...
In fitting GAMs to some data, my interest is in using inverse estimation to find the value of the predictor $X$ that corresponds to a given value of the response $Y$. I have written some R code to compute $X$ from $Y$ with corresponding large-sample confidence interval. My issue now is in using simulation of GAMs to f...
In order to train an LSTM/RNN in batches, the sequences in the batch need to be the same length. From my understanding, this can be done by either truncating longer sequences, padding shorter ones, or some combination of the two. It seems advantageous to batch sequences with similar original lengths, so that there is ...
I am estimating a state space model using Kalman and the EM algorithm in Matlab, using Kevin Murphy's toolbox (http://www.cs.ubc.ca/~murphyk/Software/Kalman/kalman.html). My question should in principle by straightforward: I have several zero restrictions in the observation and state equation, meaning that some of the ...
I am in the midst of a research programme on standardisation and ICT in the real estate sector, as part of which a web-based survey is underway and I am nearing completion of the data collection stage. The web-based survey has collected data on dependent and independent variables. Both the dependent (predicted) and i...
Most clustering functions can't handle categorical variables. One way to deal with this is to transform them to binary integer variables (i.e. x in {0, 1}). This is straight forward for categorical variables with two categories (transformation to one binary integer variable with x in {0, 1}). Should I turn categorical ...
My question is similar to this one: Approximate order statistics for normal random variables I am looking to find a formula for the variability of an arbitrary percentile of a normal distribution. The question cited does not quite solve it: - that is concerned with min and max only - I don't understand what n is...
I am designing a process, which etches some holes into a substrate. The goal of the process is to reduce the population standard deviation of the hole dimensions. I recently collected 1000 hole measurements, to estimate the population / sample standard deviation, and the error associated with the standard deviation. T...
Just started studying statistics and am getting confused. Is a null model the same thing as a null hypothesis? If not, what is it?
I have a population of N=100 and I am taking a simple random sample without replacement of n=10. I am trying to figure out the inclusion probability of 1 unit (we can call it unit one) of the 100 possible units for the sample. My idea is that after selecting unit one, the other 9 units are represented by 99 choose 9, m...
Suppose I am adjusting distribution $Q$ to make get a best fit for distribution $P$, should I minimize $KL(P||Q)$ or $KL(Q||P)$? What is the difference? Related question: Intuition on the Kullback-Leibler (KL) Divergence
I am distressed because I have the following problem without solution regarding Classic Normal Regression. Consider test about the CNR parameter $\beta$. We have: $y = X \beta + u $, $u \sim N (0, \sigma^2 I)$, $H$ a $p\times k$ matrix with rank $p$ and $$H_0: H\beta = r \quad vs\quad H_1: H\beta \neq r$$ It is known...
This question is about how to interpret LM test in VAR. For example, under VAR with lag 1, the LM test shows lags----LM-stat----Prob 1-------34.73------0.0043 2-------21.76------0.1508 Oh! auto-correlation in lag 1! So, I rerun VAR with 1 more lag. Then the result of LM test under VAR with 2 lags is lags---LM-stat--...
I am writing my thesis. I need help for statistical analysis part. I have spring and summer collected nitrate concentration data for 016 and 017 data. Samples are repeatedly collected from same experiment unit. I have treatment and sampling date as a fixed variables and year and block are random variables. I will be v...
Logit vs. probit is often a big debate. Many prefer logit simply because the coefficients can easily be converted into odds ratios, which are "more intuitive" to interpret than the z-score interpretation of probit regression analyses. Of course, many probit users bypass this issue by calculating predicted probabilitie...
For a random variable X, Jensen's inequality says, $$E[g(x)]\geq g(E[x])$$ for a convex function $g(x)$. Is there a generalization of this to two variables? That is, for two random variables, does $$ E[g(x,y)]\geq g(E[x],E[y]) $$ hold for a convex g? In my specific case, $g(x,y) = (x^2+y^2)^{\alpha/2}$ and $X \sim \mat...
I have a data set I have been asked to provide an alternate analysis for in which 34 mothers answered a psychological questionnaire. The authors have currently conducted an exploratory analysis regressing each of the tool's four sub scales against 9 predictor variables (e.g. infant gestational age at birth), and would ...
When modeling data sampled in the field, I often come across the problem of determining the Family of the dependent variable for GLM (or GLMM). An example: in an ecological study, I have ~ 60 patches. I have sampled territories of an animal species within these patches as well as a set of explanatory variables. The n...
While reading about Concept Learning, in Chapter 2 of the book Machine Learning by Tom M. Mitchell, I came across this term (syntactically distinct hypotheses). I tried looking it up on Google but I could not find any reasonable explanation for this term. It will be really helpful if anyone can explain because this ter...
The registrar has the list of all students in the university, in alphabetical order. Among 25,000 students in the university, the investigator proposes to choose a number at random from 1 to 100. Starting from that number, every 100th person is included in the sample. i) This is an example of systematic sampling ii) Si...
In finding the sample mean for grouped data, we use the following formula: $$\bar X = \frac{\sum {fx}}{n}$$ where: $\bar X$ is the sample $f$ is the frequency of a class $x$ is the class mark $n$ is the total frequency Why do we use the class mark for $x$ in grouped data, unlike in raw data where $x$ is the value of ...
What is $E[E[X|Y]|Y]$. Constant or random variable? We know that $E[X|Y]$ is a random variable that dou should get epends on Y. Then the last given Y in $E[E[X|Y]|Y]$ should tell you what that Y is, so $E[E[X|Y]|Y]$ is a constant right? It like saying $E[X|X]$ that should be a constant.
Consider a 3 class data, say, Iris data. Suppose we want do binary SVM classification for this multiclass data using Python's sklearn. So we have the following three binary classification problems: {class1, class2}, {class1, class3}, {class2, class3}. For each of the above problem, we can get classification accuracy, p...
Let $X_1,X_2$, and $X_3$ be independent random variables such that $X_1+X_2$ and $X_1+X_3$ have the same distribution. Does it follow that $X_2$ and $X_3$ have the same distribution? Can this be answered without referring to characteristic functions? Due to independence, the PGF of $U=X_1+X_2$ is given by $P_U(t)=P_{X...
I want to write down following group count operation. I am creating variable in dataset called countpd equal to count of observation points grouped by variables countid and day. i stands for observation point number. Is logic in the attached equation correct? $countpd_i=\sum_{i=1}^n \mathbb{1}_{B_j}$ where $B_j = \{ pi...
Can any one guide me on my model in this form: 1 or 0 = (X1 + X2 + X3 + X4 + X5 + K1 + K2 + K3 + K4) + (X1*K4 + X2*K4 + X3*K4 + X4*K4 + X5*K4) + (C1 + C2 + C3). X1 to X4 and K1 to K3 are independent and continuous variables, K4 is a dummy variable and a moderator variable, C1 to C3 are control and continuuos variab...
I've had an idea of a training scheme for multiple machine learning models, and want to know if it makes sense or it already has a name. The idea is to train models kinda like a swarm mind (I was watching this video when thought of that). The outline of an algorithm is as follows and seems pretty simple: for every batc...
I'm currently working on the exercises of the book 'Applied Predictive Modeling' by Kuhn and Johnson (using R and caret) and am stuck at the issue of 'Calibrating Probabilities'. Exercise 12.3 shows a problem linked to openly available data on churning: library(C50) data(churn) table(churnTrain$Class First of all I fi...
lm(mpg~hp+wt+am+cyl-1, mtcars) Call: lm(formula = mpg ~ hp + wt + am + cyl - 1, data = mtcars) Coefficients: hp wt am0 am1 cyl6 cyl8 -0.03211 -2.49683 33.70832 35.51754 -3.03134 -2.16368 lm(mpg~hp+wt+am+cyl, mtcars) Call: lm(formula = mpg ~ hp + wt + am + cyl, data = mtcars...
I am building an analytical tool that depends on being able to take a bunch of 1 dimensional numbers and group them into categories based on how close each number is to the mean of the group. However, instead of specifying the number of groups, I want to specify the maximum distance any individual member can be from th...
I have a dataset with only two variables. y is a numeric variable, while x is a categorical variable with two categories A and B. When I run lm(y ~ x) I get t-value for coefficient to be 2.372. However, when I run simple t.test as t.test(y~x,data=df,var.equal=T) I get t-value to be -2.372. Why is this? Any explanation ...
Let's say I have two column of words in natural language (let's assume for simplicity they are of equal length). E.g.: ["Security", "Luck", "Fullness", "Love", "Order"] ["Calmness", "Uniqueness", "Fullness", "Order", "Love"] We can say intuitively that "Calmness" is closer to "Security", than let's say "Luck" to "Uni...