🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

selectml

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selectml

A streamlined pipeline for model selection, data preprocessing, training, and evaluation

0.1.1
PyPI
Maintainers
1

SelectML

SelectML is an all‑in‑one pipeline for model selection, data preprocessing, training, and evaluation tailored for classification tasks. Designed for data scientists, it streamlines the process of choosing the most suitable model without requiring additional imports.

Features

  • Data Preprocessing: Automatic scaling and one‑hot encoding.
  • Model Selection: Choose between logistic regression, random forest, or SVM.
  • Integrated Pipeline: Automatically split data, train models, and evaluate performance.

Installation

Install via pip (after publishing):

pip install selectml

Quick Start

import pandas as pd
from selectml import ModelSelectionPipeline

# Sample dataset
data = {
    'age': [25, 32, 47, 51, 23, 45, 36, 29],
    'income': [50000, 60000, 80000, 90000, 40000, 75000, 65000, 55000],
    'city': ['New York', 'Los Angeles', 'Chicago', 'Houston', 'Phoenix', 'Philadelphia', 'San Antonio', 'San Diego'],
    'purchased': [0, 1, 0, 1, 0, 1, 1, 0]
}
df = pd.DataFrame(data)

numerical_features = ['age', 'income']
categorical_features = ['city']

# Initialize pipeline with desired model type
pipeline = ModelSelectionPipeline(model_type='random_forest')
result = pipeline.run_pipeline(df, target='purchased', 
                               numerical_features=numerical_features, 
                               categorical_features=categorical_features)

print("Accuracy:", result['accuracy'])
print("Classification Report:\n", result['report'])

License

This project is licensed under the MIT License.

FAQs

Did you know?

Socket

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.

Install

Related posts