Skip to main content

kydavra

Kydavra is a python sci-kit learn inspired package for feature selection. It used some statistical methods to extract from pure pandas Data Frames the columns that are related to column that your model should predict. This version of kydavra has the next methods of feature selection:

  • ANOVA test selector (ANOVASelector)
  • Chi squared selector (ChiSquaredSelector)
  • Genetic Algorithm selector (GeneticAlgorithmSelector)
  • Kendall Correlation selector (KendallCorrelationSelector)
  • Lasso selector (LassoSelector)
  • Pearson Correlation selector (PearsonCorrelationSelector)
  • Point-Biserial selector (PointBiserialCorrSelector)
  • P-value selector (PValueSelector)
  • Spearman Correlation selector (SpermanCorrelationSelector)
  • Shannon selector (ShannonSelector)
  • ElasticNet Selector (ElasticNetSelector)
  • M3U Selector (M3USelector)
  • MUSE Selector (MUSESelector)
  • Mixer Selector (MixerSelector)
  • PCA Filter (PCAFilter)
  • PCA Reducer (PCAReducer)
  • LDA Reducer (LDAReducer)
  • Bregman Divergence selector (BregmanDivergenceSelector)
  • Fisher Selector (FisherSelector)
  • ICA Reducer (ICAReducer)
  • ICA Filter (ICAFilter)
  • Itakura-Saito Divergence selector (ItakuraSaitoSelector)
  • Jensen-Shannon Divergence selector (JensenShannonSelector)
  • Kullback-Leibler selector (KullbackLeiblerSelector)
  • MultiSURF selector (MultiSURFSelector)
  • Phik selector (PhikSelector)
  • ReliefF selector (ReliefFSelector)

All these methods takes the pandas Data Frame and y column to select from remained columns in the Data Frame.

How to use kydavraTo use selector from kydavra you should just import the selector from kydavra in the following framework:

from kydavra import PValueSelector

class names are written above in parantheses.Next create a object of this algorithm (I will use p-value method as an example).

method = PValueSelector()

To get the best feature on the opinion of the method you should use the 'select' function, using as parameters the pandas Data Frame and the column that you want your model to predict.

selected_columns = method.select(df, 'target')

Returned value is a list of columns selected by the algorithm.

Some methods could plot the process of selecting the best features.In these methods dotted are features that wasn't selected by the method.ChiSquaredSelector

method.plot_chi2()

For ploting and

method.plot_chi2(save=True, file_path='FILE/PATH.png')

and

method.plot_p_value()

for ploting the p-values.LassoSelector

method.plot_process()

also you can save the plot using the same parameters.PValueSelector

method.plot_process()

Some advice.

  • Use ChiSquaredSelector for categorical features.
  • Use LassoSelector and PValueSelector for regression problems.
  • Use PointBiserialCorrSelector for binary classification problems.
  • Use ShannonSelector to choose whatever to keep the NaN values (as another value) and to drop column with a lot of NaN values.

With love from Sigmoid.

We are open for feedback. Please send your impression to vladimir.stojoc@gmail.com

Metadata

Release files for kydavra 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kydavra 0.3.4
File Size Uploaded Provenance Actions
kydavra-0.3.4.tar.gz 29.0 kB Without provenance Details for kydavra-0.3.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kydavra 0.3.4
File Interpreter ABI Platform Actions
kydavra-0.3.4-py3-none-any.whl Python 3 none any Details for kydavra-0.3.4-py3-none-any.whl

Total release size: 76.1 kB

Release files / kydavra-0.3.4.tar.gz

Download URL kydavra-0.3.4.tar.gz
Size 29.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cf45e1fe2492c54d0d38c3f5752c127e116e96c58f4142286d046d7aa5004c44
BLAKE2b-256 checksum
How to use checksums
fc0ad2e796ac41845872dcacfdecb1fe3de60eb4458af9512aa37b8ae384b6db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Release files / kydavra-0.3.4-py3-none-any.whl

Download URL kydavra-0.3.4-py3-none-any.whl
Size 47.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fdfc25b85a4b0a4de5b580fa1bcec71000ff4a366072f8ca2d2d424ce2c2b05
BLAKE2b-256 checksum
How to use checksums
1b6e00488814fd1a9637a1e95e5c6b2a2e06bf06de58cc472e8c8e3f9b845f2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Security for kydavra 0.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page