Very low probability in naive Bayes classifier 1 Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) 2019 Moderator Election Q&A - Questionnaire 2019 Community Moderator Election ResultsHandling underflow in a Gaussian Naive Bayes classifierName Entity Linking with Naive Bayes ClassifierBias in Naive Bayes classifierVery low probability in naive Bayes classifierLaplacian smoothing on Class Probability (Naive bayes)How to deal with missing data for Bernoulli Naive Bayes?My naive (ha!) Gaussian Naive Bayes classifier is too slowNaive Bayes ClassifierHow does Naive Bayes classifier work for continuous variables?Naive Bayes Classifier - Discriminant Function

Has a Nobel Peace laureate ever been accused of war crimes?

What helicopter has the most rotor blades?

What's the difference between using dependency injection with a container and using a service locator?

What kind of equipment or other technology is necessary to photograph sprites (atmospheric phenomenon)

How to keep bees out of canned beverages?

Etymology of 見舞い

Does using the Inspiration rules for character defects encourage My Guy Syndrome?

Why these surprising proportionalities of integrals involving odd zeta values?

C variable type assert

Will I be more secure with my own router behind my ISP's router?

How to calculate density of unknown planet?

Will the Antimagic Field spell cause elementals not summoned by magic to dissipate?

Is it OK if I do not take the receipt in Germany?

Is there a verb for listening stealthily?

false 'Security alert' from Google - every login generates mails from 'no-reply@accounts.google.com'

What is the ongoing value of the Kanban board to the developers as opposed to management

Is Vivien of the Wilds + Wilderness Reclamation a competitive combo?

A journey... into the MIND

Is "ein Herz wie das meine" an antiquated or colloquial use of the possesive pronoun?

Why not use the yoke to control yaw, as well as pitch and roll?

What is the evidence that custom checks in Northern Ireland are going to result in violence?

Knights and Knaves question

How can I wire a 9-position switch so that each position turns on one more LED than the one before?

Who's this lady in the war room?



Very low probability in naive Bayes classifier 1



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
2019 Moderator Election Q&A - Questionnaire
2019 Community Moderator Election ResultsHandling underflow in a Gaussian Naive Bayes classifierName Entity Linking with Naive Bayes ClassifierBias in Naive Bayes classifierVery low probability in naive Bayes classifierLaplacian smoothing on Class Probability (Naive bayes)How to deal with missing data for Bernoulli Naive Bayes?My naive (ha!) Gaussian Naive Bayes classifier is too slowNaive Bayes ClassifierHow does Naive Bayes classifier work for continuous variables?Naive Bayes Classifier - Discriminant Function










0












$begingroup$


I have some training data (TRAIN) and some test data (TEST). Each row of each table contains an observed class (X) and some columns of binary (Y). I'm using a Python script that is intended to predict the probability (Pr) of X given Y in the test data based on the training data. It uses a Bernoulli naive Bayes classifier. Here is my script:



https://stackoverflow.com/questions/55187516/look-up-bernoullinb-probability-in-dataframe



It works on the dummy data that is included with the script.



On the real data, I know from experience which class some of the Y columns are indicative of. My script however is giving probability predictions like "1" where I don't think that the class is correct and "6e-77" on correct classes.



Any advice on what I can try please?



Edit



There are two problems. The very low probability is caused by the naive assumption that nothing is related to anything else. This is described here:
https://scikit-learn.org/stable/auto_examples/calibration/plot_calibration_curve.html#sphx-glr-auto-examples-calibration-plot-calibration-curve-py



The incorrect answers are caused by my code getting confused about which class is which, as described on my Stack Overflow post.










share|improve this question











