Can I set object attributes in the sklearn Bayesian classifier?

I made a simple Bayesian classification

X = [[1,0,0], [1,1,0]] ### there are more data of course
Y = [1,0]

classifier = BernoulliNB()

classifier.fit(X, Y)

Now I have some โ€œinsider tipsโ€ that the first element in each X is more important than the others.

  • Can I include this knowledge before teaching the model, please?

  • If sklearn does not allow this, is there any other classifier or other library that allows us to include a preliminary preliminary training model?

+4
source share
2 answers

I do not know the answer to question 2, but I can answer question 1.

The comment "multiply the first element for each observation by different values"uses the wrong approach.

BernoulliNB Binomial, , , - ().

, , , . , . 70% 30% : 100 , 70 30 , X.

+2

, . :

p(class = k | data) ~ p(class = k) * p(data | class = k)

: () , k, , , k (), , , k ( ).

, , , p(class = k) .

, - , , , , p(class = k) . . , . , . , , (.. , ), , , .

-1

Source: https://habr.com/ru/post/1673102/


All Articles