instruction
stringlengths
9
38.7k
This is a terminological question. Does the phrase "significant majority" have a formal meaning in statistics? I have in mind something like 600 successes in 1000 trials, where the lower bound of the 99.99% confidence interval is greater than 50%. Or is it still just an informal expression meaning "lots more than half"...
In the Quantile Regression model $$y_i=x_i^T\beta + \epsilon_i,\ i=1,2,....,n$$ when the error terms are iid then can we expect that the slope estimates for the conditional mean and quantiles to be almost same. If yes why? $$$$Also if the error terms are iid then can conditional quantiles be estimated by adding the cor...
The residual plots of the following models are not normal, while the distribution of residuals between (-3 to 3) is normal in model m17. The worm plot of all equations appears to be correct. The goal of this project is to calculate the reference equation using the LMS approach. 1. Could you please tell me if the BCCGo ...
Mice were exposed to light for 0, 1, and 4 hours. I have an algorithm that calculates their cell embeddings depending on the duration of exposure. As a result, violin plots of my data look like this: my independent variable (cell embeddings) has negative and positive values. What would be the best way to find if stimu...
Let $A$ be a Borel set of $\mathbb{R}$. Then show that the smallest $\sigma$-field of subsets of $A$ containing the open sets in $A$ is $\{B \in \mathcal{B}(\mathbb{R}) \mid B \subseteq A\}$. I am thinking to use of good sets principle on the set $G = \{B \in \mathcal{B}(\mathbb{R}) \mid B \subseteq A\}.$ and $B$ is bo...
I have a confusing result: independent $X\sim N(0,1)$ and I'm looking for $E(X^2)$: $E(X^2) = E(X \times X)$ $E(X^2) = E(X)\times E(X)$ $E(X^2) = 0 \times 0$ $E(X^2) = 0$ I can also do this: $Var(X) = E(X^2) - E(X)^2$ $E(X^2) = Var(X) + E(X)^2$ $E(X^2) = Var(X) + (0)^2$ $E(X^2) = 1$ Anyone can point out my mistake?
I'm new to statistics and model and currently struggling to understand how to answer the following example question. I'm trying to find out if the abundance of snails on a particular food source is a result of a preference for that food source, or the prevalence. Or more simply, do snails display a significant preferen...
I am currently working on determining the errors associated with a least-squares fit for powder X-ray diffraction data analysis. I am utilizing the numpy.linalg.lstsq function to accomplish this task. The system of equations for my case is presented below. The goal of this analysis is to determine the lattice parameter...
I have the following statistics of two independent populations: First population: size: 3830 mean: 119240 percentile 10: 61750 percentile 25: 79930 median: 118250 percentile 75: 145950 percentile 90: 174840 Second population: size: 5290 mean: 153180 percentile 10: 81180 percentile 25: 124860 median: 159310 percentile ...
Beginning with definitions of Aleatoric and Epistemic Uncertainty from this paper: Aleatoric: Aleatoric uncertainty refers to the intrinsic uncertainty of a particular system and the observed data. It arises due to the intrinsic and irreducible stochastic variability in the data-generating process. Aleatoric uncertaint...
I am new to ML, so please pardon my ignorance. I have 12 features (left), and the column headers are different feature selection methods. Dark green indicates the a stronger predictor while white indicates a weaker predictor (I think for Fisher scores, a lower index corresponds to a better rank and thus a better predic...
For disjoint events A and B, P(A or B)=P(A)+P(B). This is called the addition rule for disjoint events and it generalizes to more events as long as they are all disjoint. But something is bothering me. What if A is getting heads on a coin flip, and B is getting a 2 on a die roll, C is getting a heart from drawing a car...
I am calculating the variance for an estimator which is a function of a random sample $X_1, \dots, X_n$. However, if $n=1$, then $E(\theta^2) = \infty$ and the variance is infinite. Can I assume $n > 1$ due to the random sample definition $X_1, \dots, X_n$ or does this also include the random sample of {$X_1$}?
I am comparing different traits within the plant populations and looking for sex differences across ages. A trivial example is outlined below. Male plants are in blue, female plants in red. x-axis has age in days and y-axis has height of the plants. If I want to test for significant height difference across age between...
I am looking at the difference in flow rate on composition of coarse matter. I have set flow rate into two categories. Above and below 3700 L/s. I have raw data that consists (grams of matter for composition) for each flow rate, which I have converted to percentages. ex Data: Flowrate wood algae leav...
I am studying the Moment Generating Functions of discrete random variables and I got an exercise asking to derive the mgf of a Bernoulli variable and its expected value. I start from the definition of mgf: $$ M_{X}(t) = E[e^{tX}] = [e^{t\cdot 0} \cdot q + e^{t\cdot 1} \cdot p] = q + e^{t}p \stackrel{\text{t=0}}{=} q + ...
I'm trying to simulate a dataset with random effects. But I'm not sure how to estimate nested variance and relation between nested effects and the sub-effects within. My question (based on the glmer model, I know in linear model, the variance is not correctly specified may go to the residual): if there are nested effe...
I have a piece of closed-source software that plays music. I am trying to determine how it shuffles a playlist. Standard empirical tests suggest that it does not simply choose one of the $n$ songs uniformly at random each time; it uses some method to reduce repetitions. I hypothesize that the software uses the followin...
I have approximately 1000 different time series each with a single variable, of length ranging from 5 to 500 periods. They are all independent of each other, and each series can be treated as being generated from the same series generator. The series are stationary. Another way of describing the multiple time series is...
I am trying to replicate sklearn's linear regression coefficients and r2 score with an online calculation (so that it updates with each additional point of data). Starting with this code here. class SimpleLinearRegressor(): def __init__(self): self.dots = np.zeros(5) self.intercept = N...
I'm working on a cold start system for a recommender system - Whenever I have a new item, I need to show it to users enough times to get a somewhat accurate estimate of CTR, and then I will let the ML model score these items once CTR is estimated. I am trying to find the minimum number of times I need to show the item ...
I have seven names and two raffles. One person is unable to make the first drawing how do I ensure they get equal odds without lowering everyone else? For instance of on the first drawing the following names are put in along with their probability. Jack has stars since he won the drawing. *Jack = 1/6* Craig =1/6 Dillon...
Suppose I have a dataset, and I want to use it to analyse the association between BMI and stroke. The dataset has some missingness for BMI(independent variable) and some missingness for covariates such as blood pressure. There are many complete covariates and suppose the dataset could be imputed. My question is whether...
When we are talkng about a binomial distribution I can understand the meaning of np (that it is the mean), cause we assign a "absolute value", for what it is a "relative value", (the probability of succes, 0 to 1.00) but when we are referring to the equation of variance npq = variance. Is there a way to interpret "pq",...
Today our professor was discussing Sutradhar, Gu and Paszat (2016). In this paper the authors decided to study the relationships between patient characteristics and following the "advice" of their doctors. While reading this paper, I noticed (e.g., Page 4) that variables such as "Age" and "Neighborhood Income" are bin...
First of all, definitionally speaking, linear regressions tend to underfit (have high bias, low variance). Additionally, just intuitively speaking, it seems like a linear regression would underfit in this situation. But the answer seems to be overfit. Eg. If i have a dataset of only 3 points (clearly not enough), and i...
First the definition. Cross validation: With only the training dataset, we estimate what the test error would be. Obviously we want to do whatever we can to get the lowest test error. However, which of the following are we actually cross validating in this process? Feature selection within a model (eg. which features ...
I am relatively new to both R and bootstrapping. My data set consists of a large number of variables, with the aim of generating a logistic regression model to predict a binary yes/no outcome. As an example, I have created a 7-parameter model for which I am looking to bootstrap for a means of internal validation using ...
I have a dataset consisting of variable length sequences: There are about 5000 instances. Each instance is a variable length sequence. The shortest sequence has a length of 2 and the longest sequence has a length of 64. An example sequence looks something like this: ["31A354", "42C164", "39A200", "33B126", "33A443"]. T...
Today, I was looking at the National Census data in my country. In my country, we have something very similar to "States" (Divisions) and "ZIP Codes" (Subdivisions). During the Census, data is collected from each Subdivision and - for example, based on a 20% random sample in each Subdivision, information is collected s...
I oriented at this explanation of interpreting statistical outcomes: http://www.princeton.edu/~otorres/Stata/ ln(Y)=B0 + B1*X + u ~ A change in X by one unit (∆X=1) is associated with a (exp(B1) - 1)*100 % change in Y I a regression output Y, which originally is denoted in percent. For the regression I transformed the ...
I have two general questions regarding interactions in a Cox regression. I have a hypothesis that marker X has different effect in groups G. The interaction self and the marker are insignificant. When the interaction is dropped, the effect of a marker is significant. How legitimate is it in statistics in general to dr...
Datasets in the natural sciences often contain data that has been processed from raw measurements into features accompanied by a measurement of uncertainty, for example a standard deviation. So we don't just assume that our input measurements are noisy, but instead have actual information about how noisy the input feat...
The Wilcoxon-Mann-Whitney test requires that two distributions are symmetrical How can I check this assumption by using a hypothesis test and how apply it in R? If this assumption is not met what test should I use rather than the Wilcoxon-Mann-Whitney test?
The question comes from section 5.5.1 of "Pattern Recognition and Machine Learning" by Christopher M. Bishop. After giving linear transformation equations needed for network weights, the book says: If we train one network using the original data and one network using data for which the input and/or target variables ar...
In a cohort study we are studying disease X with subtypes A, B, C. When one of these subtypes occurs, the occurrence other subtypes is precluded, therefore I have ran a competing risk regression with competing risk for death and for the other subtypes of the disease. Now we want to use the cumulative incidence function...
In DBSCAN the border points are points in the eps-neighborhood of a core point. But what if a point has distance exactly equal to Epsilon from a core point? Is it considered inside the eps radius, or not? Is it in the neighborhood of that core point, or not? To be clearer, if distance = eps, is the point a border of th...
I am running a hierarchical logistic regression analysis using multiply imputed data in R (using the mice and miceafter packages). I am unable to get the odds ratio and 95% CI per variable adjusted for all other variables. Here is what I have done so far: Model1 <- with(imp, glm(complaints ~ Sex + Age + Education, fami...
I'm trying to figure out if my data follows a normal distribution and if it contains outliers. I have plotted the histogram and now I would like to plot the quantile-quantile (Q-Q) plot. My point is, I'm using a qq plot from statsmodel library in Python (statsmodels.graphics.gofplots.qqplot) and there are four options ...
The t-test statistic is derived from the CLT and allows for some probabilistic statements to be made. $$ U_1 = n_1(n_1+1)/2 + n_1 n_2 - R_1 .$$ I know the test does not assume a probability distribution; though, I was wondering where this formula came from, why it is defined in this way and how we are able to make prob...
I am trying to fit an inhomogenious, reinforced Poisson process to time series data using maximum likelihood estimation. The inhomogenious rate is $$ \lambda = \alpha \cdot f(t,\theta) \cdot (m +n).$$ where n is the number of observed events until time t, f is an aging (decaying) function and m,$\alpha$ and $\theta$ ar...
I have been working with beta-bernoulli posteriors recently. Is it true that if $X,Y$ are independent rvs with $X \sim Beta(a_1+1,b_1+1)$ and $Y \sim Beta(a_2+1,b_2+1)$ then $\mathbb{P}(X>Y)>0.5$ iff $\frac{a_1}{a_1+b_1}>\frac{a_2}{a_2+b_2}$? $a_1,a_2,b_1,b_2$ are assumed to be whole numbers. This makes intuitive sense...
I am trying to think of a math appropriate way to describe the “real” talent of a team. This stems from looking at the probabilities of each team winning the Super Bowl. Let me illustrate with a simple example. Assume there are only 4 teams in the playoffs, and to keep things simple, three of them (Steelers, Browns, R...
Say I have a reinforcement learning environment with a reward function $f$, and hypothesizing that there is a single best policy, can we state that the final policy is the same for all the functions in the class: $$ r = c \cdot f,\,\,\,\, c \in \mathbb{R+}\\ or\\ r = c + f,\,\,\,\, c \in \mathbb{R} $$ Example: given a ...
I am learning how to use PyMC for Bayesian inference. I coded up a random intercept $Y = \gamma + \sum_{j=1}^3 \beta_j \mathbb{I}_j + \epsilon$ and looked at the trace plots. Here is a graphviz visualization of the model's structure. Out of curiosity I tried kind="rank_bars" in arviz.plot_trace. Here is the output. A...
I am currently trying to run a binomial GLM to investigate the influence of temperature (factor: 5 levels 20, 23, 26, 29, 32 degrees Celsius) and species (factor: 2 levels HA and AP) on the likelihood of individuals moving from one life-stage to the next. Below is my model for the number of individuals moving from the ...
Let's say we have a single treated group A, and then two reference groups B and C. The two reference groups differ systematically in their distribution of one or more baseline covariates (which are correlated with the outcome). Because the ATT is the treatment effect with respect to the distribution of baseline covaria...
I'm currently working on a predator prey simulation and have to parameters that are codependent, the attack rate and the survival rate. The attack rate is mutated within the simulation and determines the survival rate in the following way: A high attack rate implies a more risky way of hunting, which concludes to a lo...
I have been able to apply GAMs to healthcare utilization forecasting problems with great success thanks to blog posts like this one and others from the ever-helpful Gavin Simpson and Simon Wood. I have a cluster of questions stemming from the inability of the corARMA() class to model autocorrelation at multiple levels ...
I have been given the coefficient values for beta_1Vienna = -0.31 with a standard error of 0.038 and beta_2Amsterdam = -0.27 with a standard error of 0.040. To calculate it I used the formula in the picture, which gave me a t-value of 20, but this would mean I should reject the null, while my professor says to accept i...
I used spearman correlations to test associations between relative abundances (percentages of each microbe present in each sample) of certain microbes and continuous variables. Many people have zero percent of certain microbes which is normal for the microbiome. What type of regression can I use to follow up on the spe...
I am working on Pearson Correlations and for each individual I have at least one missing data point. When I create the correlation matrix in R, I get NAs for each individual where a variable is missing. Is there a way to address that or a way around it? Is only using complete cases the appropriate choice? Or replacing ...
Observational causal models such as causal forest and orthogonal/double machine learning requires the unconfoundedness assumption, i.e. there's no hidden confounders affecting both the treatments and the outcomes. To me, this seems a strong assumption to have in real world application. I feel that the best one could cl...
I'm trying to make the loss used in DreamBooth paper explicit, writing it in terms of the noise, as it is commonly written in the original diffusion article [1], instead of the image reconstruction loss that is written in the paper. The authors use Imagen text-to-image diffusion model, and the finetuning process is des...
I am trying to calculate the number of unique permutations for a PERMANOVA using the R adonis2 function but I am getting stuck on defining my permutation scheme. As suggested here I am using the numPerms function from the permute package to get the answer. However, I am getting stuck with how it works, even in simpler ...
I'm struggling to interpret my SEM results and extract the "regression equation" that generates yhat. Using lavaan in R, this is my model that I want to estimate. sem_tpb <- ' # Latents Att_x =~ ATT_good_100 + ATT_important_100 + self_1_100 + self_2_100 + ATT_useful_100 PBC_x =~ PBC_time_100...
Let me try to clarify what I mean by that: When using for example the Q-Learning method to train a neural network, the network learns how to pick the best 'action' based on its inputs, meaning that you will always interpret each output of your neural network as one category that can be selected (usually picking the max...
I have survey data on political beliefs that I'd like to estimate latent ideology with. Survey questions are binary agree/disagree responses. However, respondents can repeat the survey and skip any questions they want. As a result, I have variation across individuals in how many responses I have and which questions wer...
I am analyzing effects for two different populations ('group membership') where each subject provided repeated measures. I would like to have the subject as a random effect given repeated measures, but subject-level intercept and slope may be influenced by the fixed-effect group membership, and so I would like the rand...
I want to understand what would be the best statistical model to use if I'm comparing students basis their metrics that carry a certain weightage. Details are as below Metric (Weightage) % of assignments completed (10%) - format (%) % feedback received from teachers (10%) - format (%) number of assignments completed ...
I have a large dataset containing country names and names of musicians like this, with more than 50.000 rows: Country Musician australia Jimmy Barnes australia Grinspoon england Giles united states of america Bob Dylan united states of america Hamlet united states of america Rick Astley sweden Judit...
We have been assessing the prognostic utility of MRI markers in a patient population. I identified markers-of-interest based on Cox regression analysis. Each marker had aHR of 5.5, 3.7, 2.8, etc, which were adjusted for the same co-variates (ie. age, sex,...) run separately. I ran a collinearity test, and they are co-l...
I've collected data from 4 people (id) on their number of violations at work regarding (1) logistics, (2) doing demos for customers, and (3) achieving desired outcomes. These violations were obtained using 3 items on logistics (n_logistics), 4 items on demos (n_demos), and 9 items on outcomes (n_outcomes). Finally, log...
I have this dataframe: subject delta day_of_week A 30 0 C -20 3 Y -2 0 S 10 4 A -5 1 And I am trying to train a linear mixed model using the statsmodel library with this code: lmm = smf.mixedlm( "delta ~ subject", metricsDf, groups=metricsDf["day_of_week"], re_form...
Today I learned that the L1 Lasso's lambda parameter can be adjusted from small to large, with small being that Lasso basically produces the same result as least squares (no regularization/ leaves coefficients as is), and large being it shrinks all coefficients towards 0. And so the practical approach would be having t...
I want to research inflation expectations and how well they predict inflation. I have found some past articles but none of them explain how to forecast inflation using inflation expectations. I have a dataset from 2012 to 2022 on inflation, household inflation expectations, firms inflation expectations, market inflatio...
What are the different preprocessing steps for time series data vs. regular cross sectional data? Eg 1. When doing train/test or cross validation, you cannot randomly split the data. The data must be split chronologically eg. train = year 2000-2005 data, test = 2006 data. Another one would be: 2. Make the dataset is ...
I am reading up on mass spec from this link: https://www.ebi.ac.uk/training/online/courses/metabolomics-introduction/designing-a-metabolomics-study/comparison-of-nmr-and-ms/ They state: The two most common techniques used in data acquisition are nuclear magnetic resonance and >mass spectrometry. Table 1 shows some of ...
New to power analysis, I am trying to perform a power analysis in R to determine n individuals needed to achieve 0.80 power for a probit regression. I've tried looking into prw but there doesn't seem to have any functions for GLMs. The closest option that I see is pwr.f2.test: Power calculations for the general linear ...
I'm fitting a binomial GLM with the following formula: glm(outcome ~ categorical:continuous:factor) I would like to see the interaction of categorical and continuous under only the 1st level of 'factor' as well and I have been accomplishing that by subsetting the whole dataset to the 1st level so that 'factor' isn't a ...
I have generator $\mathcal{A}$ which generates each iteration a binary pairs $(x,y)$ where $P(x=0)=\frac{1}{2}(1+\epsilon_1)$ and $P(y=0)=\frac{1}{2}(1+\epsilon_2)$. Also both co-ordinates are independent to each other. I want to distinguish $\mathcal{A}$ from random source $\mathcal{B}$. If we consider only first co-o...
I run factor analysis with likert data and I took 3 new scale variables with positive and negative values (save as variables in spss...). When I used one of them to run an one-way anova with a categorical variable (3 levels) I was obliged to compare opposite means (Bonferroni test shew statistical significance between ...
I'm having some trouble verifying the following line from Extremes and Related Properties of Random Sequences and Processes by Leadbetter: If (1.2.1)' and (1.2.3)' hold, then obviously so does (1.2.2)' With $F'_n(x)$ converging weakly to $G(x)$ and $\alpha_n' \to a$ and $\beta'_n \to b$, it's clear that $F'_n(ax+b)...
From simulation studies, I have repeated (1000) measures of the root-mean-squared-error (deviation) between a sample of observed values and the predicted value. The obtained RMSE values are, naturally enough, all slightly different. The samples contributing to the 1000 measures (estimates) are all of the same size and ...
I am developing two models using observational data in which I have a binary outcome, a binary treatment and a series of confounders which I control for. The only difference is that the first model uses matched data (via exact matching), while the second uses the whole sample, with no matching. Now, there's also a vari...
I have multivariate(?) time series data where I am trying to model coral populations over time. Measurements were taken at discrete timepoints for specific individuals within a population, and I am trying to assess the survival rates over time, as well as possibly predict future survival rates (~ 3-5 years). My issue h...
So basically, this is an example for conjunction of boolean literals. I do not understand how n=4 yet it yields an example of x1 ∧ ¬x2 ∧ x4 which contains only 3 variables. I also do not understand how we got the positive and negative examples. For example, here (1, 0, 0, 1) can be a positive example and (0, 0, 0, 1) c...
The following variance estimator of a set of data points $x = (x_1, ..., x_N)$ $$ \text{Var}\,(x) = \frac{1}{N-1} \sum_{i=1}^N (x_i - \bar{x})^2 $$ has itself a large variance when $N$ is small (in my case $N<10$). Looking around for better estimators, I found the median absolute deviation (MAD) that seems to be simila...
(For this example, let's say we're using a Transformer to translate from English to French.) For the decoder in a Transformer, the second attention layer takes K and V from the encoder and then takes Q from the decoder's previous attention layer. First of all, how do K and V get from the encoder to the decoder? Is the ...
My data has the following form: name val1 val2 0 a 1 2 1 a 2 5 2 a 3 7 3 b 4 11 4 b 5 13 5 b 6 17 6 b 7 19 7 c 8 23 8 c 9 29 9 c 10 31 I want to calculate the correlation between val1 and val2 by group, then avera...
I have data from a repeated measure design, as follow: Each subject is measured under 10 differente experimental conditions For each experimental conditions, 2 physiological caractéristics are measured. ==> I want to compare the means/see if there is any effects on the experimental condition of both physiological meas...
I am looking to conduct an analysis to test which variables (diagnosis, ethnicity, level of care) significantly predict the number of self-harm incidents a patient has over 2 years (observational data). I have a sample of 18 patients with between 1 and 43 self-harm incidents over 2 years (outcome variable). I then have...
I need to compute percentile curves using the LMS method (from the GAMLSS package/models) with Age and Height as predictors. What is the best way to determine which equation (with which transformation and type of spline) is the most appropriate? I attempted to consider various models before comparing GAIC to select the...
It was proven that the conjunction of Boolean literals is PAC-learnable and which yielded the inequality $m ≥(1/\epsilon) ( (\log 3)n + \log(1/\delta))$, as shown below. However, I plugged in the values $\delta=0.02, \epsilon=0.1$ and $n=10$ yet did not get the value $m\geq 149$, $m$ being the number of examples needed...
I want to conduct a fixed-sequence, crossover clinical trial to compare the effect of stopping allergic food at one time period with that of another time period when they eat the allergic food. When they enter the study, they were eating the allergic food. So the sequence is eat-stop-eat. There is only one group in the...
Let $(X, Y)$ be a discrete random vector. Prove that: If $X$ and $Y$ are independent and $E[(XY)^2] = 0$, then $P(X = 0) = 1$ or $P(Y = 0) = 1$ Since $X$ and $Y$ are independent, covariance, i.e., $E(XY)-E(X)E(Y)=0 \implies E(XY)=E(X)E(Y), V((XY))=E[(XY)^2] - E[XY]^2=0-E(X)^2E(Y)^2 \leq 0$, since variance $\geq 0, V(XY...
My professor has given me a random variable $X$ with a probability density function: $$f(x) = cos(x), 0 ≤ x ≤ π/2.$$ I have to write an acceptance-rejection algorithm to simulate values of $X$ based on a proposal with density: $$h(x) = kx, −π/4 ≤ x ≤ π/2$$ where $k$ is some fixed value. As far as I understand, a densit...
I asked this yesterday, but was not very concise. Hoping to get better results with different wording. I have a question related to the error term in a normal distribution. Let's assume that we are taking IQs at various high schools. we go to one high school, take 5 IQ's and the mean is 140. we go to another, take...
I've build two models using Support Vector Machines, one with 'linear' kernel and the other with 'rbf' kernel. The r2 score of the test data in both cases is pretty much equal, around 0.82, but the score on training data for the 'linear' kernel is 0.84, while for the 'rbf' kernel is around 0.94. I understand that overf...
I have generated structure predictions of a protein-protein interaction with different mutations at the interface. The outcome of a single mutation usually doesn't have an effect in this system, but having multiple mutations sensitizes it to have a more dramatic effect on the interaction. I have run all possible combin...
The problem is that I have a very special time series. It is sensors data for a machine. I have about 400 sensor data which I want to use to forecast the machine advancing speed. The data contain a lot of zeros (for the downtime phases and for the rest phases). The data doesn't have hourly or monthly seasonality, but f...
I am responding to reviewer comments on a systematic review summarizing a number of risk factors. The exposure is any risk factor (this is what I am trying to make an overview of) and the outcome is first event of physical child abuse. The risk factors have been reported using various effect measures: relative risks (R...
I have computed a matrix of MDS distances using R's dist() function and then reduced to two-dimensional coordinates using cmdscale() function. If I apply PAM or k-means clustering (the choice of algorithm is not the focus here) on the coordinates, then I can get something that looks like this: I have seen conflicting ...
In a textbook of mine I detected the follow definition of a random sample: "Every possible sample of size n has the same probability of being selected" However, I also already saw some definitions that are formulated like the following: "Every unit has the same probability of being selected" Therefore, I wanted to know...
I am working the sector of computer science for agriculture research. I deal here with algorithm for crop yield prediction. However, data in agriculture is very limited. To overcome the issues of small datasets + ML, I want to set up an approach that combines ML methods (learning from data) with expert knowledge. What ...
I was doing hyperparameter tuning of the alpha variable in sklearn's Lasso (using cross-validation). The optimal alpha that was obtained from it is 0. This means no regularization is needed and it's just a linear regressor. I was wondering what could this implicate regarding the data I'm using and my target. Thanks!
I am trying to build an intuition on what really a feature is. I created a toy example as following. In my mind a scalar feature should be enough to represent my data. Couldn't the model in this case learn a mapping from binary numbers to decimal? For example, the scalar feature for [0,0,0] = 0, [0,0,1] = 1, [0,1,0] = ...
I've been working on a problem about coins and Bayes' theorem, but I'm getting some counterintuitive results. Here's the problem and what I've tried. Imagine you have a coin, and you have no reasons to assume it's biased, so the prior is $P(heads) = 0.5$. Now imagine you've observed the data $D = \{heads:120, tails:100...
I am trying to do parametric bootstrap for logistic regression but I don't know what the random error terms should be. I know how to do it with linear regression since the error terms follow a normal distribution. Really appreciate any pointers to resources about this topic. Thanks
Working in health science research. We have generated correlations between two variables. This is the amount of two proteins in the system. I wanted to make a straight line with slope, but the values of the straight lines are not consistent with the R values of the Spearman correlation test. Indeed, the R is negative w...