instruction stringlengths 9 38.7k |
|---|
I had a discussion with my colleague about Kfold and StratifiedKfold validation in scikit learn.
My understanding of these two ways of validation is that at the beginning of the validation process, the data set is randomly divided in k-folds. k-1 of those folds end up in the train dataset. 1 of those folds ends up in t... |
I have many users, each of whom may or may not have had the opportunity to perform each of various actions and may or may not have performed it. That is, for each action, some users had the opportunity to perform it and some did not; among those who had that opportunity, some did so and some opted not to.
Moreover, tho... |
Do you remove the seasonal component, the trend component, or both, when adjusting a time series to avoid finding spurious correlations?
I have two time series x and y with trends and yearly seasonality and I would like to test for correlation. I read this article about spurious correlation in time series https://svds.... |
I have some idea that I would like to test and I think the ML would be great solution. But I'm a little bit lost how it could be implemented.
The input is just a text, could be anything (but providing some information), for example "Cat has fur".
The output is an object. If it's presented in Json, could be for exampl... |
I'm working on a project to forecast sales / # of products for each city for 12 months into the future. The issue is that historical data looks wildly different for each city; however, sales data and product data independently follows observable trends.
Would it be better off to forecast the ratio itself or instead fo... |
Having studied ordinary fully connected ANNs, I am starting to study convnets. I am struggling to understand how hidden layers connect. I do understand how the input matrix forward feeds a smaller field of values to the feature maps in the first hidden layer, by moving the local receptive field along one each time and ... |
I recently performed a meta-analysis where I was basically looking to find the proportion of people with disease X in people with disease Y. I did not find a significant value, it was solely the proportion (also significant heterogeneity was found). I am wondering, how would I discuss these results in the discussion se... |
I have plotted some experimental data of mine, and these data points fall into the following distributions:
So, these are fairly non-trivial looking distributions. I would like to figure out methods to quantify how these distributions differ. Perhaps a Kullback-Leibler divergence?
What other methods could I use to d... |
I know that VAR should be employed only with stationary series. Is the same condition required for analysing impulse response? That is, should the impulse response be analysed on stationary variables only?
Because normally a VAR is estimated using stationary variables and after that impulse response can be analysed. B... |
I'm using several clustering algorithms from sklearn to cluster some data, and can't seem to figure out what's happening with DBSCAN. My data is a document-term matrix from TfidfVectorizer, with a few hundred preprocessed documents.
Code:
tfv = TfidfVectorizer(stop_words=STOP_WORDS, tokenizer=StemTokenizer())
data = t... |
In my event study I use an OLS time-series regression. $y_t$ is the dependent variable on day $t$. $x_t$ is the explanatory variable on day $t$. This regression uses observations during the so-called estimation period which precedes the event window:
(1) $y_t=\alpha + \beta x_t + u_t$
(or in matrix notation $y=Xb+u$)
... |
According to this very interesting article in Quanta Magazine: "A Long-Sought Proof, Found and Almost Lost", -- it has been proved that given a vector $\mathbf{x}=(x_1,\dots,x_n)$ having a multivariate Gaussian distribution, and given intervals $I_1,\dots,I_n $ centered around the means of the corresponding components ... |
I'm pretty new to machine learning and I have a question regarding weighting features.
I was able to get code running with scikit-learn and random forest. Now I would like to weight certain features higher to give them more importance. The data ranges anywhere from T/F to dollar amounts. Can someone point me in a good ... |
I've come across an error metric used to quantify a model's reconstruction error:
$$
\varepsilon = \frac{\sum_i{\left(y_i-m_i\right)^2}}{\sum_i{\left(y_i-\bar{y}\right)^2}}
$$
where $y_i$ is the $i$th data point, $m_i$ is the model's estimate of the $i$th data point, and $\bar{y}$ is the mean of all data points. The n... |
How does one combine imputation of a value with an observation of that value?
A consequent question:
When the values that would be imputed (if they were missing) differ greatly from the observed values, is there a procedure for quantitatively/probabilistically assigning error/blame to the data sources?
To further elabo... |
In my project I want to create a logistic regression model for predicting binary classification (1 or 0).
I have 15 variables, 2 of which are categorical, while the rest are a mixture of continuous and discrete variables.
In order to fit a logistic regression model I have been advised to check for linear separability ... |
Has anyone heard of a Wilks' trinomial significance test before?
I'm trying to decipher an old approach with little documentation that was used in a product preference study (i.e., prefer product A, prefer product B, No preference) that employed a PBIB (partially balanced incomplete block) design.
The main thing I'm h... |
I want to come up with a time series model that will enable me to forecast the number of life insurance claims. I have collected the data (number of claims) from January 2013 to December 2016.
My question is what model can best suit my data and how best can I set up the model.
The plot is as below
|
first post here!
I have a project to estimate commercial real estate properties given categorical and continuous variables. I have ran a step-wise linear regression model to pick out a good formula in RStudio. (Adj. Rsq = .90 also, I know I need to do PCA and some type of categorical ANOVA test still, but I just want ... |
$$ w = (X^T X + \lambda I_n)^{-1} X^T y \rightarrow \sum^m_{i=1} \alpha_i x_i \\
\alpha = (\alpha_1, ..., \alpha_m)^T \rightarrow (XX^T + \lambda I_m)^{-1} y $$
From what I understand, the above demonstrates the conversion from primal to dual form. However, I am at a loss as to the definition and meaning of each of t... |
I did an experiment and obtained the following values which I want to correlate to see if there is a connection between sampling method A and method B.
A,BPair 1: 4000,3500Pair 2: 1500,40000Pair 3: 5000,4500Pair 4: 2500,7000Pair 5: 1000,1000Pair 6: 12000,17000Pair 7: 2000,2000Pair 8: 4000,40000Pair 9: 13000,25000Pair 1... |
How to use $\chi^2$ test to test if my data follow a $\chi^2$ distribution with a fixed degrees of freedom? or is there any way to do it with Matlab?
|
I am looking to collect data for a multilevel CFA (two levels). I am unclear how to determine the number of clusters needed for identification. I know that the number of parameters is k(k+1)/2 multiplied by 2 (within and between portion of the model) plus k for the indicator means. With k = 35 (number of indicators), t... |
I'm trying to make predictions based on customer service samples using randomForest and GBM, I'm leveraging on 2 stage modeling, i.e. 1st stage to predict whether customer will react or not, 2nd stage will predict how much they will spend.
My 2nd stage model is training on those who spend>0
following is the prediction... |
I know that if If $X$ follows a $\chi^{2}_{k}$, then $cX$ $(c>0)$ follows a $\Gamma(k/2,2c)$, what about when $c<0$?
|
This is a qualitative question. In the literature of particle filters/ sequential monte carlo, particle degeneracy is unavoidable. However, frequented cases where it may happen is when the likelihood is very peaked. The result of this
$$\tilde{w}^i_t=\frac{p(y_t|x_t)p(x_t|x^i_{t-1})}{q(x_t|x^i_{1:t-1},y_t)}w^{i}_{t-1}... |
I have found a number of posts about how worried one should be when they get convergence warnings from lme4 (such as: How scared should we be about convergence warnings in lme4). However, I have not been able to find equivalent postings about convergence warnings when using multiple imputation datasets, specifically if... |
My data takes the following form:
Outcome variable = no of suicides (count data)
Explanatory variables = Age (grouped into young, middle and old), Gender, Country, Year
I am running a Poisson regression.
I have been told that I need to take the population size of each country into account, in order to be able to compar... |
in the textbook "Introductory to Econometrics" Wooldridge writes
$\hat{\beta}_1=\hat{p}_{xy}\cdot(\frac{\hat{\sigma}_x}{\hat{\sigma}_y})$
where $\hat{\beta}_1$ is the OLS-Estimator, $\hat{p}_{xy}$ is the correlation between $x$ and $y$, and $\hat{\sigma}_x$ is the standard deviation of $x$.
When I derive this formula ... |
I have found a few decent ones about specific resampling applications such as bootstrapped confidence intervals, but nothing broader. A journal article or book chapter would be preferable to an entire book, but all recommendations are welcome.
Edit: I am looking for an article or chapter that provides an overview of t... |
I'm comparing different machine learning for classifying sensor data and I need their complexity to select the most efficient. Which are the Big-O notation for the following algorithms (I add what I found):
SVM (linear and all vs rest)- O(n^3)
Random Forest (CART) - O (M(mn logn)) M-number of trees m-number of attribu... |
I am in a situation where sampling proportional to some weight might be very beneficial. In order to estimate $\tau$ the population total / sum I use the Hansen Hurwitz estimator. That is,
$$\hat{\tau}_p = \frac{1}{n}\sum_{i=1}^n\frac{y_i}{p_i}$$
with variance
$$\hat{Var}(\hat{\tau}_p) = \frac{\frac{1}{n}\sum_{i=1}^n(\... |
I found this article, describing a systematic approach to stratified analysis: https://www.linkedin.com/pulse/conducting-stratified-analysis-test-confounding-navneet-dhand
Test crude association of the explanatory variable with the outcome or response variable, i.e. conduct a chi-square test to evaluate significance ... |
I've looked through a related question and another on this topic but it seems I'm still missing something. I understand that in a multiple regression from these questions and answers that a given parameter is estimated while other variables are held at their mean.
If I had a variable Y that was predicted by a series of... |
I have a dataset consisting of the following: one column language containing five different languages. Two other columns Canonicity and Intrinsic containing either (0, 1). One last column, useOfIntrinsic. You can view the data here.
I would like to test the use of intrinsic as a function of Language, Canonicity and use... |
I'm using the Generalized likelihood ratio test in order to get the t test for slope, i.e.,
$H_{0}:\beta_{1}=b_{1}$ vs $H_{1}:\beta_{1}\neq b_{1}$
If $b_{1}=0$, we have that ${\sigma}_{MV|H_{0}}^{2}=\sum{{(Y-\overline{Y})}^{2}}$ and using the Generalized likelihood ratio test, we can use sum of squares and these fact... |
I did a simple experiment with trees: 5 species (sp) and two management (trt). I assessed the diameter (diam) through the time (month=1:24) and I'm interesting in the factors interaction effect, I mean if the management is suitable for some species.
The dataset has some limitations since it is not balanced, so in 2 out... |
Why does ridge regression in glmnet and sklearn give very different results?
library(glmnet)
X = matrix(c(1, 1, 2, 3, 4, 2, 6, 5, 2, 5, 5, 3), byrow = TRUE, ncol = 3)
y = c(1, 0, 0, 1)
reg = glmnet(X, y, alpha = 0, lambda = 1)
coef(reg)
glmnet output: 0.18811436, –0.02910451, –0.04614124, 0.26402541
import numpy as np... |
I am trying to understand how multi-label classification is done and rather got confused with what wikipedia has to say, I am directly quoting it:
"Several problem transformation methods exist for multi-label classification; the baseline approach, called the binary relevance method,[1][2][3] amounts ... |
When using neural network for classification problem, and using softmax as last layer for last layer.
Typically, we have a prediction and a confidence level. However, is there such confidence interval measure for neural network regression problem?
|
Is there a big difference between general linear model and generalized linear model?
I am quite confused a bit with the two.
|
When we have an estimate of the variance $s^2$ obtained from $n$ observations, $x_1, x_2, \dots, x_n$, we can calculate a 95% confidence interval of the true variance
$$\left( \frac{(n-1)s^2}{\chi^2_{\alpha/2}}, \frac{(n-1)s^2}{\chi^2_{1-\alpha/2}} \right)$$
I want to get narrower confidence interval.
The best thing to... |
This question is based on my doubt on the application of Lloyd's algorithm in minimizing quantization error when performing scalar quantization to this problem. I have a quantization function to partition /quantize a real valued data. The way I understand the working of Lloyd's algorithm is that it can be used to opti... |
I have a line plot and occasionally there are NaNs that appear in the Y-axis. If I put them as zero then people will confuse that for actual zeros. If I remove them from the dataset, the visualizations look bad because there isn't enough data (there might only be 3-4 data points at a given time).
How can I effectively ... |
I would like to ask if there's any existed works about hypothesis testing with faulty data.
The specific question is as follows:
In normal hypothesis testing, say I have n i.i.d. datas $X_1,X_2,...,X_n$ with distribution $P_0$ under $H_0$, and $P_1$ under $H_1$. Now a fraction $b$ of the datas are compromised, so the... |
I'm developing a customer satisfaction survey for a course in yoga.
We have very few participants below the legal age of 18. People retire at year 65 in my country.
I don't ask directly for a specific age or birth year, because from our past surveys, quite many people don't want to answer if the age question (or any ot... |
I am exploring churn and lifetime modeling. From what I see on various online material, the lifetime period is defined as 1 / churn-risk.
For example, if the churn risk for a 12-month period is estimated to be .3, the lifetime is calculated to 3.3 years by 1 / .3.
Is there a mathematical proof of this way of modeling... |
I want to estimate a panel equation of the form
$$
y_{it}=ρ y_{i,t−1}+β_1 x_{1,t}+⋯+β_k x_{k,t}+ c_i+γ_t+ϵ_{it}
$$
where $c_i$ are country specific effects, $γ_t$ period effects and $ϵ_{it}$ error term.
the problem is that some of individual time series have certain trend, but the first difference of the variables are... |
I have a matrix, $X'X$, which is singular meaning that I cannot invert it. I need the inverse of this matrix to perform two independent things. I need it for the design of experiments, in R using optFederov() algorithm. Also I need it invertible for OLS.
I believe the two possible sources of singularity are:
1.- Many ... |
I am using h2o Generalized Low Rank Models for tuning a binary PCA (Logistic loss + Quadratic regularization) to perform a recommender system task. I am using the H2O infrastructure using the GLRM approach. Below the code where a model is run.
bestGlrm<-h2o.glrm(training_frame = train.h2o.wmiss, cols = glrm_cols, k = b... |
I am wondering if there are classical (or not so classical) examples of negative autocorrelation in a regression model.
To expalin the context : I am explaining OLS limitations, heterosckedasticity and autocorrelation for the moment, and I want to showcase as many examples as possible, but I have only encountered posi... |
I encountered a mixed-design experiment that consisted of two independent groups and three repeated conditions. The authors conducted an analysis of variance followed by post-hoc paired-samples t-tests. Three paired-samples t-tests were computed to compare the conditions within each group (i.e. six tests in total).
In ... |
In my prediction model, there are 20 independent variables, and the dependent variable [y] has a range of 0-4. In the first approach I use LASSO to make a prediction [I have separate training and test sets]. Here is the result of the model evaluation:
METHOD MAE R2 RMSE
LASSO 0.561 0.141 0.985
In t... |
suppose $X_1,X_2,...,X_n$ be a random sample of distribution with
Probability density function $f_\theta(x)= \displaystyle \frac{2x}{\theta^2}e^{\displaystyle\frac{-x^2}{\theta^2}}, x>0, \theta>0$. under loss function $L(\delta, \theta)= (\displaystyle\frac{\delta}{\theta}-1)^2$how can I calculate minimax estimator f... |
I am trying to figure out how Eq. 45 simplifies to Eq. 46 in the paper - "Gibbs Sampling for the Uninitiated" by Resnik and Hardisty.www.cs.umd.edu/~hardisty/papers/gsfu.pdf (page 15)
Eq. 45
$$ \frac{\Gamma{(N + \gamma_{\pi1} + \gamma_{\pi0})} \Gamma{(C_x + \gamma_{\pi x} -1)}}{\Gamma{(C_x + \gamma_{\pi x}) \Gamma{(N +... |
I have a data set which is 3 columns and about 50,000 rows. I am trying to do some cluster analysis and would like to speed it up. Most examples online use data sets like iris which are relatively tiny. Take the following code:
nb <- NbClust(d, distance = "euclidean", min.nc = 2, max.nc = 30, method = "complete", inde... |
I am studying multivariate statistics and I don't understand the meaning of
Jacobian of the transformation for pdf of function of random vectors.
If I have a random vector, let's say bivariate, (X,Y) with joint density
f(X,Y) I know how to find the joint pdf of (U,V) with U = g(X,Y) and V = h(X,Y)
I did a lot of exer... |
I have recently noticed that the var() function in R returns a different value from the analogous function in the python package numpy. In particular, R's var() function seems to be actually computing what is sometimes called the quasi-variance:
$\text{qVar} = \frac{1}{n-1} \sum_{i=1}^{n} (x_i-\bar x)^2$
Instead of t... |
I have two data sets both matrices of latitudes and longitudes.
$A = [(X,Y),(X_2,Y_2)]$
$B = [(X_3,Y_3),(X_4,Y_4),(X_5,Y_5)]$
They are of different sizes
I want to calculate by how much each of the pairs of (x,y) coordinates in A correlate with all of those in B.
So then can order A by those that correlate most clos... |
I am reading the follow webpage:
http://www.randomservices.org/random/dist/Convergence.html
I can understand b. and c.,
but I don't understand how they get $f_n(x)=\left\{\begin{matrix}
1& x=\frac{1}{n}\\
0& x \neq\frac{1}{n}
\end{matrix}\right.$
I think $f_n(x)$ should always be $0$, because:
Since we know that $... |
I have a sample $X_1, X_2,\cdots,X_n$ (where $n$ is small), where we believe theoretically that each $X_i$ follows a binomial distribution $B(m,p_i)$, I want to test if all the $p_i$s have the same value $p_0$ (which is known à priori) or not. Is the $\chi^2$ test appropriate in this case?
EDIT: Here's what I want t... |
I'm estimating a linear model, with one of the independent variables being a date of appearance. I consider the date to be a minimum date of appearance, not an obeserved one. Thus it is censored. What would be the proper estimation to approach this?
|
I'm looking at the Schoenfeld residuals of a competing risks survival model for one of the covariates. There is an extreme point which I am struggling to interpret.
|
We have likelihood function
$$
L\left(\mathbf{\Theta} \middle| x_1, \ldots, x_n \right) = \prod^n_{i=1} f\left( x_i \middle| \mathbf{\Theta} \right)
$$
and a score function
$$
V\left(\mathbf{\Theta} \middle| x_1, \ldots, x_n \right) = \nabla_\Theta \sum^n_{i=1} \ln{f\left(x_i, \mathbf{\Theta} \right)},
$$
where $x_i$ a... |
I am trying to make model with logistic regression. My results are:
At first my results with CUTOFF 0.5 was:
good borrowers predicted: 95.02% and 33.05% for bad borrowers.
then I realize that the predicton of bad borrowers are low only (33.05%)
so I try to make better results so then I changed the cut off to 0.2 and t... |
Suppose we have a density function $f \sim N(\mu, \sigma^2)$. Then, the score function is defined to be:
$$
\frac{d}{d\mu}\log f\left(x;\mu,\sigma^2\right)
$$
The answer to this for the normal is:
$$
\frac{d}{d\mu}\log f\left(x;\mu,\sigma^2\right) = \frac{x-\mu}{\sigma^2}
$$
which looks uncannily like the z-score. Is t... |
I have created some R markdown to see whether certain forecasts perform better when used as information for a trading/investmen strategy.
One surprising fact I found, if an uncorrelated series with similar structure is used as the forecast, then returns seem to be positive and higher than forecasts based on the actual... |
This is a school exercise and I just don't get on the right track.
Data description:
+- 1000 Samples test data.
1 Y column.
15 X columns.
Y mean: ~6 max: 341 min: -221
X: mean of each column around +- 1 (0.9, 1.05, 0.99 etc.). max over all X: 4.7 min over all X: -2.7
The target rsme should be around 15 but I... |
I am trying to solve this albeit probably juvenile combination/permutation type question.
A person has 10 books, of which four are fiction books. How many ways can the 10 books be arranged so that all four fiction books are not together?
My reasoning thus far is this:
(Total number of ways without the restriction) minu... |
I have recently conducted a study for my dissertation looking at behaviour change prior to starting a club and the child's current behaviour.
The questionnaire was structured of 8 questions about different aspects of behaviour with questions on 4 positive behaviours and 4 negative behaviours. Participants responded on... |
I am forecasting sales data with ARIMA model, I have a bunch of macroeconomic indicators that can be used to identify some of the information present in my sales data.
How do you go about selecting exogenous variables that are most appropriate for running ARIMA?
|
I see that convolutional neural networks are used specifically for image recognition and object detection since their hidden layers and nodes are designed to encode features such as 3 dimensionality, shadows, depth, and other common things found in real life images.
My specific interest is computer vision for desktop c... |
In several sources of information, I found contradicting ways, how confidence intervals (CI) are presented. Thus, I am confused and would like to find out which one is correct: either $CI_{95\%} = [14.7,19.9]$, or $CI_{95\%} = (14.7,19.9)$. I.e. are 14.7 and 19.9 included in the interval or excluded?
In my opinion, the... |
I've been to a few statistics talks recently on the Lasso (regularization) and a point that keeps coming up is that we do not really understand why the Lasso works or why it works so well. I am wondering what this statement is referring to. Obviously I understand why the Lasso works technically, by way of prevention of... |
I have repeated measures data measured at randomly chosen time points from different individuals. I am trying to analyze using a mixed effects model. The observations made at different sites were measured at the same (randomly chosen) time point.
I think of the model as multi-level, in that I am considering the repeate... |
I have a variable namely "Tourist satisfaction regarding ticket prices, transport cost a tourist have been charged by travel agent". I have created a 5 point scale.
1= Highly satisfied
2= little satisfied
3= Neutral
4= little dissatisfied
5= Highly dissatisfied
I am interested to test tourist satisfaction against mea... |
I want to specify a linear mixed model. I have to use nlme because of heteroscedasticity. It's easy to specify the random structure of my model with lme4::lmer:
lmer(Y ~ X (1 + X | a) + (1 + X | b), ...)
How would the random term be translated to nlme? I couldn't figure it out using information from the internet.
I t... |
I'm building a Sentiment Prediction model for Tweets that runs on Text, Numerical and Categorical data. I have already two classifiers, one text and one non-text (for numerical and categorical). Now the problem is when I want to combine both classifiers into one. Since my training features aren't the same for both clas... |
Consider the task that we want to compute the Euclidean distance between two vectors $\mathbf{a}$ and $\mathbf{b}$, where the vectors are noisy sample from some measurement. Our goal is to get an unbiased estimate of the distance, i.e. the distance should be largely independent of noise. Using the classical Euclidean d... |
I am interested in samples of $\theta$ from the posterior distribution
$$
P(\theta|x) = \int d\phi P(\theta|\phi)P(\phi|x)
$$
where $x$ are data and $\phi$ are nuisance parameters. In principle, I can use a Metropolis Hastings sampler to sample from $\theta$ and $\phi$ and discard the samples of the nuisance parameter.... |
I’m having trouble figuring out the best analytic approach to use.
I have survey data that measures people’s sustainability behaviours – there are seven of these, for example: eating organic, recycling, buying green products etc. Behavioural frequency is measured at two time points. There is a fairly large n (=631).
I... |
I have three conditional Gaussians
$\mathbb{P}(A|B,C) = \frac{1}{\sqrt{2\pi}} \exp \left \{ -\frac{1}{2} (A -BC)^2 \right \}$
$\mathbb{P}(B|A,C) = \frac{1}{\sqrt{2\pi}} \exp \left \{ -\frac{1}{2} (B -AC)^2 \right \}$,
$\mathbb{P}(C|A,B) = \frac{1}{\sqrt{2\pi}} \exp \left \{ -\frac{1}{2} (C -AB)^2 \right \}$... |
I can understand why cross-entropy works as a cost function, if we classify a sample as belonging to one of the classes $c_1, ..., c_n$:
$P_{true}(c_i = c_i^{true}) = 1$;
$H_e = -\log{P_{predicted}(c_i = c_i^{true})}$, because all other true probabilities are zeroes.
Now, if you predict probability close to $1.0$, cr... |
I'm doing a regression problem using a convolutional neural network. When I was checking my model using 6-fold cross validation. There are always several vertical lines in which samples are dramatically predicted incorrectly. I tried tuning many parameters, the Pearson correlation coefficient will increase or decrease.... |
Each element of a 56x1 vector represents the functional association between two brain networks. I want to assess which of these 56 values are significant.
One way to deal with this is to use an outlier detection method (the function 'isoutlier' in MatLab 2017 may be useful for that).
Is the use of an outlier detection ... |
I've been working a random forest regression model with my own datasets using the randomForest package.
The model produces a % var explained of ~27%. I also used the importance() function to produce a ranking of the relative importance of the variables, but everytime I use a different number for the set.seed() functio... |
The MICE package in R allows you to post-process imputed values, such that if impossible/unreasonable values are imputed (men being pregnant, people weighing negative pounds), they can be changed as you see fit before they are themselves used to impute other variables' values. Regarding this post-processing, the author... |
In this post Is there any reason to prefer the AIC or BIC over the other? was given the answer, that
AIC tries to select the model that most adequately describes an
unknown
BIC tries to find the TRUE model among the set of candidates.
My question is, how can both this statistics have such different application? Th... |
Please let me know whether I am wrong or right regarding the calculation of mle for uniform distribution
[ in both the cases below $\theta > 0$ ]
let $X_1,X_2, . . .X_n $ be a random sample from uniform (-$\theta , 3\theta$)
then the joint density $\frac{1}{(4\theta)^n}$ must be max at $\frac{max|x_i|}{3}$ ( and t... |
I want to perform a 10 fold cross-validation in R where each fold contains around 10% of the data. There are 185 points which have to be spread out among the 10 folds.
id<- 1:185
The idea is to have each point in one of the folds. Basically, each fold has to be independent. I have tried to use the createMultiFolds fun... |
This seems like a simple problem but I don't know of a way to efficiently solve it:
Suppose I want to generate random samples of 100 numbers, which satisfy the constraint that the sum is less than a certain number:
import random
import numpy as np
#numbers to sample from, could be a more complicated distribution
list_... |
My professor mentioned that we may merge "close" clusters (those with relatively low sum of squared errors) after k-means clustering. However, I don't see the benefit in doing this. If a cluster has very small errors, then that knowledge is valuable, and merging that cluster with another cluster makes us lose informati... |
Can someone explain, intuitively, how a latent class regression (LCR) model is estimated (or direct to some digestible explanations)?
I understand how regressions are estimated, no need to comment on it.
For latent class models (LCM), my understanding is that the parameters are actually estimated from counts of the po... |
As the title states: PCA is an autoencoder with one hidden layer with linear transfer functions.
Can someone explain this sentence to me? I understand that if you want to map something into lower dimensional space then PCA has essentially perfectly optimized this procedure. With this understanding, if an autoencoder ha... |
I am trying to generate random numbers with R, uniformly from one of two different intervals. I want the numbers to be generated, for example, in the intervals [-0.8,-0.4] or [0.3,0.9].
I am trying to play by using more runif together, but I have problems when the intervals are not of the same size.
Can you please help... |
Let's say I want to model $\vec{y}$ based on $\vec{x}_1$, $\vec{x}_2$, ... $\vec{x}_m$ as:
$$\vec{y} ~~\approx~~ \beta_1 \vec{x}_1 ~+~ ... ~+~ \beta_m\vec{x}_m$$
Now, I could use Lasso to encourage most of the $\beta_j$ to be zero.
But let's say instead I have sets of variables, $G_1$ ... $G_p$, each $G_k \subset \lbra... |
I built a conditional logistic regression model for 'guest booking a hotel from the hotel search results page'. In my initial model, I didn't do any transformations to the independent variables. This model fits fine, and I am exploring ways to see if I can improve the fit.
So, later, I tried different transformations ... |
The above is all the info I was given to work with.
For the b column, are higher bs indicative of stronger association? What could the constant mean?
What does the exp (b) column mean (how do I interpret it)?
|
I would need help on which statistical analysis I should use to evaluate convergent validity. We have translated an instrument (Likert type) and did test retest along with other instruments to measure validity of the translated instruments? We are not sure which analysis to assess.
|
I've recently seen a formula in a set of statistical learning videos that suppose we fit some model to some training data $f'(x)$ and let $(x_{0},y_{0})$ be a test observation drawn from the sample. If the true model is $Y=f(X)+\epsilon$ with $f(x)=E(Y|X=x)$ then,
$$E(y_{0}-f'(x_{0}))^{2}=\mathrm{Var}(f'(x_{0}))+[\mat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.