0
$\begingroup$

Consider a numerical dataset with continuous variables, that has been scaled to end up with values in the [0,1] range. How can I compute a reasonable variance threshold for all the variables?

$\endgroup$
0
$\begingroup$

Usually 3 is taken as a threshold Value by standard deviation

Using z-score we can look for value above or below threshold like in code below:

threshold=3
mean = np.mean(data)
std =np.std(data)

for x in data:
    z_score= (x - mean)/std 
    if np.abs(z_score) > threshold:
        ...
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.