Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KDE smoothing of RMSD/TFD #6

Open
vtlim opened this issue Feb 7, 2020 · 3 comments
Open

KDE smoothing of RMSD/TFD #6

vtlim opened this issue Feb 7, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@vtlim
Copy link
Member

vtlim commented Feb 7, 2020

These metrics have a minimum of zero, but with smoothing, the curves go below zero. Other than plotting histograms, a potential solution is to (1) mirror data to negative side, (2) apply KDE, (3) take the distribution for x>=0 only.

@vtlim
Copy link
Member Author

vtlim commented Feb 12, 2020

I don't think this is the solution, actually. See this simple example:
image

The array x2 has only positive values but applying symmetry before the kernel density estimate completely changes the shape, e.g., the ratio of (when x=2.5) to (when x=0).

@vtlim
Copy link
Member Author

vtlim commented Feb 12, 2020

Setting the "clip" parameter is also not the answer. For example:

no clip:
ridge_tfd

with clip from 0.2 to max(data):
ridge_tfd

@vtlim
Copy link
Member Author

vtlim commented Feb 13, 2020

messing with xlim is not helping either. the kde/facetgrid extends beyond the given limits.

    '''
    pos_only : Boolean
        affects how output after KDE is displayed, only show x-axis >= 0
    '''

    if pos_only:
        g.set_axis_labels(x_label, "").set(xlim=(0.05, df[x_label].max()))
        for ax in g.axes.flat:
            #ax.margins(0.05,0.15)
            ax.set_xlim(0.05,)

ridge_tfd

other references I tried: ref, ref, ref

@vtlim vtlim added the help wanted Extra attention is needed label Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant