# Questions tagged [sample-weighting]

The tag has no usage guidance.

11 questions
Filter by
Sorted by
Tagged with
1answer
23 views

### Sample weighting vs. (e.g. one-hot encoded) categories

I have seen recommendations to use sample weighting when the training dataset is not evenly balanced over known categories, so that an imbalance in the number of elements in each category does not ...
1answer
14 views

### WeightIT package error: treatment and covariates must have same number of units [closed]

While using the weightIt package in R I encountered a strange error: "error: treatment and covariates must have same number of units" Now, checking the root code of the package and this ...
0answers
11 views

### Domain adaptation under covariate shift: estimating density ratio through a classifier

In domain adaptation under covariate shift, one approach is to weight the instances from the source domain by a factor $\frac{p_T(x)}{p_S(x)}$ in the training, where $p_S(x)$ and $p_T(x)$ represent ...
1answer
17 views

### How to handle different sized experiment samples

Imagine a 3 by 1 experiment. One group has 1,000 observations, one with 5,000 observations, and 4,000 observations in the last group. I'm trying to see whether the manipulation between groups in the ...
1answer
15 views

### What is the sample size and variance for the mean that is a simple, unweighted average of two independent groups' means?

We have two groups: N1 = 10 and N2 = 100 Their means on some measurement are: Mean1 = 4 and Mean2 = 5 Their variances are Var1 = 3 and Var2 = 2.5. Let's further assume we have no access to the ...
1answer
39 views

### Including a weighting variable in a linear regression

I'm looking at how temperature affects length. My length variable is the mean length calculated for every year, it is derived from ~10,000 data points. Not every year had the same sampling effort (e.g....
0answers
22 views

### How should one compute confidence intervals for means computed with inverse propensity weights (IPW)?

Inverse propensity weighing involves a machine learning model that takes features and outputs the predicted probability that this person is in the sample. Let $w_i$ be the inverse of the output for ...
0answers
57 views

### How does sample_weights work in Naive Bayes?

I want to use the sample_weights parameter in sklearn Naive Bayes classification. I have seen online that it can be used to balance data but I have also seen that it can be used to weight data with ...
1answer
80 views

### Weighted Survey Predicted Probabilities

I have a question about calculating prevalence using predicted probabilities from a survey weighted generalized linear model. Say my goal was to calculate the prevalence of a binary outcome using the ...
1answer
176 views

### Minimize SSE function

Consider a data set in which each target $t_n$ is associated with a weighting factor $r_n > 0$, so that the sum-of-squares error funtion becomes SE(w)= \frac{1}{2} \sum_{n=1}^N r_n \left(\...
3answers
235 views

### Weighting significance tests according to the appropriateness of their assumptions

Consider a t-test of means. One formula for computing the p-value assumes equal variances. Another formula assumes unequal variances. With small sample sizes the tests can give quite different ...