instruction
stringlengths
9
38.7k
I have the following table of X and Y values: X Y 1 68 55 2 54 38 3 90 95 4 64 63 5 61 58 6 51 40 7 79 74 8 51 32 9 83 84 10 48 45 I have to do the following: Make linear regression using the method of least squares Draw some conclusions from this model when X = 100 Cal...
Currently I add Var1+Var2=VarSUM12 and then perform a linear regression on VarSUM12~x to obtain test statistics for x and get insight into weak associations that are present across Var1 and Var2 with x. I would like to combine summary statistics (coefficient and standard error) from the individual regressions (Var1~x a...
In the social sciences I have encountered that it is common to treat ordinal variables as continuous, for example variables originating from rating or Likert scales (strongly disagree, disagree, agree, strongly agree). This topic has been discussed for example in this post from 2010: Under what conditions should Likert...
I actually asked the same question in https://math.stackexchange.com/ as well at https://math.stackexchange.com/questions/753105/proving-that-markov-chain-monte-carlo-converges but since the question is very related to this site, too, I am asking it here once again: I am trying to understand how the very basic Markov C...
I have been asked an interesting modelling question by a clinician. The outcome he is trying to predict whether a particular type of cancer will occur. One of the covariates is an indicator variable if the patient previously had another kind of cancer. Other covariates are cancer diameter and margin size of this prior ...
I've produced a large dataset of results from 3 variable inputs. eg: x1, x2, x3 -> y y(x1,x2,x3) I've gone over the problem logically and it was clear the problem was non linear. To this end I've used a polynomial collection based on x1, x2, and x3 (eg. x1^2 and x1*x2) to perform linear regression. I've got a great set...
Is taking the reciprocal helpful in some way, or is it just a matter of historical accident that there came to be two terms to describe the same thing? (From the Wikipedia page.)
Referring to the algorithm on page 11 in this paper on boosting algorithms, I really don't understand step 2, (ii) and (iii). What does this mean: (ii) Fit the regression function $g_j^h (x)$ by weighted least-squares of the working response $z_{ij}$ to $x_i$ with weights $w_{ij}$ on the training data. (iii) Set ...
I try to use a difference-in-difference design in my study. But I have three periods. So I would like to know how I could run my difference-in-difference analysis on Stata with more than two periods.
I am reading an internal paper that says: Let $\sigma^2 V_1$ equal the variance of $\sum_{m\in M}Z_m - Z_0$ and $\sigma^2V_2$ equal the covariance of $||M||^{-1}\sum_{m\in M}Z_m - Z_0$ and $Z_m - Z_0$. I am unfamiliar with the notation of the $V$s. Can anyone explain what this is referring to or point me in the ri...
Question A little something that I've been wondering about for a while: Let $P_\theta$ be a stochastically increasing (one-parameter) exponential family on the sample space $\mathcal{X}$ with $\Theta\subset\mathbb{R}$ being its natural parameter space, i.e. $\Theta$ being the set of values for which the cdf $F_\theta$ ...
I have quite a few distributions that were generated by some system, and I am trying to find the probability of accordance to normality for these distributions. So, the probability of accordance to normality could be found as: P(p>0.05) = ( #p(AD test)>0.05 )/ total_no_of_distributions. where p(AD test) refers to the ...
I often hear people talking about neural networks as something as a black-box that you don't understand what it does or what they mean. I actually I can't understand what they mean by that! If you understand how back-propagation works, then how is it a black-box? Do they mean that we don't understand how the weights t...
I'm trying to simulate these two integrals using Monte Carlo simulation: $$ \int_{-\infty}^\infty \exp(-x^2) dx, \quad \mbox{and } \int_{-\infty}^\infty \exp(-|x|) dx . $$ When I use runif(n,-Inf,Inf), I get NaN (number very close to zero) (using R). I also tried converting that to a polar coordinates integral ($drdθ$...
Suppose I have a data frame such that: set.seed(2014) df<-data.frame(y=rbinom(100,1,0.3),futime=as.integer(rnorm(100,100,10)), age=rnorm(100,50,5),sex=rbinom(100,1,0.5)) df[df>100]<-100 where y is the outcomes and futime<100 are right censored of follow up time. I would fit a logistic regression model to predict ...
My understanding of some statistics: For a given experiment a finite number of samples can be taken, defining the sample size. However this experiment may have an infinity large population size. Given that in an infinitely large population size any possible outcome will occur an infinite number of times, how can we tr...
I have a sample design that can be resumed in: Split the city in X areas and, for each area, sample 5% of the residences and get some informations about it; For each residence, interview ALL residents; In the end, weights to homes and residents are calculated. So, actually, I have 2 samples: one for residences and an...
How many lags should one use a Ljung-Box test for the returns on 1320 daily price quotes? Is there a rule of thumb? What is exactly the impact in the end result of misuse of lag number?
I would like to try to make some sense of a neural network. The neural network has a single hidden layer and is used on 30-40 attributes, which are used to classify the probability that the observation belongs to 1 of 3 different classes. My goal is to the find 5-10 main interactions in order to understand the model be...
Just wanted to check with regard to a retrospective case study, if various data is collected for a set of patients on different variables can this be interpreted with inferential stats tests? Even if no power calculation could be made to determine the required sample size before the study began i.e. just the patients t...
The question seems simple but I just can't solve it. I have twelve test scores and three are to be picked at random to determine the overall test grade. How can I calculate the probability of my final grade based on three randomly picked tests from the pool? The test scores are as follows: 100=4 33=2 66=6 100 33 66 6...
Is there any intuition why the ridge regression is strictly convex, while the LASSO is only convex? Does it have to do with the "corners" of the L1 regularization?
Given a $D$-dimensional datum that is an iid sample from a spherical Gaussian distribution, and the noise-corrupted version of that datum generated by adding spherical Gaussian noise, is there a useful way to express the distribution of the cosine similarity between the signal and its noisy version? Here's what I tried...
I want to develop my skill set in the design and analysis of experiments in retail, where we conduct experiments (introduction of new package, new product, discount, etc.) in test stores while maintaining the status quo in selected control stores. After the end of the experiment, we conduct analysis of sales to see if ...
I'm trying to predict weight change with an intervention from baseline variables. Literature search yields suggests several predictors. Univariate analyses with weight change as dependent and baseline variables give several more predictors. I've entered both theoretical and GLM univariate predictors into a regression ...
I was wondering if it can be useful to use selected features from a wrapper algorithm (for example SVM-RFE) to train another classification model like k-NN or Linear regression.
I counted the number of geese on an intertidal mudflat on 100+ days over the winter. I made two counts on each of these days: one at low tide and one at high tide. I want to know if the number of geese present differs at high and low tide. As the data are very positively skewed, using a Wilcoxon test is appropriate. Ho...
I'm trying to understand factor potentials from the PyMC documentation, but need some help on the implementation piece--or it may turn out that I am misunderstanding how potentials work altogether. Imagine that we are building a Poisson switchpoint model as specified in PyMC's documentation tutorial. Now we want to ...
I'm working on a project wherein I compare the presence/absence of a number of bird and herptile species between wetlands that have received three different treatments. The populations were surveyed across two different years. So the response variable is a binary categorical variable, and the predictor variables (wet...
Linear mixed-effects models aren't commonly used in my corner of biology, and I need to report the statistical test I used in a paper I'm trying to write. I know that awareness of multilevel modeling is starting to appear in some areas of the biosciences (A solution to dependency: using multilevel analysis to accommod...
I am required to perform unit root testing on a given time series. The output obtained in Stata is somewhat confusing me. To the best of my knowledge I am obtaining two conflicting results, Stata indicating that the time series fits a unit root process while also seemingly saying that the coefficient is significantly d...
I'm working on a predictive cost model where the patient's age (an integer quantity measured in years) is one of the predictor variables. A strong nonlinear relationship between age and risk of a hospital stay is evident: I'm considering a penalized regression smoothing spline for patient age. According to The Element...
I know that McElroy R^2 is a measure of goodness of fit for Seemingly Unrelated Regressions (SUR models), but how can one judge that the estimated equations are well fit by using the McElroy R^2?
Let $X_1$ and $X_2$ be two independent Normal variables with mean $\theta$ and variance $1$. Let $S=X_1+X_2$ and consider the following conditional probability: $$P \left[ X_1 \leq x_1; X_2 \leq x_2 |S=s \right]$$ If we assume that $x_1 \leq x_2$ and $x_2 \leq s$, then why does this conditional probability equal zero? ...
I've recently conducted an experiment with two independent variables: musictype and wordtype, measured by response time. 20 participants. I've done a one-way repeated measures ANOVA along with the usual tests of normality, means etc. Do I need to include a t-test? Am I missing any other important tests? Many thanks in ...
I am running a correlation coefficient test, and the results were: $r = 0.382, p = 2.76 \times 10^{-13}$. So the $r$ value is not that impressive (usually we see $r>.5$), but the $p$-value is still significant. Usually I would think a low $r$ value would mean high $p$-value (no significant correlation), or vice versa...
I'm trying to fit the data in this message (daily temperatures) using the Holt–Winters technique in R, but can't get the seasonal example in here to work. Is this not possible with these data, or am I doing something wrong? The data are sampled every 10 minutes, so 144 points should correspond to one day. My code is: >...
Background on bias correction constants The standard deviation is calculated like this: $$ SD = \left(\frac{1}{N-constant} \sum_{i=1}^N (x_i - \overline{x})^2\right)^{1/2} $$ Following Wikipedia's entry on the standard deviation, the biasedness of the estimation of a population SD given a sample depends on $constant$ i...
I have a two-sample t-test where the t-statistic is equal to the critical t-value (at three decimal points) at a p-value of 0.05. does this mean i reject the null hypothesis or the opposite? thank you so much!
I want to get the conditional probability of P(U=u|V=v) or P(X=x|Y=y) using copulas.However, I found that if I use the copulapdf function of Matlab, the result is bigger than 1! I don't know why. any one could help me? thank very much for your help! the formulas are following:
While GDP per capita = GDP / population and are obviously related, these three measurements are not perfectly collinear and can be included in OLS just fine. However, when interpreting the coefficient of GDP per capita, how does it make sense to say that we "keep GDP and population fixed in order to find the effect ca...
Let $Y_1$ and $Y_2$ be independent r.v.s, and $X$ be another random variable. What is $E[X|Y_1, Y_2]$? Is $E[X|Y_1, Y_2]$ equivalent to $E[X|Y_1] \cdot E[X|Y_2]$? More specifically, is there a formula for the density of $f_{X|Y_1,Y_2}$ just like $f_{X|Y_1}$$=$$f_{X,Y_1}/f_{Y_1}$ (assuming that regular conditions such a...
My background is in machine learning and statistics, but I am relatively new to psychometrics and testing. Nearly all of the literature I've found on item reliability refers to Chronbach's alpha or methods that assume all items are administered to all subjects (and what little I've seen for adaptive or IRT models is ei...
I am working on a vein pattern recognition project based on SURF algorithm and Euclidean distance. I have completed my program to find the maximum and minimum distance between vein features and find a match exactly when there is an identical image. That is, the max and min distance between two images is zero. In this c...
I am using the Weka API for my research about document classification. I wish to apply Latent Dirichelet Allocation on my dataset followed by using a classifier in Weka. However, it is not so clear to me how I can perform LDA on my raw textual data and represent it in a way I can feed it to the classifiers in Weka sinc...
I am attempting to write a program that will (among other things) use the F-test in multivariate regression under standard robust errors. I am having trouble finding a specific formula for the F-statistic using robust errors. I understand the purpose of robust errors. I simply need the modified formula for the F-stat...
An example of linear regression could look like: $min \sum_{i=0}^{m}||x_i A - y_i||_2^{2}$, where ${x_i, y_i} \in \mathbb{R}^n$ and $A \in \mathbb{R}^{n\times n}$. I am interested in knowing how do I solve such problem with an of the following extra constraints, $A$ is an orthogonal matrix or $A$ is a rotation matrix. ...
I have a dataset of tweets collected using twitter streaming API on a particular topic (say 'football') using around 40 keywords. Now if I'm going to track the same topic (football) in future how do I determine the best set of keywords to query. Any researchers working on these areas? How do I solve this keyword ambigu...
There are four different types of mobile phones (same brand) that are used as stimuli in an experiment. In the first example, if "mobile phone" is the independent variable in the study, which one of the two is appropriate? (i) mobile phone is the independent variable with four levels or (ii) this study has 4 independ...
I am trying to use lars (matlab implementation:http://www.ece.ubc.ca/~xiaohuic/code/LARS/LARS.htm). I want to do a leave one out cross validation on my data using this code. I have the following doubts: This code has a parameter t, is this the parameter which has to be tuned during cross validation? If it is not given,...
If I don't have the data, but only have the estimates of mean and variance of two independent Gamma distributions. What type of test I can use to test the null hypothesis μ1=μ2?
I have some experiences with time series modelling, in the form of simple ARIMA models and so on. Now I have some data that exhibits volatility clustering, and I would like to try to start with fitting a GARCH (1,1) model on the data. I have a data series and a number of variables I think influence it. So in basic reg...
I have a question about nonlinear regression and confidence intervals for values estimated from the model. Here is my problem. I have sets of data where $X$ is the logarithm of the dose of a chemical substance and $Y$ is the response readout (normalized to be between 0 and 100%). I am fitting logistic function to this...
I have the following situation: General practitionar (gp), patient (pat) and consultation (cons). Each gp has several patient and each patient can have 1 and more consultations with a specific characteristics cons_x. The outcome is y=0/1 on level consultation. A possible model could be (in lmer/R notation) y ...
I am reading a paper for robust, sparse PCA in which they propose a BIC-like criterion for selecting the appropriate value of the sparsity parameter $\lambda$. They define this as: $$BIC(\lambda)=\frac{\tilde{RV}}{RV}+df(\lambda)\frac{log(n)}{n}$$ where $(\tilde{RV}, RV)$ refer to the total robust variance of the resid...
I'm using permutation tests, based on random forest importance measures, to perform variables selection in my dataset. Using $99$ permutations, my permutation tests $p$-values are comprised between $0.01$ and $1$. As I am using this procedure with more than $300$ covariates, I considered the issue of multiple testing. ...
I'm running a regression where the dependent (response) variable is a highly dispersed (slightly zero-inflated) count and the explanatory (independent or predictor) variables are continuous, counts as well as binary. I read a couple of interesting contributions on this topic on SO (here, here, and here as well as the a...
I have came across a question in job interview aptitude test for critical thinking. It is goes something like this: The Zorganian Republic has some very strange customs. Couples only wish to have female children as only females can inherit the family's wealth, so if they have a male child they keep having more chi...
I read that in traditional feed-forward neural nets the gradients in the early layers decay very quickly and that this is 'a bad thing'. But I don't understand why. Can someone please explain what does that mean? or at least direct me to places to read about it and understand.
Let $y_t$ a stochastic process and $\tau_t$ presents the time duration between the $t$ and $t-1$ event.The ARMA(p,q,r) with exogenous variables is defined as: $$ y_t = \varepsilon_t + \sum_{i=1}^p \alpha_i y_{t-i} + \sum_{i=1}^q \theta_i \varepsilon_{t-i} + \sum_{i=0}^b \eta_i \tau_{t-i}.\,$$ where $\eta_1, \l...
I'm using R to do a chi-squared test on two sets of data to check if they follow a distribution. In the first case the chi-squared statistic given by chisq.test matches the one calculated by hand, but in the other case it does not. First case > e1 = c(18, 38, 78, 107, 107, 72, 35, 15) > o1 = c(10 ,30 ,80 ,180 ,60 ,40 ...
I have a question. Let's say data has been collected for people with jobs and people without jobs. People with Jobs are represented by 1, people without jobs are represented by 0. How do you use a least square method to show the proportion of people with jobs or the proportion of people without jobs?
I'm trying to write my own function for principal component analysis, PCA (of course there's a lot already written but I'm just interested in implementing stuff by myself). The main problem I encountered is the cross-validation step and calculating predicted sum of squares (PRESS). It doesn't matter which cross-validat...
In a dataset, I have this variable latitude that contains values such as 39° 37' 39" N and 39deg 24min. As far as I know, latitude is measured like above internationally. My question is: To process the above data in order to include them in a linear model for example, which is the proper way to express or format latit...
I have the coefficients for a logistic regression model with $25$ independent variables of mixed continuous and categorical types. Considering one particular categorical independent variable with $2$ levels so that in the linear model we have a term $x_{i1}$ taking a value of either $0$ or $1$ and an associated coeffic...
There is many variants of type of solver in liblinear but I don't understand their differences.Which one I must choose? Also why data must be scaled? duo to some numerical issues? -s type : set type of solver (default 1) for multi-class classification 0 -- L2-regularized logistic regression (primal) 1 -- L2-re...
Let $x_i$ be independent Bernoulli random variables with success probabilities $p_i$. That is, $x_i=1$ with probability $p_i$ and $x_i=0$ with probability $1-p_i$. Is there a closed expression or an approximate formula for the distribution of the sum $\sum_i x_i$?
a) For which of the following observations (obs1, obs2, obs3) is the variance of the residual the largest? Which observation has the highest leverage? And which one the smallest? Explain why. b) Which of the three observations has the largest DFBETAS? c) About which observation would you worry the most? I thought th...
I sense this is not a good idea, but am struggling to think of an reason why it is wrong, other than that the assumption of homogeneity of variances would surely be violated. Is there some more fundamental reason why this is wrong? Does it depend on how many participants are in the other levels of the factor, or on how...
The first one is from Andrew Ng The second one is from Francis Bach I might be a little confused, but why is there a summation of partial derivatives in the second description and none in the first one? Are they talking about the same thing after all?
I'm interested in wind forecasting, which I have analyzed over some time by means of ARMA methods. Now I've being reading about Kalman filtering. Kalman filter is optimal when Gaussian assumption can be hold. However, wind distributions are far from normal (with Weibull the most popular). My question is, Is it correct ...
$X$ and $Y$ have bivariate normal distribution and have joint pdf \begin{equation*} f\left( x,y\right) =a\exp \left( \frac{-1}{2}\omega \right) ,\text{where }% \omega =6x^{2}+12y^{2}-16xy-8x+24 \end{equation*} then what are the means of $X$ and $Y$? I have \begin{equation*} \frac{1}{\left( 1-\rho ^{2}\right) \sigma _{...
Let $\mathbf{y_1} =\begin{bmatrix}g_1x_1 & g_2x_1 & \dots & g_Nx_1 \end{bmatrix}$ and $\mathbf{y_2} = \begin{bmatrix} f_1x_2 & f_2x_2 & \dots & f_Nx_2\end{bmatrix}$. All the elements of $\mathbf{g}=\begin{bmatrix} g_1&g_2 &\dots &g_N\end{bmatrix}$ and $\mathbf{f}= \begin{bmatrix} f_1 & f_2 & \dots f_N\end{bmatrix}$ are...
I have been applying complete linkage on about 5,000 points using matlab with no problem. I want to extend this method to much more elements. It would take me a long time to process my data to test it, so I would like to know whether someone has already applied this algorithm on matlab with so much data.
Consider a variable that can take both negative and positive values, and that has the following density plot: I am trying to identify the distribution of this variable. The density plot resembles that of a Gamma distribution. However, since the variable can take negative values, it certainly does not follow a Gamma di...
I am performing MCMC with pyMC on a nonlinear model, specified in Probabilistic modelling MCMC question with pyMC Imagine I have 2000 points of experimental data, normally distributed: data = np.random.normal(.2, 1, 2000) Imagine that, instead of having the raw data, the experimentalist gives me just one number, but...
The word2vec tool uses deep learning to compute vector representations of words. They've mentioned that - "The word vectors can be also used for deriving word classes from huge data sets. This is achieved by performing K-means clustering on top of the word vectors." When I execute the code, it seems that the tool compu...
I have a sample of data for which the count of a given value increases roughly in proportion to the actual value. For example, the value 22 will occur around 22 times and the value 30 will occur around 30 times. If I recall this is what is described by a linear probability model. However, I am almost certain that th...
I have a large dataset, lets say 500 lines of data. As a quick workaround to higher order regression I've made educated guesses about what higher order terms I would expect in my regression equation. I've then included these as separate variables in my linear regression. For example: x(1) = x(1) x(2) = x(2) x(3) = x(3)...
Why do the absolute probabilities affect the p-value of a chi-square test so much? For example: > successes.1 = c(400, 500) > successes.2 = c(40, 50) > trials = c(1000, 1000) > test.1 = prop.test(successes.1, trials) > test.2 = prop.test(successes.2, trials) > test.1 2-sample test for equality of proportions wit...
I need to get p values for the fixed effects in the following GLMM's I ran. Does anyone know of code that I can run that will give me the p values I need? At the moment the output from the ANOVA only gives me one p value and I believe I need a separate p value for each of the fixed effects in the models. Thanks in adv...
Let's assume we have a sequence of events $x_1, x_2, ...,x_n$ and each event can be described as a categorical variable from domain $\{A, B, C...\}$. The time interval between two consecutive events is not fixed. An example could be a researcher's publication record. Each publication is an event and the domain is the s...
The Cox model does not depend on the times itself, instead it only needs an ordering of the events. How come it doesn't need the time, as all of the models I've seen so far are dependent on the exact time point and/or interval?
I want to learn about Receiver-Operator-Characteristic curves, and metrics. I have read through online webpages with some basics, and I have used MATLAB built-ins to create ROC plots. It tells me about area sums. I have also looked at the JMP module for classification and for Logistic plot which make ROC plots. What...
This question just occurred to me out of the blue. PCA is a way to reduce dimensions. Another way that is often (perhaps too often) used is to take mean values of two or more variables. This is done a great deal to create "scales" or "ratings" that get published in the popular press about various political issues. Dime...
I got measures of one variable (that behaves as a time series) for different conditions (some quantitatives, but mostly are qualitatives). For example, this is a "fake" representative plot of this variable for 2 differents conditions : http://www.casimages.com/img.php?i=140415020040937841.png How can I statistically po...
I've created this toy example to demonstrate something that is occurring with my real data. I do not understand how to interpret the apparent failure of cv.glmnet to find a solution when it's explicitly "doped" into the data. Let's create a matrix of random predictors: xtrain = replicate(100,rnorm(10)) Now let's crea...
My question pertains to section 2, called "Multi-class Logistic regression", of this pdf, especially the update rules. (The entire section is only a couple of paragraphs.) Everything seems to make sense, but I don't see how one is supposed to implement the gradient ascent algorithm. What is $y_i^k$? What are its dime...
Good afternoon, I am attempting to fit a state space model of the form: $$ (S_t- \mu) = G*(S_{t-1} - \mu) + E_t $$ $$ Y = F*S_t + v_t $$ Where $Y$ is nx1, $G$ is 3x3, $S_t$ is 3x1, $\mu$ is 3x1, and $F$ is 17x3. For the life of me I cannot figure out how to define this in the DLM package in R. I have tried making $G$ 6...
A question about equality $$F_{r_{1},r_{2},\alpha}=\frac{1}{F_{r_{2},r_{1},1-\alpha}}$$ We know if $X\sim\chi^{2}\left( r_{1}\right) ,~Y\sim\chi^{2}\left( r_{2}\right) $ and $X,~Y$ independent then $$\frac{X/r_{1}}{Y/r_{2}}=F\implies\frac{Y/r_{2}}{X/r_{1}}=\frac{1}{F}$$ distributed. But how can we get $1-\alpha$ ins...
Is it true that one should generally scale each of the features before feeding them into common classification models such as Support Vector Machine, Logistic Regression, etc? What about for regression models?
I'm struggling with a contradiction when trying to determine a sample size when proportion is small. If I use binomial formula: $n = p(1-p)z^2/ME^2$ then the smaller the proportion - the smaller sample size I need. The maximum sample size is actually at $p = 0.5$ However, I've often seen following rule of thumb for (n...
It's my understanding that most types of common classifiers (Support Vector Machine, for example) can take a mixture of categorical and continuous predictors. However, this doesn't seem to be true for Naive Bayes, since I need to specify the likelihood distribution a priori. What should I do if I want to run Naive B...
Suppose that I have a regression model with two explanatory variables: $$Y = b_0 + b_1X_1 + b_2X_2 + \varepsilon$$ The determination coefficient $R^2$ measures the amount of variability in the response variable $Y$ that can be explained by the explanatory variable. However, how can I find out the explanatory power that...
(Background info taken from my blog) In logistic regression, the hypothesis function, which models the relationshiop between the dependent variable $P(y = 1)$ and the independent variable $X$, is : \begin{align*} H_i = h(X_i) &= \frac{1}{1 + e^{-X_i \cdot \beta}} \end{align*} where $X_i$ is the $i$th row of t...
I need to calculate the positive predictive value for a validation set for a rare event. The problem is that the validation set was oversampled for the rare event. The event occurs in 5 percent of the population, however the oversampling has adjusted it to be in 50 percent of the sample. How does the oversampling effe...
To calculate the PDF function using Shannon entropy I have scaled my original sample by simply doing $x'=(x-a)/(b-a)$; where $b=\text{max}(x)$, and $a=\text{min}(x)$ and then I found the $\text{PDF}(x')= exp(-\lambda_0-\lambda_1x'-\lambda_2x'^2)$ using optimization with subjection to moments constraints. However it's c...
I am trying to evaluate the performance of my semi-supervised algorithm, by comparing it against different algorithms. I have searched a lot, but can't find code that does multi-class semi-supervised classification by training on (labeled + Unlabeled ) data and then testing on unseen data. Most that I have come across ...
I have a dataset of 500 observations (firms) and for each firm I know how they are directly and indirectly related based on some characteristics. I can therefore construct a network of connectivity across all stocks. For each firm I compute the shortest path to all other firms. I end up with 500 networks of degree of s...
Suppose you are measuring temperature $T_{ij}$ for $i =1, \dots ,4$ subjects and $j= 1, \dots ,4$ time points. For subject 1, suppose $T_{12}$ and $T_{14}$ were missing. Would you omit the entire record for subject 1 if you are running a linear mixed model?