You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

xdat

Package Overview
Dependencies
Maintainers
1
Versions
285
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xdat - pypi Package Compare versions

Comparing version
0.1.299
to
0.1.300
+1
-1
PKG-INFO
Metadata-Version: 2.4
Name: xdat
Version: 0.1.299
Version: 0.1.300
Summary: eXtended Data Analysis Toolkit

@@ -5,0 +5,0 @@ Home-page: https://bitbucket.org/hermetric/xdat/

Metadata-Version: 2.4
Name: xdat
Version: 0.1.299
Version: 0.1.300
Summary: eXtended Data Analysis Toolkit

@@ -5,0 +5,0 @@ Home-page: https://bitbucket.org/hermetric/xdat/

@@ -1,1 +0,1 @@

0.1.299
0.1.300

@@ -10,2 +10,3 @@ import inspect

from scipy import signal
from scipy import stats
from munch import Munch as MunchDict

@@ -205,1 +206,19 @@

return matches
def x_mode_kde(a, kde_cov=0.25, grid_size=1024):
if len(a) == 0:
return None
elif len(a) == 1:
return a[0]
elif len(a) == 2:
return np.mean(a)
kde = stats.gaussian_kde(a)
kde.covariance_factor = lambda: kde_cov
kde._compute_covariance()
xs = np.linspace(a.min(), a.max(), grid_size)
return xs[np.argmax(kde(xs))]

@@ -66,2 +66,15 @@ import numpy as np

class ModeKDE(_Agg):
def __init__(self, col_name, kde_cov=0.25, grid_size=1024):
super().__init__(col_name)
self.kde_cov = kde_cov
self.grid_size = grid_size
from . import x1d
self.x_mode_kde = x1d.x_mode_kde
def _get_func(self):
return lambda a: self.x_mode_kde(a, kde_cov=self.kde_cov, grid_size=self.grid_size)
class Percentile(_Agg):

@@ -68,0 +81,0 @@ def __init__(self, col_name, percentile=50.0):

@@ -373,3 +373,4 @@ from contextlib import contextmanager

df = pd.DataFrame({'Target': y_true, 'Model Score': y_score})
sns.histplot(data=df, x='Model Score', hue='Target', element="step", common_norm=False, stat='percent', bins=bins)
ax = sns.histplot(data=df, x='Model Score', hue='Target', element="step", common_norm=False, stat='percent', bins=bins)
ax.axvline(x=0.5, ls=':', color='grey')

@@ -1160,3 +1161,3 @@ title2 = 'Histogram of model scores'

def plot_multi(df, kind=None, plot_func=None, x=None, y=None, var_name='variable', value_name='value', plot_on=None, group_on=None, color_on=None, annotate_on=None, cmap=None, label_on=None, style_on=None, size_on=None, figsize=(10,6), alpha=1.0, hdi_probs=(0.1, 0.25, 0.5, 0.8, 0.999), kde_cov=0.25, x_kde=False, kde_percentile=None, hist_calc='perc', hist_type='step', hist_bins=10, hist_range=None, title='', x_axis_type=None, y_axis_type=None, x_axis_fmt=None, y_axis_fmt=None, invert_yaxis=False, legend_loc='best', xlim=None, ylim=None, save_to=None, clear_folder=False, add_date=True, add_counts=True, plot_decorate_func=None, drop_na=True, as_xpptx=None, desc='', slide_note='', reset_colors=False, show=True, web=False, tooltip_on=None, **kwargs):
def plot_multi(df, kind=None, plot_func=None, x=None, y=None, var_name='variable', value_name='value', plot_on=None, group_on=None, color_on=None, annotate_on=None, cmap=None, label_on=None, style_on=None, size_on=None, figsize=(10,6), alpha=1.0, hdi_probs=(0.1, 0.25, 0.5, 0.8, 0.999), kde_cov=0.25, x_kde=False, kde_percentile=None, hist_calc='perc', hist_type='step', hist_bins=10, hist_range=None, title='', x_axis_type=None, y_axis_type=None, x_axis_fmt=None, y_axis_fmt=None, x_axis_rotation=None, invert_yaxis=False, legend_loc='best', xlim=None, ylim=None, save_to=None, clear_folder=False, add_date=True, add_counts=True, plot_decorate_func=None, drop_na=True, as_xpptx=None, desc='', slide_note='', reset_colors=False, show=True, web=False, tooltip_on=None, **kwargs):
"""

@@ -1682,2 +1683,5 @@ :param df: input dataframe

if x_axis_rotation:
ax.tick_params(axis="x", labelrotation=x_axis_rotation)
if invert_yaxis:

@@ -1684,0 +1688,0 @@ plt.gca().invert_yaxis()

@@ -49,2 +49,5 @@ """

def __repr__(self):
return f'<Presentation title={self.title} fake={self.fake}>'
def add_slide(self, layout_name, **kwargs):

@@ -51,0 +54,0 @@ add_slide(self.prs, layout_name, **kwargs)