instruction
stringlengths
9
38.7k
I've been using linear models (lm function in R) to determine if the the expression of certain proteins is associated with disease severity. Sometimes the expression of proteins can also correlate with age, so I've been including that in the models as so: lm(ProteinA ~ DiseaseSeverity + Age, data = mydata) But where ...
I have series of pictures of the same places, taken with the same cameras and I need to classify changes on pictures, like leaves fell, snow appeard, object appears disappears etc. Which topology to choose for this? First I though that I can just concatenate pairs of images side by side and pass it to DNN, like here B...
Data and Objective The data are about lane change maneuvers. I want to predict the lane change duration of a driver of certain age and gender. Following is a very small subset of observations and variables in original data: Dependent variable: duration of lane change (1 observation per driver). Independent variable...
I have 6 class labels, say: a, b, c, d, e, and f. I am using 3 classification models: decision tree, random forest, and naive Bayes. Can majority voting be applied this ensemble, say more than 50% votes for a decision?
I have measured spore production by a parasite after feeding the host on 4 diets of varying nutritional content. I have primarily analyzed the data by treating the diets as categorical variables, even though nutrient content is continuous. Most of the response variables are not normally distributed, so I have primarily...
I am working on differentially expressed gene analysis using TCGA RNA-seq data. The data is from over 500 brain cancer patients, and I hope to see if there is any DE detected genes between those with and without seizure history. In my metadata, I have so many other variables that potentially influence the RNA-seq count...
I have seen many examples where even if the goal is to find outliers, the first step is to go through linear (or any other) regression and then move on to outlier identification. Why? If one wishes to find outliers only, can't regression analysis be skipped by using methods like 68–95–99.7 rule?
I have a random number generator as part of a system that - putatively - randomly selects one of 10,000 drive locations to store an incoming file fragment. Multiple file fragments can fill a drive location. For simplicity, let's say it's a short time window and thus there is no ceiling on number of fragments stored p...
How can I check the orthogonality of one variable to any single and any combination of other variables? Suppose you have 10 variables (called A to J) and you want to prove that variable A is not correlated with any single and any combination of variables B to J. One option would be to measure the "direct" correlation ...
In a comment to Jaap's answer to this question about reporting tiny p-values, amoeba says "Once the $p$-value is below 0.0001 or something ... it's probably more meaningful to look at $z$-value than at $p$-value," for example the 5$\sigma$ convention in particle physics. There was agreement that this was right. Why is ...
Linear regression of 1 independent variable produces the best fit line given the samples available. In Excel, the automatic linear regression of 1 independent variable yields some values such as these below. (Sorry that the image is not cropped.) Given that there is only one such line possible for any optimizing algori...
I've constructed a mixed effect model in R to test for a fixed effect of condition and fit random slopes to each subject, using the unique task solution for each subject. It looks like this: mdl <- lmer(dv ~ condition + (solution|subject), data = E1_data, REML = FALSE) I know that to test whether the fixed effect is...
Hastie \& Tibshirani's original approach to fitting generalized additive models was the backfitting algorithm. For a model of the form $$ y = \alpha + \displaystyle\sum_k f_k(x_k) + \epsilon $$ Initilize the $\alpha$ and $f_k$ at reasonable values Loop through terms, subtracting off the current estimate of all others...
hopefully this isn't too dumb of a question. I've been thinking about it for a while now and don't have a clear answer. I saw this question, where the answer mentions the Poisson Distribution, but it doesn't seem like the Poisson applies here because of the time aspect of the Poisson (please feel free to correct if wro...
I'm trying to simulate the delivery times for a fast food restaurant (i.e. the time it takes the delivery guy to reach the client from the restaurant). The locations of all clients are put in clusters called "sectors". These sectors are like neighborhoods, so all orders that fall in the same sector are assumed to have...
Let's say I have a set of $n$ objects, and I select an object from the set with uniform probability. I do this many times, and record how many times I select each object. These counts will tend toward a uniform distribution, but an exact uniform distribution is obviously unlikely. What's the chance that the difference...
Say one has the following data generating process (DGP) (known as the SAR ou spatial lag model in the literature): $\boldsymbol{y} = \rho \boldsymbol{W}y + \boldsymbol{X}\boldsymbol{\beta} + \boldsymbol{u}$ where $\boldsymbol{y}$ is a $n \times 1$ endogenous vector, $\boldsymbol{X}$ an exogenous $n \times k$ matrix, $\...
Let $X1,X2... Xn$ be a random sample from X and let X have the following pdf: $g(\theta)xe^{\theta \frac {x^{2}}{2}}$ , $x$ from 0 to 1 and $g(\theta)$ is a normalized constant of the parameter $\theta > 0$. The objective is to find the MP test for the problem: $H0: \theta=0$ $H1: \theta=2$ I started by trying to find ...
I have a time series {y_t, t=1,2,3,...,N} and y_t is missing in the period[t=s, t=s+1, ... t=s+M]. I want to backfill y_t using regression based on other time series {x_t} in a rolling-manner. Specifically, I use the sample before t=s to run a regression of y_t on x_t, and predict y_s based on the regression estimation...
Set up: We are testing widgets. If a widget passed testing it moves out of the factory. If it failed we will test it up to 3 times. There are some number of widgets that will never pass even if we tried forever. How can we construct a model to infer the number of samples that will never pass no matter how many time we ...
I have a small, but untidy, dataset. I think I should to use non-parametric tests, but I want to check my understanding since I have not often used non-parametric tests. My dataset is from a small chain of health clubs (10 clubs) that created a program to encourage members to use their benefits more frequently. The...
The data I am working with can be modelled using a negative binomial regression model. My response variable is discrete count values (including zero). All my predictor variables are categorical data. I am now at the stage where I am looking at model diagnostics. When I look at the fitted values obtained using final.mod...
I have this data plotted on a graph in which all points have the same value on the y-axis, e.g a constant integer "c", while the x-axis is the time in seconds. So, for a c = 25 on the y-axis, there are points on the graph corresponding to values on the x-axis equals to, let's say, 32, 59, 78, 142, 249, 286, 301, 310, ...
The goal is to construct an upper bound for parameter $\theta$ given $X1,X2.. X10 \sim exponential (\theta)$ using some form of $y=Min(Xi's)$ as pivot. I used $\frac{y}{\theta}$ as my pivot. This follows the distribution of the minimum of $\frac{Xi's}{\theta}$ which in turn are $\sim exponential(1)$, correct?
I'm currently reading "Computer Age Statistical Inference" by Efron and Hastie. In section 2.1, they talk about some of the mechanisms that frequentist inference uses to circumvent the defect of having to calculate properties of estimators $\hat{\Theta} = t(\mathbf{X})$ of an unknown distribution $F$. One of these mech...
Before reading the Wikipedia article, my idea to calculate the probability was as follows: $1-\left(\frac{364}{365}\right)^{_nC_{2}}$ Basically, I thought to compare all combinations of pairs ($_nC_{2}$) and require them to have different birthday ($\frac{364}{365}$). It gave a very similar result to the wiki method, b...
Suppose the following simple/basic investment scenario: I have $100$USD in my bank account as a starting point (will increase/decrease as I invest). There are $1,000$ different investments that I'm planning to invest my money in. The investments are buy-sell fashioned. So I buy something low, and sell it higher. All m...
I'm really new - curious about this. Say I have a bunch of objects with a short list of tags, ie ["book", "read", "write"] and ["run", "marathon", "jump"]. I already know that objects in the same "category" will have similar tags. So I'd like to determine how many categories there are and which objects are in them. Any...
Say i am training a neural network and have 10 samples with 4 variables each and 1 label assigned to each observation. What does it mean to say that the samples are independent and identically distributed? I know what IID variables are. And i have read statements such as "Because we usually assume that our samples are ...
I'm looking at data from an experiment that examines how three different types of cognitive load (two levels each: present or not present) affects self-reports of thought category. Every subject performs a task eight times, each time under a different configuration of the three types of load until all possible configur...
Is there a formular to calculate or approximate the observation contribution to AUC? Example based on the interpretation from wikipedia: When using normalized units, the area under the curve (often referred to as simply the AUC) is equal to the probability that a classifier will rank a randomly chosen positive instanc...
Can we "trust" about this method when we have small data set ? Is there a minimum size required to partition the data ? e.g. N=200 ?
In the week 3 lecture notes of Andrew Ng's Coursera Machine Learning class, a term is added to the cost function to implement regularisation: $$J^+(\theta) = J(\theta) + \frac{\lambda}{2m} \sum_{j=1}^n \theta_j^2$$ The lecture notes say: We could also regularize all of our theta parameters in a single summation: $$min...
I am developing a feature selection method based on a LASSO regression model. The coefficient are as follow: 1.23,-4.6,0,10.9 I want to know how to select the best features in my model. Should it based on highest values or the highest of absolute (abs) values?
I am trying to establish a polynomial regression model to the following small dataset (csv). y x .99601797 .99981704 .99683697 .941906 .9999658 .99266339 .99877053 .99606185 .99900637 .99474346 .99871661 .96773153 .98961073 .99935843 .99997705 .99489796 .9999985 ...
I understand that classical dimensionality reduction methods are generally speaking could contribute to (vanilla) neural network. But I'm unsure about the dimred application for the input images for convolutional NNs, because I interpret the convolutional layers themselves before the flattening and dense layers as a ki...
I have a small dataset of 25 observations with a classification variable (factor 0,1) and 82 features scaled to have values between 0 and 1. I used the rfe() function of the caret package to identify the best subset of features (2:30) in terms of metric="ROC" (which I think is really AUC). The best subset (14 feature...
Wikipedia article (https://en.wikipedia.org/wiki/Fisher_information#Definition) states that "the information in a random sample of n independent and identically distributed observations is n times the information in a sample of size 1". I know that formally it's proven via linearity of expectation but I am looking for ...
In Andrew Ng's Coursera Machine Learning class, the cost function for logistic regression is defined as: $$\begin{align*} J(\theta) &= \dfrac{1}{m} \sum_{i=1}^m \mathrm{Cost}(h_\theta(x^{(i)}),y^{(i)}) \\[2ex] \mathrm{Cost}(h_\theta(x),y) &= \begin{cases} -\log(1-h_\theta(x)) \; & \text{if y = 0} \\ -\log(h_\...
I come from physics and would like to derive the chi-square function given by the Particle Data Group: \begin{equation} \chi^2 (\boldsymbol\theta) = (\boldsymbol y-\boldsymbol\mu(\boldsymbol \theta))^T V^{-1}(\boldsymbol y - \boldsymbol\mu(\boldsymbol \theta)), \end{equation} with $V_{ij} = cov[y_i, y_j]$ being th...
I have read this and this, but some things are still not clear to me, thus posting this question. My apologies if I use wrong terminology. I am going to conduct Monte Carlo simulations and parameters I need to sample in MC simulations so far don't have any known distributions. Thus I need to get these distributions f...
I am constructing 95% confidence intervals on some metric of interest using MC simulation. These intervals can be constructed for example using bootstrapping. Does it mean that if I repeat the same MC simulation 100 times with a different seed, 95% of my results should be inside the confidence interval?
I have been reading several papers on using a bound on log sum of exponentials to be used in variational inference. One example of this case that can happen is in correlated topic models. Where to create simplical topic distribution, we use a logistic normal. Used in the ELBO the expression will contain a variational e...
When I fit relatively simple models with MCMCglmm, MCMC sampling usually shows good mixing, or at least if there is some extent of autocorrelation, it is usually easly resolved by specifying priors with a bit more care. However, in some cases - especially when fitting categorical models - MCMC chains look terribly, and...
I have wind direction and aerosol data. I want to find correlation between different wind direction (like: corr between N-E/aerosol, E-S/aerosol, S-W/aerosol and W-N/aerosol). wind direction data are in 0-360 degree. Is there anyways to find correlation in such a way: I have also included my datasets here: sample_data ...
I'm using the auto.arima function of theforecast package. I would like to perform the model selection using a custom metric instead of the usual information criteria. Is there a way to do that in auto.arima or I have to create my own solution in another way?
I have spatial data(2D) with some quantity associated with each point - basically 3D data. I want to model the quantity distribution in the space and then use N clusters as a compact representation. My idea is to interpolate with a spline surface over the points, then scale the quantity at each point so that the integr...
The Erlang distribution has a straightforward interpretation in terms of waiting time for the occurrence of a predefined number of events in a Poisson process or a sum of a predefined number of exponential random variables. The gamma distribution is more general since it allows for a non-integer parameter, but it is us...
I am trying one-sample wilcoxon signed rank test on my data. Data contains 100 values, summary of my data is: > summary(myData) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.2370 0.3385 0.3724 0.3585 0.3724 0.4401 I want to check if my data is significantly different from a given number = 0.4400812. So, I ...
So far I've done only simple and multi-variant linear regression analysis using R. Now I need to do something new and I'm somewhat clueless. I have four groups of students, with 7 people in each group. The people of each group, come on day 1, learn a series of words and are tested on those - the learning of and testin...
I have a panel data containing 12 different years, many id:s per year (some id:s missing in some years..unbalanced panel) and many variables. I'd like to test for auto correlation and I have run some regression models in OLS containing "year" variable to control for time. I have checked auto correlation by using lmtest...
This is a followup to this question: Offset in Poisson regression when using an identity link function? I am using a Poisson regression model with identity link to model risk based on a couple of categorical predictors. I am using the identity link because I am specifically interested in risk difference, which can be o...
Assume I perform a psychological experiment with a number of manipulations, each hypothesized to influence the dependent variable. For instance, we perform a mixed-design short-term memory experiment where: DV = Number of letters recalled IV1 = Number of letters IV2 = Number of distractions IV3 = Delay time between pr...
I am researching whether female representation changes the innovation output of companies. I have panel data of 30 companies over 10 years and "diversity, sales, r&dbudget, #employees" as my independent variables and "# of product launches/year" as my dependent variable. I have found out that I need to use a panel dat...
Note: A previous question asking about the finiteness of second moments was asked in 2010 -- this question is not a duplicate of that one because (1) this question is about tests for the finiteness of arbitrary moments, including the first moment (2) all of the papers I have found regarding this question were published...
In relation with this question of mine, which goes beyond what I am asking now. Say one has the following data generating process (DGP) (known as the SAR ou spatial lag model in the literature): $\boldsymbol{y} = \rho \boldsymbol{W}\boldsymbol{y} + \boldsymbol{X}\boldsymbol{\beta} + \boldsymbol{u}$ where $\boldsymbol{y...
I am experimenting with the CausalImpact package https://google.github.io/CausalImpact/CausalImpact.html (Brodersen et al. 2015) which uses Bayesian structural time-series models. All of their examples have many time points pre and post intervention. In my data set, I only have 4 measurements before the intervention, a...
I have three variables y, x1, and x2. I built a linear regression model y ~ x1, p-value of the slope shows x1 is significant. Then I built model y ~ x2, p-value of the slope shows x2 is also significant. But when I built a multiple linear regression model y ~ x1 + x2, p-values of coefficients of x1 and x2 are both (muc...
If the linear regression's f-test is insignificant but its coefficients are significant in t-test, can I use this regression and its coefficients? In academic journals, I find people use linear regression without reporting f-test values but use its coefficients as long as they are significant. Is it ok to use the line...
I'm using the following equation to invert (non-linearly) for three parameters, L Vr and f. $$T_r=\frac{L}{V_r} - \frac{(L\,\cos( \theta )\,\cos( \alpha - f))}{V} $$ I have observational errors on $T_r$ which can be dealt with using weighting in the LM algorithms in Matlab, but how do I deal with the errors in my three...
I got these results after fitting a model: In the above picture X axis shows the fitted values and Y axis shows the truth values. We can see bias although I tuned reg_alpha & reg_lambda (i used XGBoost and also tuned learning_rate, n_estimators, max_depth, min_child_weight, gamma=0.1, etc.) So how to measure bias? Is...
I want to test for the difference between means for what I think are two negative binomial or poisson-like distributions that are 0 inflated. Can I rely on the law of large numbers to do a simple t -test? Or , is this going to be unreliable given the data type? My data are graphed below:
I am using Matlab to determine the standardised difference between a treated group, A, and a control (untreated) group, B, to eliminate the effect of size of baseline (B) value and to therefore determine whether absolute difference (A - B) is correlated to standardised difference. The data vectors are: A = 18.40,6.06,1...
I made some example data and an example graph to show what I need to do. EDIT: Here is my original (example) data, and how the ratios I want to compare were obtained. example.orig.labels <_ c("A","A","A","A","A","A","A","A","A","A","B","B","B","B","B","B","B","B","B","B") example.orig.status <- c("+","+","+","+","+","+...
Based on two of my previous questions How to compute the likelihood's Jacobian of a bootstrapped spatial autoregressive specification? How to bootstrap a (spatial) lag operator? I decided to finally ML-block-bootstrap-estimate $\hat{\rho}$ -- involved in a spatial autoregressive model -- where $\hat{\rho} = \max_{\rh...
I'm modeling a factory with orders arriving independently of each other. I need a series of actual time stamps of arrivals. I've been told that everyone uses the Poisson distribution to model arrivals. Fine. But what I can't understand is how getting Poisson time stamps differs from getting time stamps with a uniform d...
I have to get a regression model for a dataset, and it seems that the best fit is a log-linear model, so that I simply applied the least squares on the trasformed response vector. $ log(\hat{Y}) = f(X) = \hat\beta_0 + \bf{\hat\beta}^TX$ This means that the values $\hat{z}_i$ I predict from the test set through my mode...
I understand GLMnet standardizes the predictor variables by default before fitting the model. After fitting, the computed regression coefficients are then destandardized to allow reporting in their natural metric as can be seen in the post here. Is this the same for Caret using GLMnet? So if I get the coefficients for ...
I'm not sure if this is more of a Stack Overflow or a Cross Validated sort of thing, but maybe somebody has some insight as to this. I'm currently trying to train a convolutional, stacked, denoising autoencoder in Tensorflow. Except because I have too much data to fit onto RAM, I have to pull it from disk in order to w...
I need a statistical test for significance to see if there is a significant correlation between some genes. No test I have looked at so far seems appropriate. Problem: A modern species interbred with a subspecies when reintroduced. The subspecies is now extinct and it is estimated that only 2.5% of the modern species n...
Let's say I have a model that predicts a student's performance on the SAT based on a bunch of factors that a student doesn't have control over, like age, race, household income, family history, etc. Nothing that directly relates to performance is in the model (e.g. GPA, courses taken, scores on other tests, etc.). Let'...
I am working with the mgcv package in r and I am fitting tensor product P-splines. test1<-function(x,z,sx=0.3,sz=0.4){ x<-x*20 (pi**sx*sz)*(1.2*exp(-(x-0.2)^2/sx^2-(z-0.3)^2/sz^2)+ 0.8*exp(-(x-0.7)^2/sx^2-(z-0.8)^2/sz^2)) } n<-500 x<-runif(n)/20;z<-runif(n); xs<-seq(0,1,length=30)/20;zs<-seq(0,1,length=...
I'm reading a book on Deep learning and having trouble in deriving an expression Can someone please explain how to go from equation(20.10) to (20.11)? How summation term is converting into product term?
I have a question on how to interpret Law of Large Numbers. Its meaning seems to me clear when we are in the i.i.d. case: Consider $(Y_i)_{i=1}^n$ i.i.d. random variables with $\mu\equiv E(Y_1)<\infty$. Then $\frac{1}{n}\sum_{i=1}^n Y_i \rightarrow_p \mu$ I am confused about what represents $\mu$ in the non i.i.d. case...
While trying to train different architectures of Convolutional Neural Networks (CNN) for a binary classification task (part of my undergraduate research, the statistical methods gives only 56% accuracy so I gave CNNs a try), there was a very strange thing: a relatively shallow network outperformed a deeper one! The "sh...
Ideally I would like links to code implementations (eg. Matlab ) or book references, but I would appreciate suggestions on various methods. We start with sampled process $X_{t}$. A straightforward way is through repeated normality tests: a. Test for normality of $X_{t}$ using KS test b. Independence of increments: we...
I need some help understanding my partial dependence plots for features passed to a GradientBoostClassifier when comparing them to the feature importances. For some background, my goal here is to investigate user churn. My classifications are: 0 = not churned, 1 = churned. First of all when I plot the feature importan...
I'm trying to determine if I can plot my dissimilarity matrix (which is a Normalized Information Distance / the "Universal Distance Metric" dissimilarity matrix), in a lower-dimensional space using PCA or MDS (see Wikipedia article here if you are not familiar: https://en.wikipedia.org/wiki/Normalized_compression_dista...
I'm doing a rolling forecast using a fitted arma-garch model, but I'm confused regarding the rolling method, my window length is 1209 obs, and I roll 100 times, and each time I reset my window to discard the first obs and add the next obs (thus from 2nd to 1210th in the second rolling window), and everytime I do a one-...
Consider the classical linear model (1) $Y_i=X_i'\beta+\epsilon_i$ (2) $(Y_i, X_i)_{i=1}^n$ i.i.d. (3) $E(\epsilon_i| X_1,..., X_n)=0$ Could you help me to show step by step that (1), $(Y_i, X_i)_{i=1}^n$ mutually independent, (3) $\Rightarrow$ $E(\epsilon_i|X_i)=0$ Could you help me to show step by step that (1), $(...
I have to get a regression model for a dataset, and it seems that the best fit is obtained by log transforming the outcome, so that I simply applied the least squares on the trasformed response vector. $ \hat{log}({Y}) = \hat{f}(\bf{X}) = \hat\beta_0 + \bf{\hat\beta}^TX$ A prediction with this model estimates $E[log(Y...
The task: I need to calculate a one-sample t-test to see if the mean of a vector of values differs significantly from zero. Data: The dataset consist of about 25 such vectors, each with a length of 19 (counts collected at different points in time). So there's the small sample problem, but additionally, some data from ...
I'm doing an analysis where I've been able to assemble the following information about a population, its overall conversion rate (so, the percent of the members of that population who go on to make a purchase), and the conversion rate of one particular subset of the population. What I want to know is, how can I find th...
I need to choose a model for unsupervised machine learning problem. There are 4 clusters in 3D space. These are my requirements: I will run the same model multiple times with different training data (it is for real-time application). Size of training data is expected to be around 400 points. I can assume that points f...
consider a hypothetical regression analysis of finding the relationship among TV advertisement spending, Online advertisement spending, and sales. If we were to do simple linear regression with either TV or Online budget as the independent variable and sales and the outcome, we would see a statistically significant reg...
In this answer https://stats.stackexchange.com/a/279111/151862 Glen_b says The reason is that the d.f. parameter [of a t distribution] is very hard to estimate well from data, particularly if you're also estimating the scale parameter. Indeed you can often end up with either silly estimates or unstable estimates...
I am writing to ask "can the concept of a correlation coefficient be generalized, such that all the types of correlation coefficients commonly used (pearson, spearman's etc) are specific cases of it." Or, alternatively, can certain correlation coefficients be generalized if others are not included? If so, which and why...
Suppose that $K>2$ denote the number of classes and $Y$ be the class label that follows the logistic regression model for a given $X \in \mathbb{R}^d$ as follows: $$ P(Y=k|X)= \frac{e^{\beta_k^\top X}}{1+\sum_{i=1}^{K-1} e^{\beta_i^\top X}}, \quad k=1,\ldots,K-1 \\ P(Y=K|X)=\frac{1}{1+\sum_{i=1}^{K-1} e^{\beta_i^\top X...
In trying to answer a question here on Cross Validated, I was re-reading Section 3.2.3, specifically Algorithm 3.1 from Elements of Statistical Learning. What I followed from this is that, given a model with one dependent variable and two independent variables, $Y = \beta_0 + \beta_1X_1 + \beta_2X_2 + \epsilon$ then th...
It appears the solutions to my problem are the Binomial Coefficients, as seen above Suppose a combination lock with 2 dials exists, where each dial has 2 settings (for example, 0 and 1, but any two distinct numbers could capture two distinct settings). It has, of course, 2 x 2 unique settings. However, suppose the l...
Coming from a machine learning background, I have long held the idea -throw in all variables and let regularization and cross validation fight against over-fitting. The reason I am posting this arises from a recent study using principal component regression. Intuitively, increasing the PCR parameter (% of variance to ...
I'm looking to test for set enrichment and I'm wondering whether a fisher's exact test or hypergeometric test is more appropriate (and, if there isn't a straightforward answer, what the relative merits are). To lay out an example problem, I have a set of 400 objects, 150 of which belong to class A. I draw 50 objects, ...
Let $X_1, X_2,...X_n$ be independent Poisson with parameters $\theta_1, \theta_2..\theta_n$. Let $G=\sum_{i=1}^r X_i$ and $H=\sum_{j=1}^n X_j$ with $r<n$. I'm interested in getting the conditional probability $P(G=t|H=u), t \leq u$ I know that both $H$ and $G$ are Poisson with parameters equal to the sums of the parame...
I have 199 data, 77-diagnosed and 122-healthy. Each data has 12076 feature (gene expression). When I split data into train and test (N/2 for train and N/2 for test) and run feature selection on train-data and select best features and then run the same feature selection on all the data and select features, the selected ...
We have a set of intensities (measured) $I_{j} = \cos(\theta_{j}) + N_j$ where $\theta_{j}$ is distributed according to some distribution between 0 and 180 degrees (well, in reality between 0 and 360 but because of cos() we can't tell them apart) and $N_j$ is some noise (possibly weakly dependent on $\theta_{j}$). Fr...
Five numbers are selected without replacement from 1 to 10. The PMF of the $M$, the maximum of the 5 is desired. My approach is as follows: If I let $X_1,X_2, X_3,X_4,X_5$ be the variables representing the 5 numbers, $P(X_1\leq M)=\frac{M}{10}$ $P(X_2\leq M)=\frac{M-1}{9}$ $P(X_3\leq M)=\frac{M-2}{8}$ $P(X_4\leq M)=\fr...
This is a bit of a strange question, but suppose I have some random variables. $$Y_i \sim Gamma(i,\lambda)$$ Where this comes from the fact that each $Y_i$ is defined as the sum of $i$ independent exponential random variables $$X_i \sim Exp(\lambda)$$ So that, for example, $Y_{i+1} = Y_i + X_{i+1}$. I am interested in...
I'm never sure when to use one-hot encoding for non-ordered categorical variables and when not to. I use it whenever the algorithm uses a distance metric to compute similarity. Can anyone give a general rule of thumb as to what types of algorithms would require non-ordered categorical features to be one-hot-encoded and...
Here's the problem I'm trying to solve: "Calculate the probability of having the disease for a person with a positive test result." The information I have is: True positive percent = 90% False positive percent = 1% Percent of disease in general population = 0.01% I'm getting confused because I'm used to working with co...
I've been going through a data science course, and just came across Vector Space Modeling for representing text documents, and don't fully understand it. I've looked at a few articles, but they are pretty high level, and I am just a lowly python developer looking to gain knowledge of the data science world. In one of m...