Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Python c extension with method for calculating multidimensional Kolmogorov-Smirnov test
multidimensionalks.test(rvs, cdf=None, counts_rvs=None, counts_cdf=None, n_jobs=1, permutation_samples=0, binomial_significance=False, use_avx=3, max_alpha_beta=True, scale_result=False, deduplicate_data=True, debug=False)
from multidimensionalks import test
import numpy as np
test(np.array([[1, 2, 3], [1, 3, 2]]), cdf=np.array([[1,2,2]]))
rvs
: 2-dimensional numpy number array with rows representing d
-dimensional observations,cdf
: 2-dimensional numpy number array with rows representing second sampled
-dimensional observations,counts_rvs
: in case of rvs
having multiple duplicates, an array without duplicates and a separate array of counts can be provided,counts_cdf
: in case of cdf
having multiple duplicates, an array without duplicates and a separate array of counts can be provided, additionally if cdf
is not given counts_cdf
are taken as counts of elements of rvs
array,n_jobs
: number of threads used during calculation,permutation_samples
: number of times data is shuffled and the statistic value is calculated to estimate pvalue,binomial_significance
: boolean value indicating if statistical significance should be calculated. Defaults to False
,use_avx
: integer value indicating if AVX
instructions should be used during the calculations. 0
disables avx, 3
means to try the best supported set, 1
will try to use AVX512 instruction set and use no otherwise, 2
will try to use AVX2
. Defaults to 3
,max_alpha_beta
: boolean value indicating how λ and β values should be combined. Value True
(default) results in max(λ, β)
. (λ+β)/2
is used otherwise.scale_result
: Whether to scale the statistic by $\sqrt{\frac{|rvs|+|cdf|}{|rvs|\times|cdf|}}$ (default False),deduplicate_data
: Whether to deduplicate data points before running the algorithms,debug
: Whether to print debug data to stdout.If no pvalue calculation method is selected returns ks statistic value, otherwise returns a tuple:
binomial_significance
is set to True
,permutation_samples
is larger than 0
.FAQs
Multidimensional KS test module in python
We found that multidimensionalks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.