1
$\begingroup$

I built an LSMT model to predict sick cows. I also have risk factors like cow size and height (static risk factor) that I want to combine into the ML model. I found that size is geometrically distributed. My question is how I insert it as a feature to the model? I know that $P(x=K)= p*q^(k-1)$ but I don't know how to combine it as a feature. Thank you.

$\endgroup$
1
  • 1
    $\begingroup$ Are you sure you want to insert a theoretical distribution instead of the measured value for each cow? $\endgroup$
    – Dave
    Apr 20, 2021 at 11:43

2 Answers 2

0
$\begingroup$

As a general approach I would say you need to generate new features, that use your prior knowledge. For example, if you have a known size distribution, then for each specific size you can calculate its probability and use it as a new feature.

As I side-note, the geometric distribution of cow sizes seems very surprising to me, I would expect to see some gamma distribution or just normal (if size is measured in cm/inches).

$\endgroup$
2
  • $\begingroup$ I just not understand how to calcalute it. for example if it is geometric so for cow at size 50 the formula is $P(x=K)= p*q^(k-1)$ , how I can get P? $\endgroup$
    – Mor
    Apr 21, 2021 at 10:46
  • $\begingroup$ It's a distribution parameter which you can estimate by training data with methods like maximum likelihood estimation. "I found that size is geometrically distributed" -- could you please add to question the explanation, how did you find that and may be example of the data. $\endgroup$ Apr 21, 2021 at 10:56
0
$\begingroup$

Using a probability distribution as a feature is not possible in most commonly-used machine learning frameworks. Most commonly-used machine learning frameworks only accept scalar-like values as inputs. In the case of height, it would be a single numeric measurement.

If you willing to go outside of established frameworks, you could model the problem in a Bayesian way with probabilistic programming where all quantities are distributions.

$\endgroup$

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.