
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.