instruction
stringlengths
9
38.7k
I had an idea of building a model using machine learning or deep learning in order to perform morphological tagging/labeling on untagged/unlabeled data. I have a lot of tagged/labeled data (about 30,000-40,000 entries), so I thought of creating this model to help the ones that are responsible for it to avoid this task ...
I have I have no experience with gam() but I think this is the right way to model my data. Sample data: tibble [9,286 × 9] (S3: tbl_df/tbl/data.frame) $ Fiscode : Factor w/ 21406 levels "120097","502468",..: 27 31 31 53 53 62 62 62 64 64 ... $ Status : Factor w/ 4 levels "O","E","R","D": 1 1 1 1 1 1 1 1 1 1 ... ...
What are some statistical models or problems that have computationally tractable solutions and are guaranteed to be optimal or near optimal? By computationally tractable, I mean finite time and practical time. For example, a linear model can be fit by computing matrix inverses or optimized via gradient descent. Similar...
I used matchit package for propensity score matching. I got another column under names of "distance", "weights" and "subclass". What I understood is "subclass" is numbering of each pair after propensity score matching. I plan to run paired tests such as McNemar test, so I want to pair each row of data according to "su...
I have made the following DAG in dagitty.net: DAGitty says "The total effect cannot be estimated by covariate adjustment". I don't understand why I can't close the backdoor path by controlling for U.
In deep learning, especially generative models, sometimes we need to add some random noise to the input of model. To make the sampling of random noise learnable (or differentiable), we need to reparameterize the sampling, just like diffusion models do. For example, given x ~ N (μ, σ2), if we sampled x directly, the mea...
I've read the paper A vanilla Rao-Blackwellization of Metropolis-Hastings algorithms, but I don't get what their actually suggested estimator is. To give some detail, we are considering the following setup: Let $(E,\mathcal E,\lambda)$ be a measure space; $p:E\to[0,\infty)$ be $\mathcal E$-measurable with $$c:=\int p\...
I have a couple of time series, say, T1 and T2. I have established (using the grangercausalitytest library of Statsmodels in Python) that T1 Granger-causes T2 at 10% significance for lags 4 and 5. I now want to know whether I can validate the result by using VAR (unrestricted model). Going by the definition of Granger ...
I am looking to perform a SurvSplit of the survival r-package. The difficulty that I have is that I would like to perform the SurvSplit on two matched groups (full Propensity Score Matching). So I have weights and cluster that need to become apparent in the SurvSplit function somewhere. If anyone has another idea, I am...
I want to infer a multinomial mixture model consisting of $K$ components where each component has the same number of trials, denoted as $N$. Such a multinomial mixture model can be written as: $$ \mathsf{M}(x; \pi_{1:K}, p_{1:K}) = \sum_{k = 1}^{K} \pi_{k} \mathrm{Mult}(x; N, p_{k}), $$ where $K$ and $N$ are given, $\p...
I have a set of data samples which have been gathered from an electronic system. The system is in one of two states, which is selected at random before the data sample is collected. For simplicity, let us say that each sample is a single value. I collect thousands (sometimes millions) of data points. My null hypothe...
For one dataset and one response variable, i have run several repetitions (around a 100) of different feature selection methods. (Elastic Net, VSURF + RF, BestSubset ...) For each method, the repetitions were done by repeating the 10-fold process around 10 times on the training dataset. Each feature selection methods a...
I have a question that deals with assessing significant differences in the predictive performance of different machine learning algorithms. I am predicting different variables with different models and different feature selection strategies (using single variables, using single variables with feature selection, using t...
I built a moderated mediation model (Hayes Model 8 with no latent variables) for my research. Is it necessary to report model fit indices (e.g., CFI, Chi-squares) for this kind of research model? If yes, what's the Lavaan syntax for this type of model (Hayes Model 8)?
I'm trying to calculate an odds ratio for a table with very few cases. I've tried epitools oddsratio which I see won't work as the uniroot function error occurs due to dividing by 0. The table is as follows: Outcome Program Yes No X 6 0 Y 9994 10000 I've tried fishers test using epito...
I am using a linear mixed effects model (using lmer) to model the results of an experiment where we have two binary treatment variables A and B, and each participant completes four trials with random combinations of these variables. We are then looking for individual effects of A, B, and the interaction effect of A and...
I'm running a regression model with a binary independent variable X (3 treatment groups, three dummies, 2 dummies included in the regression and the third as reference category) on a continuous dependent variable Y. I have hypothesised a mediation effect via an ordinal mediator M (Likert scale). Which package for media...
There is a certain probability that ANOVA provides negative variance estimates. According to [Searle et al. : Variance components] (https://onlinelibrary.wiley.com/doi/book/10.1002/9780470316856) p67 this probability for one-factor, balanced designs can be described by the following equation: $$ \textrm{Pr}(\hat \sigma...
The harmonic mean between precision and recall (F1 score) is a common metric to evaluate binary classification. It is useful because it strikes a balance between precision (FP) and recall (FN). For some problems, specificity more relevant than precision to measure the FP. In these cases, which metric should be used to ...
Please let me know if the below statement is valid or not ; Suppose that $X$ is an $n\times p$ data matrix with $p$ features and $n$ data samples. Suppose further that each feature(column) is zero centered so that the average of each column is zero. Then, the covariance matrix for $X$ is $\frac1nX^TX$. It's such a si...
Assume we have a sample of size $n$ from an unspecified continuous distribution $F(\cdot)$. We wish to construct a tolerance interval to contain $(100\,\beta)\%$ of the population with a pre-specified confidence level $\gamma$ based on our sample. However, a conventional tolerance interval does not guarantee that the c...
I am trying to feed a neural network information about a stock (100s of features concerning price, MA, volume etc.). To ensure training stability, I normalize the features to have mean of 0.0 and a standard deviation of 1.0. However, I thought that for stock prices, the absolute prices of the instrument would also be r...
I have read that analogous to univariate AR(p) models, there are two possibilities to allow for a non-zero mean with VAR(p) models: a) either use centered variables in the model: Φ(B)(Xt − μ) = Zt b) or include an ‘intercept’ in the regression: Φ(B)Xt = v + Zt Is there any difference in interpretation when using the fi...
The problem is, I have a several silages with several layers of some substance in them (e.g. coal). Each layer has its own physical/chemical properties (concentration of element, X). Concentration of X in each layer is known. Then we get a mixture of masses W from several (known) silos, and get a concentration of that ...
I am trying to implement Soft Actor-Critic with automatic Entropy tuning. The original paper derives the optimal entropy temperature $\alpha$ as follows: $$ \alpha ^* _t = \arg\min_{\alpha_t} \mathbb{E}_{\mathbb{a}_t \sim \pi^* _t} [-\alpha _t \log \pi^* _t (\mathbb{a}_t | \mathbb{s}_t ; \alpha_t ) - \alpha_t \bar{\mat...
Question: How do scale_pos_weight and sample_weight interact in XGBoost when used at the same time during training? Are they multiplied, added or something else? Example when added: Example when multiplied:
I am working with data of vegetation cover (proportions) for different height strata (0-5, 5-15, 15-30, >30 cm, and also bare ground) amongst four different sites and two different time periods (breeding and non breeding season). I want to evaluate the differences between sites (sitio) and seasons (epoca), and went wit...
I've been studying various supervised machine learning algorithms for regression tasks, and I've come across an interesting perspective suggesting all machine learning models could be represented as linear models over a set of transformed features, where the transformations are functions of the original features. Is th...
We tested the preference of animals for two treatments (A/B), with the prediction that the animals would spend a different amount time receiving each treatment. The treatments were applied by two experimenters (1/2) standing in two corners of the enclosure (r/l). To facilitate learning which treatment to expect, each e...
I'm puzzled on how to approach this problem. Let me frame the problem like this: I am looking to predict total sales for Q1 in year 2023. I have only Q1 daily sales data for years 2022, 2021, and 2021. No imputation for missing 3 quarters. I can't put this data in a single series and use ARIMA because of the Gaps. I...
Consider a scalar random variable $X\in\mathbb{R}$, a vector random variable $Y\in\mathbb{R}^n$ and a constant (non-random) vector $\alpha\in\mathbb{R}^n$. I want to compute $$ \mathbb{V}[X + \alpha^\top Y] $$ but I can't find any material on this. I have checked here and in various lecture notes. Attempt $$ \begin{ali...
Why the clusters assigned with k-means are sometimes different with respect to fanny? ## Data mtcars[2:7] # Code k3<-kmeans(mtcars[2:7],3) mtcars$clusterkmeans<-k3$cluster g3<-fanny(mtcars[2:7],memb.exp = 1.2,k=3) mtcars$clusterfanny<-g3$clustering ## Result print(mtcars)
I have a distributed fusion scenario with a single target where two sensor nodes $i,j$ estimate the true state $\mathbf{x}$ using a local Kalman filter. The (linear, Gaussian) measurement errors of both the nodes can be assumed to be indpendent. The local estimates $(\mathbf{x}_i, \mathbf{P}_i)$, $(\mathbf{x}_j, \mathb...
I am attempting to train an HMM on a series of sequences but the resulting prediction of the hidden states returns no change over the time series. My dataset is structured where the state begins in a certain state and at a certain point in each series, transitions to the other state. I have defined the state for each o...
I am a little puzzled by this - hope you will give this a shot! I am looking for a way to get prediction intervals from an ordered logit model (polr()). The regression I am using is: reg<-polr(satisfaction~ X1 + C2 + C3,...), where X1 is continuous and C2&3 are categorical variables with 2 and 5 categories respectively...
I am currently learning about the linear SVM in the non-separable case. In the dual representation, we introduce the Lagrange multipliers μk and αk (see also this source: https://machinelearningmastery.com/method-of-lagrange-multipliers-the-theory-behind-support-vector-machines-part-2-the-non-separable-case/). Both my ...
I'm very new to Machine Learning, so please forgive the simplicity here. It's probably because I'm new to this, but I can't seem to find anything relevant enough online to help here. I have data on laptops, phones, and printers like this: Manufacturer, Model Name, Model Id, (and a few others). For Example: Dell, Latitu...
To train a deep learning model, for converting speech to text, we need labeled data. How should this data be arranged? I can think of several approaches, and I don't know which approach has already been tried in the world, and which has not yet, and which approach was successful and which was less so. Here are the appr...
Is there a measure for model complexity? For given units of this measure how many examples do we need to train a network to get the model right and generalize? In essence what is the relation between model complexity, number of training examples and network size?
Background I have a panel of binary response data - I have a different cross section of individuals each month, across many months, and the outcome is 0 or 1. When fitting a logistic regression that does not allow for time-variation in the intercept, the time-series of residuals appear to be highly autocorrelated. Ther...
I’m running a first-order differenced regression in Stata estimating the effect of the Covid-pandemic (categorical with 4 levels; 0 - 3) on the natural log of reported crime (continuous) on 290 panels. T = 58, monthly measures. All of my predictors are multi-leveled categorical variables and two of them vary by time (t...
Let $$Y =\begin{pmatrix} Y_1 \\ Y_2 \end{pmatrix} \sim N(0, \Sigma) \quad \Sigma=\begin{pmatrix} \sigma_{11} & \sigma_{12}\\ \sigma_{21} & \sigma_{22} \end{pmatrix}$$ Show that $$\mathbb E(Y_1^2Y_2^2)=\sigma_{11}\sigma_{22} + 2\sigma_{12}^2. $$ I tried to turn this in all the ways but I need $\mathbb {Var}(Y_1Y_2)$ tha...
I'm currently analyzing the age variable in a dataset of all italian phyisicians (~470,000 obs) and I'm trying to check if age is significantly different between three groups defined by another variable (job). There are 34,348 obs for job 1, 6,404 obs for job 2 and 432,963 for job 3. First idea was to use the Oneway AN...
I am following this article on Understanding the Kalman filter by Meinhold, and I can understand all the derivation up until equation (4.4). However, I cannot understand how they arrive at the posterior estimates of $\theta_t$ conditioned on the error term and data $Y_{t-1}$. How is this derived?
I'm confused by the notation in Flexible Imputation of Missing Data. It seems to be saying that the influx is a function of the variable indexed by j (column number), as indicated by the LHS of the equation below. On the RHS though, j is used as the index in a summation? I would think that to compute I_j, you would fix...
When confidence intervals are referenced in the regression context, I often see them mentioned (generally speaking) as "of the slope of the regression line," or as "of the regression line." Is there a meaningful difference between these two descriptions? The latter seems more precise, as it accounts for uncertainty wit...
I am developing a proposal for an RCT. The IV/treatment has two levels - active control Vs experimental treatment. I plan on measuring EEG ERP baselines as predictor variables for treatment response. Treatment response will be measured by four dependent variables: pre and post treatment PANSS and MCCB scores. I am unsu...
Let $\xi_{n}$ be a symmetric random walk, i.e, $\xi_{n}=\eta_{1}+\eta_{2}+\ldots+\eta_{n}$ where $\eta_{1},\ldots$ is a sequence of independent identically distributed random variables such that $P\{\eta_{n}=1\}=P\{\eta_{n}=-1\}=\frac{1}{2}$. Show that $\xi_{n}^2-n$ is a martingale with respect to the filtration $\mat...
The following is the definition representative of the definitions if you google the difference between the one-way and two-way table: Sometimes we talk about data tables in terms of independent and dependent variables. In the case of one-way data, we had one independent variable, called the individuals, and one or more...
I did ANN classification on training data with oversampling and without oversampling. For each data, the smallest validation loss is sought with trial and error of 18 models. In the data without oversampling, the best model is obtained in the 7th model with a validation loss of 0.2122. on data with oversampling, the be...
I am reading Elements of Causal Inference by Peters et al. On page 36 they are giving an example with the following SCM: $$T := N_T$$ $$B := T\cdot N_B + (1 - T)\cdot(1 - N_B)$$ On the equation 3.6, when talking about counterfactuals, they condition the SCM $\mathfrak{C}$ on $\mathfrak{C} | B=1, T=1$, with the SCM beco...
Suppose that X is from the density $$ f(x, \lambda, \mu)=(\lambda / C) e^{-\lambda^4(x-\mu)^4}, \quad \text { for all } \quad x \in \mathbb{R}, \quad C=\frac{1}{2} \Gamma(1 / 4) $$ where $\theta=(\lambda, \mu) \in(0, \infty) \times \mathbb{R}$ is unknown. How would I calculate $E(X)$ and $E(X^2)$? This seems ugly to so...
I made this RCT survey to test whether any change of information presented/attached to a secondhand product might change the customer’s willingness to pay on higher price level. Control group (limited information): n=253 Treatment 1 (adding information on extrinsic value of the produce): n=286 Treatment 2 (adding infor...
I start learning Q learning algorithm. However, I can not understand which is the correct equation for q learning. I found different equation from different sources. Source 1 Reinforcement Learning with Q tables Source 2 Q-learning Source 3 What Is Q-Learning: The Best Guide To Understand Q-Learning I would like to kno...
I have 2 time series, say for instance, T1 and T2. T1 granger causes T2 at lag 2. Should this mean that if I make a VAR model with these two time series, and an autoregression model with just T2, the RMSE from the former should necessarily be lesser than the latter?
I am looking at cancer patient survival and want to know how long-term survival is after already having survived some time. I am more familiar with conventional conditional survival, but have recently seen in SEER*Stat a function called "Left truncated life table session". Would it be suitable to use left truncated lif...
I am trying to find the correlation between several clinical observations/demographic characteristics and the presence of certain electroencephalographic (EEG) features. The EEG features are my dependent variables. My problem is that some patients have repeated measures while some don't (anywhere from 8 to 1 measuremen...
Assuming the following scenario: There are N samples with M continuous features each (N < M). Each sample gets measured twice. One of the measurements is correct, the other one is uncorrelated with the true values. It is i.i.d. if the first or second measurement is correct for each sample. Each sample is also associate...
I am learning SVM. I have 2 questions in mind. First, what criteria use SVM to stop training? when I search for SVM tutorials, I found some. But, in all of them, training is done for example for 1000 iteration. But in sklearn, there is no limit for it. Still, SVM in sklearn perform much faster and sooner its over. How ...
I've got the following data with a logistic regression model # data score_dicho score <lgl> <dbl> 1 FALSE 175 2 FALSE 175 3 FALSE 175 4 FALSE 175 5 FALSE 189 6 FALSE 189 7 FALSE 189 8 FALSE 189 9 FALSE 210 10 FALSE 210 ...
After multiple imputation (imputed dataset = 20), I would like to conduct Bayesian Model Estimation with Adaptive Metropolis Hastings Sampling (amh) -- using the MCMC method. How can I pool the results together to obtain the following: Parameter Summary (Marginal MAP estimation) parameter MAP SD Q2.5 Q97.5 Rhat...
I am using Bayesian MCMC estimation methods for GARCH models and I want to check, if model residuals are uncorrelated. In classical frequentist approach, one would use standard Ljung-Box test to check this. But with MCMC estimation, I have 10,000 volatility samples (so 10,000 residuals) for each observation. So is ther...
I have this dataset about an airline company customers with 22 explanatory variables. My goal is to perform some sort of customer segmentation with the k-means algorithm. One problem that I've found is that when applied on the whole dataset, I find it difficult to identify well-separated and balanced group. For this re...
Say user 1 entered the raffle 18 times (18 tickets) and he had ticket ids [0, 2, 3, 4, 8, 9, 14, 16, 27, 28, 30, 31, 32, 33] (so they acquired the first ticket, missed the second (2nd hour ticket) then acquired the 3rd 4th missed ticket 5 through 7...and so on) Now say user 2 had the exact ticket set as user1, they a...
Let $X_n$ by a random variable that converges in distribution to $X$. On the top of that, $$\lim _{n \rightarrow \infty} E[X_n] = E[X] = O(1).$$ Does it implies that for every $n$ $$ E[X_n] < \infty? $$
I am struggling to get the correct answer for the simple calculation of convolution in R. The convolution of $f(t) = e^{-t}$ and $g(t) = \sin(t)$ is: $$ (f * g)(t) = 1/2 \left( e^{-t} + \sin(t) - \cos(t) \right) $$ Source: page 12 of https://users.math.msu.edu/users/gnagy/teaching/12-spring/mth235/w09-235-p.pdf In R, c...
I have a multi-class classifier ANN with ~11000 input features, two hidden layers and a softmax output. I would like to know which features are most important to drive the network towards predicting one class vs another. I have seen saliency maps used to define per-class pixel importance in convolutional networks that ...
Let $X_{11},...,X_{1n}\sim \mathcal{N}(\mu_1,\sigma^2)$ and $X_{21},...,X_{2n}\sim \mathcal{n}(\mu_2,\sigma^2)$ be iid distributed and such that $\{X_{i1}\}$ are independent from $\{X_{i2}\}$ and $\sigma^2$ is known. Now we consider the region $$R=\{(\mu_1,\mu_2): \frac{n}{\sigma^2}\left((\bar X_1-\mu_1)^2+(\bar X_2-\...
I am getting into survival analysis and am a bit confused about the definition of hazard ratio and odds ratios. This question implies that there is a clear difference between hazard ratios and odds ratios and that it is not straightforward to compute odds ratios from hazard ratios. Now, I found the paper of Heimer (201...
I'm confused about problems where we calculate a PDF conditioned on an event. Consider this simple problem: We have two random variables, X and Y, X is uniformly distributed on [a,b], and Y is uniform on [a,X]. We want to find the PDF of f(x|Y>y'). What's the best approach to calculate this? An approach that comes to m...
To expand on the issue I'm having a bit: I am trying to build a latent class model. The dataset I am working with contains some scales related to shopping habits, plus several demographic items (age, race, income, etc.). When I try to build the model with all variables added, it cannot converge. I am able to get conver...
The goal is to predict whether an employee will leave the company: yes or no. I have a dataframe with information about employees. There are 30 independent features and one dependent feature (Left: Yes or No). This data is gathered over a time frame of one year. Now, I also have data about which employees worked on the...
How to find cointegrating vectors and how many vectors could there be if $e_t\ $, $p_t\ $ and $p_t^\ast\ $ are cointegrated? $ e_t\ =\ p_t\ -\ p_t^\ast\ +\ v_t $ $ p_t\ =\ p_{t-1}+\ u_{2t} $ $ p_t^\ast\ =\ p_{t-1}+\ u_{1t} $ $ v_t\sim iid(0,\sigma_v), u_{it}\sim I\left(0\right)$ for $i=1,2$. Solution: $ A^\prime z\ =\...
I have the following data. I want to know which distribution best fits the data. First, I tried to check it using the Cullen and Frey graph, here are the results: > library(fitdistrplus) > descdist(respm, discrete = FALSE, boot = 500) However, from these results I am still confused about which distribution is suitabl...
Let me take $Z\sim \mathcal{N}(0,1)$. Then I know that $Z^2\sim \chi^2_1$. Now I want to show that the quantiles $\left(z_{1-\frac{\alpha}{2}}\right)^2=\chi_{1,1-\alpha}^2$ are equal. We know by definition that $\Bbb{P}(Z^2>\chi^2_{1,1-\alpha})=1-(1-\alpha)=\alpha$. Thus we deduce by taking the square root that $\alp...
I saw this and wondered if there are more applications of p-adics in stats and probability that do not zoom in on deep boltzman machines... something more general. Further, non-Kolmogorov interpretations of probability were discussed in this paper. I am just putting out feelers to get a sense of the interesting interse...
If I have two factors - 'A' and 'B'. Each factor has three levels (A1,A2,A3,B1,B2,B3). If I have already performed t-test for each pair such as (A1,A2). All result suggest no significant difference. Do I need to perform ANOVA and even post-hoc test? From my opinion, the correction of post-hoc is used to minimize type I...
I have a data set where soil was sampled in a given area. The area has a pond in the center, and the pond area soil was sampled at a much higher rate than the other soil in the area. Certain constituents are more abundant near the water, so summary statistics tell an inflated story of the soil values in the area. I wan...
I have a dataset with medical images. I want to implement a network for super-resolution using GANs. One of the criteria of the optimisation is a perceptual loss. For that I will use a pretrained vgg network, trained on imagenet solely to extract features. Essentially, this vgg network is used as a feature extractor. I...
What are the differences between Bayesian optimization and multi-armed bandit optimization? Are the problems equivalent when multi-armed bandit's action space is infinite?
I want to compare two data samples which come from continuous distributions. However, the data is highly skewed and t-test is obviously not a choice. As an alternative, I wanted to use the MWW test for locational shift, but one of the assumptions is that the distributions of the groups should be similar, but in my case...
I am trying to understand what the black point, thicker horizontal bar, and thinner horizontal bar mean when I use the stat_halfeye() function. I can't find it on the package website. I'm pasting an example from my data below.
Is it a reasonable approach to train a probabilities classifier by optimizing a threshold-independent metric such as AUC, and then using the trained classifier to calibrate the decision threshold value on a train/validation (which used to choose the trained classifer's hyperparameters values)or both, to maximize a thre...
Three random variables, $X_1$, $X_2$, and $X_3$, are complex Gaussian with a correlation matrix $\Sigma$. Additionally, three random variables, $Y_1$, $Y_2$, and $Y_3$, are also complex Gaussian with a correlation matrix $\Sigma$. Furthermore, the correlation between $(X_1, Y_1)$, $(X_2, Y_2)$, and $(X_3, Y_3)$ is $\rh...
I am currently conducting a study using spatial occupancy models. To select the most predictive model, I am employing a k-fold cross-validation approach. I am aware of the potential pitfalls of over-parametrization, such as overfitting, and decreased interpretability. However, I am still uncertain about how to quantify...
I am doing hypothesis test on the data to compare group A and B and there are multiple variables that I tested. Due to the distribution of some of these variables is skewed and there are some extreme outliers, I used non-parametric approach, i.e., Mann-Whitney U test. I would like to include the table as follows. S...
For the truncated normal distribution below: $$ {f_X(x; σ, a, b)} = \frac{1}{\sigma}\frac{φ(\frac{x-µ}{σ})}{Φ(\frac{b-µ}{σ})-Φ(\frac{a-µ}{σ})} $$ $$ a = 1; b = ∞; σ = 2 $$ I need to calculate the expected value of X for the general µ and for when µ = 2. I understand that φ and Φ represent the pdf and CDF of a standard ...
Question I am struggling with understanding how to run a simulated power analysis for GAMMs. Though my planned studies will include more variables, the core issue I'm trying to work out is to simulate the following: A binary outcome y. However, since I don't know how to correlate y here, I have opted to just use a Gau...
I am fitting a second order growth model with 7 time points on Mplus. When I estimate the model with autocorrelated residuals in it the model will not run because of identification issues. (when I remove the code for autocorrelated residuals it runs, so it is about sample size, I suppose) I want to know how not account...
I know that as long as the population moments exist and the data are identically distributed the raw sample moments, the central sample moments and the sample quantiles are consistent. This concept of consistency also carries over to functions of random variables. If g is continuous in a and h in (a,b). Now I am tryin...
I want to implement a neural network in Pytorch for medical image segmentation. I should normalise my data. Should I apply a min-max scale (range 0 to 1) before applying the normalisation or should I apply the z-score normalisation directly? What is the best approach if the dataset comes from a single source of data? ...
Does the least squares method for regression assume that the regressors and response are continuous? In particular, I would like to fit a regression line for ranks. Can I use the least squares method to estimate the regression parameters? What alternatives do I have if these assumptions are violated? Any references to ...
In econometric analysis in some cases, such as models with interaction terms, multicollinearity between independent variables may exist. In such cases, some researchers suggest "mean-centering" strategy (subtract mean from the variables which appear as main effects and constitute the interaction terms). Usually, in the...
I'm learning about mixed models because in my job we are trying to advise researchers about statistical questions they might have. So long I've been learning using the demidenko mixed model book and the datacamp course on mixed models.. The thing is, I want to explain to my boss why should we use mixed models for neste...
In classical factor model, assume the random vector $X = (X_1, \cdots, X_p)$ has the covariance matrix $\Sigma$, we want to write $X$ in the form $X = LF + e$, the assumptions are $Var(F) = I_r, Cov(F, e) = 0, Var(e) = \text{diag}(\sigma_1^2, \cdots, \sigma_p^2)$. To solve the classical factor model, we need to find th...
Imagine that I have one variable from a 7-point Likert item, and my predictor is a categorical variable with three levels. Imagine that my sample size is 100. Can I run a linear regression lm(ordinal_var ~ categorical_pred), or should I use something like a cumulative ordinal analysis? What if my sample size is 10,000?...
Let $X_t = C \cos(2πw t) + D \sin(2πwt) + U_t$ where $C, D$ and $U_t$ are Gaussian random variables with unit variance, and where all the variables are independent, and $U_t$ is white noise. Determine the integrated spectrum associated with $X_t$. I first found the autocovariance that is $$\gamma(\tau)=\cos(2 \pi w \ta...
We will start a study in order to validate an algorithm for image segmentation for medical use. We will use Dice Sorensen coefficient in order to measure the agreement/ similarity between the algorithm, and medical professionals. Since there doesn't seem to be much published/ in the literature about this, I wanted to a...
I have a dataset consisting of historical journey data where individuals travel from point A to point B. During their journeys, they may encounter varying numbers of animal sightings, including snakes. The dataset includes attributes such as time, attribute_1, attribute_2, attribute_3, attribute_4, and a binary label i...
Trying to apply changepoint detection. Many algorithms such as Binary segmentation and PELT use sigma ( std deviation ) as a parameter if the number of changepoints are unknown. Confused if sigma is std deviation of noise or std deviation of time series data itself. Also is there a formula to calculate it as std deviat...