$endgroup$
















    0












    $begingroup$


    I have some training data (TRAIN) and some test data (TEST). Each row of each table contains an observed class (X) and some columns of binary (Y). I'm using a Python script that is intended to predict the probability (Pr) of X given Y in the test data based on the training data. It uses a Bernoulli naive Bayes classifier. Here is my script:



    https://stackoverflow.com/questions/55187516/look-up-bernoullinb-probability-in-dataframe



    It works on the dummy data that is included with the script.



    On the real data, I know from experience which class some of the Y columns are indicative of. My script however is giving probability predictions like "1" where I don't think that the class is correct and "6e-77" on correct classes.



    Any advice on what I can try please?



    Edit



    There are two problems. The very low probability is caused by the naive assumption that nothing is related to anything else. This is described here:
    https://scikit-learn.org/stable/auto_examples/calibration/plot_calibration_curve.html#sphx-glr-auto-examples-calibration-plot-calibration-curve-py



    The incorrect answers are caused by my code getting confused about which class is which, as described on my Stack Overflow post.










    share|improve this question











    $endgroup$














      0












      0








      0





      $begingroup$


      I have some training data (TRAIN) and some test data (TEST). Each row of each table contains an observed class (X) and some columns of binary (Y). I'm using a Python script that is intended to predict the probability (Pr) of X given Y in the test data based on the training data. It uses a Bernoulli naive Bayes classifier. Here is my script:



      https://stackoverflow.com/questions/55187516/look-up-bernoullinb-probability-in-dataframe



      It works on the dummy data that is included with the script.



      On the real data, I know from experience which class some of the Y columns are indicative of. My script however is giving probability predictions like "1" where I don't think that the class is correct and "6e-77" on correct classes.



      Any advice on what I can try please?



      Edit



      There are two problems. The very low probability is caused by the naive assumption that nothing is related to anything else. This is described here:
      https://scikit-learn.org/stable/auto_examples/calibration/plot_calibration_curve.html#sphx-glr-auto-examples-calibration-plot-calibration-curve-py



      The incorrect answers are caused by my code getting confused about which class is which, as described on my Stack Overflow post.










      share|improve this question











      $endgroup$




      I have some training data (TRAIN) and some test data (TEST). Each row of each table contains an observed class (X) and some columns of binary (Y). I'm using a Python script that is intended to predict the probability (Pr) of X given Y in the test data based on the training data. It uses a Bernoulli naive Bayes classifier. Here is my script:



      https://stackoverflow.com/questions/55187516/look-up-bernoullinb-probability-in-dataframe



      It works on the dummy data that is included with the script.



      On the real data, I know from experience which class some of the Y columns are indicative of. My script however is giving probability predictions like "1" where I don't think that the class is correct and "6e-77" on correct classes.



      Any advice on what I can try please?



      Edit



      There are two problems. The very low probability is caused by the naive assumption that nothing is related to anything else. This is described here:
      https://scikit-learn.org/stable/auto_examples/calibration/plot_calibration_curve.html#sphx-glr-auto-examples-calibration-plot-calibration-curve-py



      The incorrect answers are caused by my code getting confused about which class is which, as described on my Stack Overflow post.







      machine-learning prediction probability naive-bayes-classifier






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 11 at 15:05







      R. Cox

















      asked Apr 5 at 16:21









      R. CoxR. Cox

      12




      12




















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "557"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48701%2fvery-low-probability-in-naive-bayes-classifier-1%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Data Science Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48701%2fvery-low-probability-in-naive-bayes-classifier-1%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Marja Vauras Lähteet | Aiheesta muualla | NavigointivalikkoMarja Vauras Turun yliopiston tutkimusportaalissaInfobox OKSuomalaisen Tiedeakatemian varsinaiset jäsenetKasvatustieteiden tiedekunnan dekaanit ja muu johtoMarja VaurasKoulutusvienti on kestävyys- ja ketteryyslaji (2.5.2017)laajentamallaWorldCat Identities0000 0001 0855 9405n86069603utb201588738523620927

          Which is better: GPT or RelGAN for text generation?2019 Community Moderator ElectionWhat is the difference between TextGAN and LM for text generation?GANs (generative adversarial networks) possible for text as well?Generator loss not decreasing- text to image synthesisChoosing a right algorithm for template-based text generationHow should I format input and output for text generation with LSTMsGumbel Softmax vs Vanilla Softmax for GAN trainingWhich neural network to choose for classification from text/speech?NLP text autoencoder that generates text in poetic meterWhat is the interpretation of the expectation notation in the GAN formulation?What is the difference between TextGAN and LM for text generation?How to prepare the data for text generation task

          Is this part of the description of the Archfey warlock's Misty Escape feature redundant?When is entropic ward considered “used”?How does the reaction timing work for Wrath of the Storm? Can it potentially prevent the damage from the triggering attack?Does the Dark Arts Archlich warlock patrons's Arcane Invisibility activate every time you cast a level 1+ spell?When attacking while invisible, when exactly does invisibility break?Can I cast Hellish Rebuke on my turn?Do I have to “pre-cast” a reaction spell in order for it to be triggered?What happens if a Player Misty Escapes into an Invisible CreatureCan a reaction interrupt multiattack?Does the Fiend-patron warlock's Hurl Through Hell feature dispel effects that require the target to be on the same plane as the caster?What are you allowed to do while using the Warlock's Eldritch Master feature?