3
$\begingroup$

I have the following Bayesian probability data that I'd like to use to build a metric learning training set.

Here's the problem setup:

Each user is encoded in an n-dimensional feature vector with an attached binary label. Each feature has one of the following values [-1 (absent), 0 (unknown), 1 (present)], and each label has one of the following values [0, 1].

For example:

user1: [Feature_1: 0, Feature_2: -1, Feature_3: 1,..., Feature_n: 0]
user1 label: [0]

Unfortunately, I do not have a data set of user vectors, but I do have the following probabilities:

P(label) = 10%
P(~label) = 90%

P(Feature_1 | label) = 10%
P(Feature_2 | label) = 20%
...
P(Feature_n | label) = 15%

P(Feature_1 | ~label) = 1%
P(Feature_2 | ~label) = 2%
...
P(Feature_n | ~label) = 5%

My thought is that I can create a training data set out of the above probabilities like so:

  1. Create 100 user vectors with label = 1

    1.a. Of these 100 user vectors: randomly choose 10% of them to have Feature_1 = 1, randomly choose 20% to have Feature_2 = 1...and randomly choose 15% to have Feature_n = 1

  2. Create 900 user vectors with label = 0

    2.a. Of these 900 user vectors: randomly choose 1% of them to have Feature_1 = 1, randomly choose 2% to have Feature_2 = 1...and randomly choose 5% to have Feature_n = 1.

  3. Then fill in the rest of the matrix with 0s

Is this a valid approach? Any suggestions?

$\endgroup$

1 Answer 1

2
$\begingroup$

The procedure you've just described boils down to the sampling from a naive Bayes model of the underlying variables (features and labels). Thus, it is valid in the sense of having the described statistical properties with respect to the different frequencies of occurrences.

However, I do wonder what the very first question is you try to answer here. Since you are talking about the creation of a training set, it seems(!) as if you head for some predictive model, which, for a given user, predicts the label from its features.

If that's the case, then why taking a detour through the creation of a training set with naive Bayes properties, when you can directly construct a naive Bayes model(!) based on the statistical properties you already have? Every quantitiy you need for defining the probabilities of a naive Bayes Bayesian network is in place.

$\endgroup$
2
  • $\begingroup$ Agreed! But apart from the label classification (which I have a Bayes Net to do), I want to learn user similarity metrics as well as the most informative features. This is why I want to create the training set. $\endgroup$ Commented Apr 12, 2020 at 22:16
  • $\begingroup$ Ahh I see... that introduces a different notion of "validity". In this case I would first check the predictive quality of the underlying naive Bayes model, to see if any inferences drawn from it (such as user similarity metrics) can be trusted. Alternatively, there are toolboxes around for causal inference, such as DoWhy microsoft.com/en-us/research/blog/…, that you may consider as an alternative to the described procedure $\endgroup$ Commented Apr 12, 2020 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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