
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
A Python package for integrating scikit-learn feature selection with multi-label problem transformation methods.
Scikit-PTM-FS is a Python library that enables seamless integration of scikit-learn
feature selection methods with multi-label classification via problem transformation methods (PTMs). The framework enables transformation-aware feature selection without requiring classification stages, allowing researchers to analyze the behavior of FS methods across various PTMs.
pip install scikit-ptm-fs
Here is a basic example of how to apply a feature selection method within a problem transformation method using Scikit-PTM-FS
:
from scikit_ptm_fs.problem_transformation import LabelPowerset
from sklearn.feature_selection import SelectKBest, f_classif
# Example feature and label matrices (replace with your own)
# X = ... # shape (n_samples, n_features)
# y = ... # shape (n_samples, n_labels)
# Step 1: Define a scikit-learn selector
selector = SelectKBest(score_func=f_classif, k=5)
# Step 2: Wrap it using the LabelPowerset PTM
lp_selector = LabelPowerset(selector=selector, require_dense=[False, True])
# Step 3: Apply feature selection
X_selected = lp_selector.fit_transform(X, y)
# Step 4: Get selected feature indices
selected_indices = lp_selector.get_support()
print("Selected features:", selected_indices)
indices = np.where(lp_selector.get_support())[0]
print("The Number of Selected Features:", len(indices))
💡 You can use other PTMs like
BinaryRelevance
,PPT
, orPairwiseComparison
similarly.
This project is licensed under the MIT License.
FAQs
A Python package for integrating scikit-learn feature selection with multi-label problem transformation methods.
We found that scikit-ptm-fs 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
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.