instruction stringlengths 9 38.7k |
|---|
I am building a linear model to analyze experimental data with the following shape:
$$
y \sim b_0 + b_1T + b_2X + N(0, \sigma^2)
$$
Where $T$ is a binary variable indicating the treatment and $X$ is a covariate.
The hypothesis test that I am going to run to check if the treatment has any significant effect is:
$$
H_0: ... |
I am facing some issues to perform a Bayesian network meta-analysis.
Let us suppose that I have several RCTs comparing either A vs. B, or A vs. C, or B vs. C and that the reference treatment is A.
I understand how to perform pairwise direct and indirect comparisons treatments using a random-effects model in a Bayesian ... |
a = [2,8,10,0,3,0,0]
b = [0,0,3,4,2,0,0]
I would like to find out how much different the b distribution is from the a distribution. That's why I'm using KL divergence. However, the issue is that according to the original equation which one I should take as p and which one as q? In Wikipedia, q is written to be the re... |
I am a math grad student who recently decided to do a research study in statistics in Winter 2023. I took AP Stats in high school over ten years ago. I have a solid background in pure math and have always loved deriving everything from the ground up and I want to do the same thing with statistics.
I am currently taking... |
Here's my situation:
In theory, $y = f(x1, x2,...,x5)$, and the exact equation is context dependent.
In practice, I don't have data for $x4$ and $x5$ as yet.
Based on the somewhat promising results of analysis with $y$, $x1$, $x2$, and $x3$, I'd like to make the case for further investment to obtain data for $x4$ and $... |
I am using the calibrate function from the rms package but it returned an error message Error in reliability[, "index.corrected"] : subscript out of bounds. The validate function, however, did work. I am running a cox model with a time-varying covariate and so I am wondering if the calibrate function cannot handle this... |
I'm trying to figure out the proper mathematical definition in sigma-algebra generated by infinite past in ARCH, GARCH type models.
Let $\epsilon_t = \sqrt{h_t} z_t $, where $z_t$ $i.i.d$ random variable with E($z_i$)=0 and E($z_i^2$)=1.
Conditional variance of $\epsilon_t$ is $E[\epsilon_t^2|\mathcal{F}_{t-1}]$ = $h... |
I currently perform an fmri analysis, and I extract timeseries on 4 different conditions from 3 specified different regions based on the literature. Within each group, I do my statistical test (contrast condition 1 - (cond2+cond3+cond4), and as expected, the predicted area has an effect and the other two do not.
This g... |
Consider the model
$$ y(\mathbf{X}) = f(\mathbf{X}) + \epsilon, $$
where $\mathbf{X}$ is a given $n\times D$ matrix, and where $\epsilon \sim \mathcal{N}(0, \sigma^{2}I_{N})$ is iid Gaussian and is the noise.
First, by modeling the function $f$ as a GP, such that $f(\cdot)\sim GP(0, K(\cdot, \cdot))$ where K is a chose... |
I'm really trying very hard to understand the intuition behind percentile point function. From wikipedia, It is the inverse of cdf.
From the CDF, a point on its curve indicates the percentage of points less than or equal to that point. I hope this is the right understanding ?
For ppf to be inverse of cdf, the definitio... |
I need help fixing the model I landed on through backwards step-wise elimination. I chose a negative binomial model because my variance seems much larger than the mean, with random intercepts from the variable "Site" because my sampling scheme has a repeated measures design (fish counts recorded at the same sites each ... |
I want to understand how does ridge regression solve the multidimensionality problem (when number of X variable is higher than the number of observations)? It shrinks the coefficients by introducing bias by incorporating the lambda term. It is clear that it will solve the overfitting issue. But how does it solve the mu... |
Can anyone help with the set up of a multiple variable regression function that does not have an intercept (no beta hat 0)? I've tried to figure it out based on class notes for one variable regression without an intercept and multiple variable regression with an intercept but my answers seem way way off.
This is the sp... |
I am familiar with the use of Transfer Learning to Neural Networks models, but I am wondering whether it would be possible to apply it to linear models, and in particular to parsimonious models such as Lasso.
More formally, I have an initial dataset $D$ containing $N$ observations $(y^{(i)}, \mathbf{X}^{(i)})_{1 \leq i... |
I am currently working on a marketing analytics project and my dataset is rather large: 400K rows and 70 features which contains both continuous and binary variables.
I've tried using PCA and incorporating the results into a Kmeans clustering algorithm but
There doesn't appear to be a clear optimal number of clusters... |
I have data that follows a very obvious trend but I am failing to find the right function to fit the data. I've tried a logistic as well as an exponential function. However, both functions do not seem to fit the data very well given how clean they look.
Below is the Python code to reproduce the plot - what kind of fun... |
I'm working with plots for which I'm finding the maximum point and labelling the x and y values at which it occurs:
My question is, is there an 'official' name for the red dashed lines that extend from the point to each of the axes?
|
I am fairly new to statistics and R and I need a bit of help to understand the results of my GLM. I am using bee species richness as the response variable and plant species richness as the predictor variable. I only have 12 data points and the data is not nd.
m2 <- glm(Bee_SR ~ Plant.species.richness, data = IOP_pan,
... |
Suppose $X_1,...,X_n \sim iid N(\mu,\sigma^2)$, $\mu$ and $\sigma^2$ are unknown.
I'm interested in the distribution of normalized sample $Z=\frac{X_1-\bar{X}}{S}$, where $S=\sqrt{\frac{1}{n-1}\sum_{i=1}^n(X_i-\bar{X})^2}$.
I know that in normal family, $\bar{X}$, $S^2$ and $Z$ are mutually independent, but how can I... |
I was wondering, i have a Z value of -4.7 is this a significant positive skew based on a 1.96 cut off?
And for Z value of Kurtosis of -0.16 is this proving its non significant as its less than the 1.96 Cut off?
Many thanks
|
I am a relative stats noob trying to create a binary logistic regression model in spss to explore the relationship between internet access and feeling part of your community. I am also interested in including smart phone ownership as an IV to see if that has an effect. Just to be clear, in this data set not all smart p... |
I would like to perform an exploratory factor analysis in R with complex sample survey data involving ordinal and dichotomous variables.
The svyfactanal() function from the survey package is only able to use the maximum likelihood method, which is inappropriate for non-normal ordinal or dichotomous variables.
If the da... |
I have data traces for separate days that I am reading in from separate files. I'm splitting the data into smaller sequences to train a state-prediction model on, but all the data in a sequence must come from the same file. I know it's best practice in ML to normalize all input data to the network, but I am not sure ho... |
The requirements for a binomial experiment are well known (see, for example, http://www.stat.yale.edu/Courses/1997-98/101/binom.htm):
Fixed number of trials (n),
Each trial has two outcomes (success and failure),
Probability of success is constant (p),
Trials are independent.
Counter examples that are unique to the f... |
I would like to apply Bayesian Optimization (BO) to a black-box function depending only on multiple categorical variables. In my application, each categorical variable has 3 possible categories. I have 2 questions:
BO usually utilizes a surrogate function based on Gaussian Processes that approximates the true black-bo... |
Suppose that I wanted to choose from, for example, $Y = aX + \epsilon$ and $Y = aX^2 + \epsilon$. Is this meaningfully different from fitting $Y = a_1X + a_2X^2 + \epsilon$ and heavily penalizing $a_1a_2$? What about for model selection in general? Could we view it as a special case of an ensemble model, which must lea... |
I'm trying to understand variational inference, and I've found resources that mention $p(Z, X=x)$, where $Z$ is a latent random variable and $X$ is the observed random variable. (Here is one such example)
Is there a difference between $p(Z, X=x)$ and $p(Z|X=x)$? Let's consider a simple example: $X$ is a random variable... |
I've been training a $\beta$-VAE with a 5-dimensional latent space on some physics simulation data with 2000 samples. As I increase $\beta$, I notice that an increasing number of the latent variables will be given by $\mu_{d} \approx$ 0 and $\sigma^{2}_{d} \approx 1$ for all of the training samples, where $d$ is the la... |
I need an appropriate method for quantifying spatial spread (i.e., clustering), where area of interest is the country of India divided into 25km$\times$25km grid cells, and the response variable is a count at the 25km$\times$25km resolution (number of something, in my case, eBird (birdwatching) checklists; or some prop... |
Definition of Significance level: The significance level is the probability of making a Type I error. I.e. rejecting the null hypothesis given that it is true. Hence, a small significance level is desirable
However, when we make a hypothesis test and can reject the null hypothesis we say the test is significant.
Don't ... |
I was reading about SVM and linear models, I found that one of the disadvantage is SVM and Linear models do not perform well when the number of rows (instance) less than the number of columns (features)?
I was reading several days about the SVM to understand why but I could not.
Kindly would anyone explain why they "nu... |
I noticed in Scikit-learn's LinearRegression that there is a positive:bool parameter to optionally force coefficients to be positive. I haven't met this possibility before and still cannot figure out what is it's advantage - from my perspective it's indifferent what is the sign of the weights as long as they're correct... |
I understand that the AUC is basically the area under the ROC curve, which is the plot of the proportion of true positives versus the proportion of false positives at different probability cutoffs. However, I came across this method to estimate AUC, where they estimate AUC using cumulative events and non-events rates a... |
This is how my data looks like:
Attr1: 0.5, 0.6 .. 0.9, 0.5, ... 0.9 (fluctuates 5 times) -> 25 data points
Attr2: 0.5, 0.5, 0.5, 0.5, 0.5, 0.6, 0.6, 0.6, 0.6, 0.6 ... (until 0.9) -> 25 data points
Attr3: (randomly changes between 0 and 1 continuously (e.g. 0.57) based on attr1 and attr2) -> 25 data points.
My quest... |
I am trying to work out and plot the CDF from a PDF. The pdf is
$$
f(x) =
\begin{cases}
0&\text{if}\quad -1\leq x \leq 1\\
|1/x^3|&\text{ otherwise}
\end{cases}.
$$
I know that the CDF is the integral of the PDF, and I tried integrating the PDF but all I got was 1, and I'm not sure how to plot this.
|
I have a following picture and the assumption that I can estimate the effect of Treatment on Growth by accounting for dT. However, I'm not sure if Unobserved confounder is actually a confounder - it is NOT related directly to Growth. So should I adjust for dT or for nothing?
|
I recently stumbled over a generalisation of $F_1$ score to cases where the model predicts probabilities:
$$
F_1 = 2 \frac{\sum y_i \hat{p}_i}{\sum y_i^2 + \sum \hat{p}_i^2}
$$
where $y_i \in \{ 0, 1 \}$ are the true class memberships and $\hat{p}_i \in [0, 1]$ the predicted class probabilities.
$F_1$ score is usually ... |
Sometimes in a paper I see that (e.g.) confidence intervals were estimated using 99 (or 199 or 999) bootstraps. My question is, why 99 rather than 100?
This is my best guess at an answer:
"If we sort the results from 100 bootstraps, the 5th and 95th results are estimates of the 5th and 95th percentiles of the whole pop... |
I am trying to work out the mean and variance of the fan speed of a turbine across its operational life.
The data I have is the timeseries output of N simulations, each simulating a different load/environmental case. Each of the simulations has a different number of datapoints due to the timestep being varied to achiev... |
In my multilabel classifaction problem, which I approach similarly to what can be see in this post: How does Keras handle multilabel classification?, the resulting accuracy only increases from 2% to 5%. There are 28 different classes in the target vector. One example vector:
[0,0,0,0,1,0,1,0,0,...0,0,0,0,0,1,0,0,0]
... |
Are there any ways to predict distributions as target?
For example we have user's profile and data from social network. And his followers age distribution:
0.3 < 18 y.o.
18 y.o. < 0.5 < 45 y.o.
0.2 > 45 y.o.
How can we predict such distribution for new users?
It's possible to predict as probabilities of each class and... |
I have this dataset of 104 tissue samples from two different types of tumors (B and C) along and 182 observations (gene expression profile). I do not need to understand the underlying biological theory for this but I do have to carry out a PCA to see if I can reduce the data to make reading it easier. I standardized th... |
Lets say we have a Red team with 1000 members and a Blue team with 100 members.
After a year Red team has killed 50 Blue members and the Blue team has killed 50 Red members.
Despite both teams killing the same amount of people how truthful is the following statement
Blue members were 10 times more likely to die
Techn... |
I have some code that calculates deviation from the mean for a series of univariate data. It calculates the mean and stddev for a window of data points, and compares the latest datapoint using $\mu$ and $\sigma$.
Pretty simple, my question is how do I extend this to higher dimensions. Basically if my datapoints are n... |
I have a dataset of 20K samples on 27 features that I am trying to cluster with k-means. The dataset is in its majority rather sparse, i.e. 98% of samples have a single nonzero value in one of its features, but with different amplitudes. I have two issues here:
I believe there is not much information gain in clusterin... |
Let the continuous random variable $X$ be distributed with mean $\mu_x$ and variance $\sigma^2_x$ with support $[0, \infty]$.
Let the random variable $Y$ be the right truncation of $X$, with truncation point $a$.
One can find conditons for when $\mathtt{Var}[Y] \le \mathtt{Var}[X]$.
Is it true that $\mathbf{E}[(Y-\mu_x... |
Let's say I have a set of 20 data points. However, for certain unexplained reasons, I can only perform SVM on 4 of those data points at a time. Is there any way I can do SVM for each subset of 4 points for the 20-point dataset and then combine those vectors/planes/hyperplanes to get a more accurate result?
|
The model I train is used to predict a quasi-continuous target variable (e.g. a time). The predicted time can be used to calculate a resulting score, but this is computationally expensive. I precomputed scores for discrete times that I can look up, however, the output from the regression is continuous. Can I force the ... |
I want to find $E(X^2Y^2)$. Now $Var(XY) = E(X^2Y^2)-E(XY)^2.$ Since $E(X)$ and $E(Y)$ both are 0, $Cov(X,Y) = E(XY)$ and $Cov(X,Y) = \rho \sigma_{x}\sigma_{y}. $ Therefore, $Cov(X,Y)=\rho.$ Therefore from previous argument, we have $E(XY)=\rho$. How do I proceed further?
|
I want to forecast the health expenditure of Russia as a share of GDP and I am using data points from 2000-2019. Following is my data:
2000 1.514
2001 1.612
2002 1.721
2003 1.714
2004 1.605
2005 1.52
2006 1.48
2007 1.489
2008 1.543
2009 1.947
2010 1.752
2011 1.64
2012 1.649
2013 1.77
2014 1.857
2015 2.0... |
I have a multiclass classifier (boosting model), and my goal is to have a good approximation of the actual distribution to the classes given my feature values.
I.e. suppose I have features $X$, and three possible classes/target ($A$, $B$ and $C$).
What I want is to have a good estimation of this discrete probability di... |
I have data with different leaders and their performance score over a period of time. I need to analyse this time series data where data for each leader should be considered different time series data. I tried Autoregression model but as per my research it doesn't have functionality to perform multi level analysis like... |
Consider a coin that shows Heads with unknown probability when tossed. After tossing this coin 100 times, Heads have shown up 43 times. The unknown parameter is contained in what interval with a [confidence level of 95%]? (maybe I shouldn't use the term 'confidence level', the original question states: a probability o... |
If there are 10 positive examples, and 90 negative examples in the test set, what is the smallest possible difference in AUC, between two rankers giving different AUC?
|
When I was first trying to detect concept drift, it seemed naively to me to be a problem of detecting whether noisy data was veering off horizontal trajectory (non-trivial slope above some arbitrary threshold that I'd consider a statistically significant slope).
I have a deployed model that's been predicting for months... |
I am using metafor package for my meta-analysis. As part of the meta-analysis, I did a meta-regression analysis where I found out there is a multicollinearity issue across the variables I used. Is there any way to deal with it in metafor package?
I was suggested to use bayesian model averaging (BMA). I am doing an ecol... |
We know that ${f'(x) \approx \frac{f(x+h)- f(x)}{h}}$. If we have three points ${x_0 = x-h}$, ${x_1 = x}$, ${x_2 = x + h}$, we can compute the 3-point centered-difference formula using the Newton's form:
${g(x) = f_0 + (x-x_0)\cdot f[x_0,x_1] + (x-x_0)\cdot(x-x_1)\cdot f[x_0,x_1,x_2]}$
We then have:
${g'(x) = f[x_0,x_... |
I have a computer science background but I am trying to learn how to apply ML by solving small problems.
I have been working on this problem for the last couple of days and I cannot find a solution. I have a dataset with just 10 samples (5 belong to class A and 5 to classB) and 30000 features. I can reduce the number o... |
In Impulse response graphs, I've seen some papers report 68% confidence intervals rather than 95% bounds. I guess this makes the results look more significant. But other than that, is there any legitimate reasons to use these non standard bounds?
|
I'm analyzing a single-cell RNAseq dataset where each patient has a few hundreds of sequenced cells before and after a medical intervention (blue and orange colors respectively in the graph below):
I want to test whethere the expression of a specific gene changes after the intervention.
The expression of this gene bef... |
Lets assume the model is Δy = x1 + x2 +...xn where Δy = yt - yt-1. But independent variables are not in delta form. How to interpret this model ?
Edit: To make it more clear, I'll add some details where I am confused. if the model was Δy = Δx1 + Δx2 +...Δxn, it will considered first difference model and I know how to i... |
set.seed(123)
x <- rnorm(10000,0,2);
s2 <- function(n) (1/(length(x[1:n])-1)*sum((x[1:n]-mean(x[1:n]))^2))^(1/2)
m <- function(n) 1/n*sum(x[1:n])
I want to plot s2 and m, i. e. (n,s2(n)) and (n,m(n)) for 1<=n<=N, where N is some fixed value, i. e. N=1000, and the n's are integers. I want them to be in the same coordi... |
I'm building a logistic regression, and I'm finding it's being outperformed by a simple linear regression.
Let's say, for example, I am trying to predict whether particular future basketball shots will be successful, knowing the person, their history, and some other variables. Out of curiosity, I limited myself to a si... |
I have multiple random (gaussian) variables.
Just as one can calculate the standard error on the mean, I expect to be able to calculate standard error on the variances and standard error on the covariances.
How to do this?
|
Let $\theta_i | G \sim G$ and $G|\alpha \sim DP(\alpha, G_0)$ with $G_0 \sim N(0,\sigma^2)$. For a scalar k, does $\theta_i + k | G' \sim G'$ with $G'|\alpha \sim DP(\alpha, G'_0)$ and $G'_0 \sim N(k,\sigma^2)$?
|
I am trying to evaluate the relationship between two variables - x and y. Variable x has a number of known covariates: a, b, and c. I have identified how these covariates are related to x in r with the formula:
lm(x ~ a + b + c)
How do I adjust x such that I can plot a regression line for y ~ x?
I apologize if this is ... |
For example, let us suppose we have patients who may be alive (state = 0) or dead (state = 1). But, when a patient dies at time $t$, there is a certain treatment cost $C(t)$ incurred at death (no cost during times prior to $t$). Note that $C(t)$ itself is a randomly distributed variable with the distribution being a fu... |
I have a solution in mind for this problem, but I'm not sure if it is defensible (which is why I'm asking you all!). I have a data frame where each row represents an individual site, each column represents an individual species, and the data in each column is 0 or 1 for absence or presence of the species. For example:
... |
I have been learning the basic terminology for how to think about binary tests involving medical tests. The basic terms are here in this table
This is the confusion matrix.
My issue is the following. Note, I assume $T = N + P$ is the size of the total population. Then "accuracy" of the test is defined as
$$ACC = \frac... |
I'm trying to build a model that predicts the 6 numerical target values from a molecule. I encode a molecule with "descriptors", which give me about 2000 numerical features that describe the molecule in various ways. I have no chemical insight in this problem, so I have no idea which features may be relevant for predic... |
I m trying to find if parental involvement can positively impact student's 4 year graduation rate.
My target variable is student's graduation (yes / no)
Main independent variable is whether parent attended first year orientation(yes / no)
I am also considering other independent variables as sex, in/out of state, admitt... |
Suppose that I have $X_1$ and $X_2$ to forecast $Y$. If I run a regression on them separately, the coefficients are both positive. But if I a regression $Y =
\beta_1X_1 + \beta_2X_2$ then wlog, $\beta_1$ is positive and $\beta_2$ is negative. What does this tell you about $X_1$ and $X_2$?
My thoughts are that this mea... |
I have a very small dataset (~50 rows) for a text classification problem. I found some open source data that's similar to the problem I'm trying to solve.
Should I...
Train the (BERT) model on the open data, then fine-tune again on the original (small) dataset.
Combine the two datasets and fine tune the entire thing (... |
Let X be the diameter of a semi-precious rock. Consider $X \sim N(10,1)$, the value of the rock is given by
X<8
|X-10|<2
X>12
1
10
20
How can I calculate the expected value of the rock?
My attempt:
The expected value of the rock should be something like $$1\cdot \mathbb{P}(X<8) + 10\cdot \mathbb{P}(8<X<12)+... |
Suppose there is a random variable with Lomax (Pareto Type II) probability density
$$
P(x; c) = \frac{c}{(1 + x )^{c + 1}}, \quad x \ge 0, c > 0.
$$
Let's draw n_samples=30000 samples of length sample_len=500 and compute mean in each sample.
For a distribution with finite mean and variance, a distribution of sample mea... |
The Jensen-Shannon divergence is defined as $$JS(p, q) = \frac{1}{2}\left(KL\left(p||\frac{p+q}{2}\right) + KL\left(q||\frac{p+q}{2}\right) \right).$$ In Wikipedia it says that it can be derived from the f-divergence $$D_f(p||q) = \int_{-\infty}^{\infty} q(x) \cdot f\left(\frac{p(x)}{q(x)}\right) dx$$ with $f(x) = -(1+... |
I have performed a study where I tested 2 groups, before and after two different types of manipulations. The main outcome of my study were the group differences at time point 2.
Now someone asks what the reliability of my outcome score is. Could any observed changes be an artifact of the measurement method?
I was wonde... |
Given the prevalence, sensitivity and specificity of a single test are known.
|
My dataset contains 350 indicator variables, which are grouped by category (i.e. they are the result of applying one-hot-encoding to categorical variables). For example, the first three indicator variables specify the location of a property (i1=north, i2=center, i3=south), the next three indicator variables specify the... |
As a mathematician/economist, I am not trained to think in classification and regression tasks. This is why I wonder: is there a clear, widely accepted definition of regression and classification problems?
E.g., this paper says that When $Y$ has a finite number of states we
refer to the task as classification. Otherwis... |
Why is there no divsion by degrees of freedom in sample correlation? The same seems to hold for the coefficent of the depandt variable using linear regression.
To me it look like some kind of sample variance and sample covariance but not divided by $\frac{1}{n-1}$
Any ideas?
|
I wish to compute prognostic score for propensity score matching.
Must I train the regression model (on the control set) for unmatched or for matched data?
If the outcome is binary, must I assess the difference in the means of fitted values or in the proportions of predicted 1-s (assume outcome 1 when the fitted valu... |
I employed fractional response regression proposed by Wooldridge and Papke for my study as the dependent variable is a proportion (remaining/whole) and is between 0 to 1 (including 0 and 1). I want to know what are the assumptions that must be tested? As such, OLS regression has mainly 3 assumptions such as homoscedast... |
I have a data frame with 2 columns x,f that correspond to :
x : A measurement of the number of mosquitos that enter the room in a minute.
f : The number of occurrences of each number of mosquitos per minute within the set.
library(tidyverse)
x = seq(0,14,1);x
f = c(8,32,89,134,170,170,145,103,65,36,17,7,3,1,1)
df = tib... |
I have been looking into Annealed Importance Sampling (AIS, Neal, 2001) and Sequential Monte Carlo (SMC, Del Moral et al., 2006) methods lately. I was wondering where the difference in estimating the normalization constant comes from. I will use the notation of Del Moral et al. (2006).
Let $\pi_n(x) = \gamma_n(x) / Z_n... |
If I fit my model on the same training set twice or thrice so does the model remember the learning from each iteration and improve ?
|
Under Binary classification situation,
error between function $f$ and basic learner(classifier) $h_i(x)$ is
$$P(h_i(x)≠f(x))=\mathcal{E}.$$
It is assumed that $T$ basic classifiers are combined by a voting method, and if more than half of the basic classifiers get the correct answer, it is assumed that the ensemble cla... |
I am trying to apply a glmer on syllable-count data obtained from bird song. I include the record ID as a random factor (1 | rec_ID) due to variation in the number of songs per recording, and consider the counted data as a rate due to the song lengths differing between each song. The recordings are obtained over a lati... |
I just have an imbalanced dataset, and now I am at the point where I am tuning my model, logistic regression.
As I understood, class_weight parameter helps us dealing with these kind of datasets, and when doing model tuning you can use different weights to get a better performance.
What I am not sure about is how can c... |
I got these 3 different plots of decision boundaries using 3 different parameters for hidden_layer_sizes of the MLPClassifier from sklearn on XOR gate.
xor_data = np.array([[0, 0], [1, 0], [0, 1], [1, 1]])
xor_labels = np.array([0, 1, 1, 0])
from sklearn.neural_network import MLPClassifier
mlp1 = MLPClassifier()
mlp1.... |
I'd like to simulate data for an interaction / moderation with a continuous exposure and outcome and binary moderator. For example, for the association between X and Y to be 0.1 when moderator = 0 and 0.2 when moderator = 1. This seems very simple but for some reason I'm struggling to do this in R.
Any help would be mu... |
I am just starting out with R and struggling to wrap my head around it.
I have a data set from a $2 \times 2$ repeated measures experiment (IV 1 - Expectation with two levels, number or letter; IV 2 - Target with two levels, number or letter). The dependent variable is reaction time.
I am struggling to decide whether I... |
I would like to know what are pros and cons of performing cluster analysis before/after PCA?
My data are not very well explained by the first and the second PC (49%), so I am thinking it would be more beneficial to apply PCA after clustering just for visualization than to use PCA for feature extraction and perform clus... |
I have the following code for estimating a generalized extreme value distribution from scipy.
from scipy.stats import genextreme
ys = [22.058823529411764, 22.058823529411764, 22.058823529411764, 22.058823529411764, 22.058823529411764, 22.058823529411764, 22.058823529411764, 22.058823529411764, 22.058823529411764, 22.05... |
I want to compute the quantile function of a Bin(4, 1/3) random variable and plot it with R, but I don't know where to start from.
Any help or hint is highly appreciated.
|
Suppose I have two statements:
Statement 1: Random variable Z is the common cause for random variable X and Y (Z causes both X and Y)
Statement 2: Random variable X and Y are (conditionally) independent given Z.
What's the relationship between Statement 1 and Statement 2? Does Statement 1 imply statement 2, or does sta... |
I'm trying to understand survival analysis better and ran into a weird problem with hazard rates - when I calculate it by hand,
i.e. with
$$
h(t) = \left( \frac{ P(T \leq t + \Delta t) - P(T \leq t)}{S(t) \Delta t}\right)
$$
it doesn't line up with the formula for a hazard rate, given by
$$
h(t) = \frac{f(t)}{S(t)}
$$... |
I have a dataset that is a high dimensional imbalanced dataset. The dataset is a categorical data set and I applied label encoder to transfer categorical values into numerical values. the dataset is a tabular dataset. I also use the mean imputation method to impute missing values. I use the oversampling technique on th... |
I am confronted with the following issue. I fit a classification model for an unbalanced dataset with a binary target. The minority class is very less frequent than the majority class, therefore I used oversampling for balancing the class in the dataset before fitting.
Fair enough, the model gives good results for pred... |
When we encode categorical variables in a (generalized) linear model, the standard approach is to have one category subsumed by the intercept. Call this the “baseline” category.
By doing this and then using the differences between this baseline category and the other categories, don’t we assume less error in the estima... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.