0
$\begingroup$

I'm currently working on a machine learning project where I designed a model to perform binary classification given (text) input. What I'm working on right now is to analyze whether the distance between certain labels biases the model towards certain predictions.

For example, if the distance between two words is, say, 5 words or below, then the model just predicts 1 regardless of other possible factors and vice versa.

I wanted to be able to quantify or visualize the underlying relationship between these two values. I've tried using Spearman correlation but the results don't seem to be meaningful.

>>> # Spearman's Correlation
>>> from scipy import stats
>>> stats.spearmanr([0, 23, 2.3, 5, 4, 87, 2], [0, 1, 0, 1, 1, 0, 1])
... SpearmanrResult(correlation=0.14433756729740646, pvalue=0.7575093876521792)

I've also taken a look at another question on this community (What is the best way to visualize relationship between discrete and continuous variables?) and this seems like a very reasonable approach, but was wondering whether there was anything else out there.

Any feedback is appreciated. Thanks!

$\endgroup$

Your Answer

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

Browse other questions tagged or ask your own question.