negative values with density plot

msacs09
msacs09 New Altair Community Member
edited November 2024 in Community Q&A
when using auto model i got this density plot. 
I do not have negative values. How do i remove negative values and what operator is used to plot density plots

Best Answer

  • IngoRM
    IngoRM New Altair Community Member
    Answer ✓
    I would like to second that from a modeling perspective the function is what it is and even if no negative values are part of your data, still the used distribution will cover both sides of the average value equally.  If you want to avoid this, you may want to try Kernel Naive Bayes instead.
    However, if you simply would like to get a distribution curve like yours, the upcoming RapidMiner release will offer a new (and very cool!) new visualization framework where you can easily create such a chart yourself (see below).  You can try it yourself already with the public beta version available here: http://static.rapidminer.com/rnd/html/rapidminer-9.2-preview.html
    Hope this helps,
    Ingo



Answers

  • lionelderkrikor
    lionelderkrikor New Altair Community Member
    Hi @msacs09,

    Can you share your dataset in order to understand ?

    Regards,

    Lionel
  • lionelderkrikor
    lionelderkrikor New Altair Community Member
    Hi again @msacs09,

    After reflection, I think you have to keep these curves like that (although you have no negative values) : With Naive Bayes, when dealing with continuous data, a typical assumption is that the continuous values associated with each class are distributed according to a Gaussian distribution : 



    Regards,

    Lionel

  • msacs09
    msacs09 New Altair Community Member
    Thank you. Is there a way i can a do a density chart without negative values?? what operator should i use to get this graph with in Rapidminer?
  • IngoRM
    IngoRM New Altair Community Member
    Answer ✓
    I would like to second that from a modeling perspective the function is what it is and even if no negative values are part of your data, still the used distribution will cover both sides of the average value equally.  If you want to avoid this, you may want to try Kernel Naive Bayes instead.
    However, if you simply would like to get a distribution curve like yours, the upcoming RapidMiner release will offer a new (and very cool!) new visualization framework where you can easily create such a chart yourself (see below).  You can try it yourself already with the public beta version available here: http://static.rapidminer.com/rnd/html/rapidminer-9.2-preview.html
    Hope this helps,
    Ingo



  • msacs09
    msacs09 New Altair Community Member
    Waoow thank you. wanted to try this right away
  • msacs09
    msacs09 New Altair Community Member
    edited February 2019
    Also, I used "Kernel Naive Bayes" and still i get the same negative values.. further is there a way we can reduce the x axis values.. for better clarity
  • Telcontar120
    Telcontar120 New Altair Community Member
    What is being explained is that while there may not be negative values in your data (and negative values may in fact be impossible based on the quantity being measured), the NB algorthim models your numerical data as though they are continuous functions based on the Gaussian distribution, which means it will show the full possible range of values in the built-in charts.  This is a simplification, of course, of reality, but one that allows the NB algorithm to produce its estimates with minimal computational complexity.  If you want to customize the axis of the graphs to omit the negative range or cut off the long right tail, you'll have to do that manually (as Ingo showed above) by setting the min and max values for the X axis, which is pretty easy to do in the new charting interface in RapidMiner 9.2.

  • msacs09
    msacs09 New Altair Community Member
    Thank you all