Classifier pipeline that can be used to train and evaluate classification models on various datasets
Project description
Flexible Classifier Pipeline
This repository contains a flexible classifier pipeline that can be used to train and evaluate classification models on various datasets. The pipeline is designed to be versatile and easily adaptable to different datasets and classification tasks.
Overview
- Data Preprocessing: The pipeline preprocesses the input data, handling missing values, scaling numerical features and encoding categorical features as necessary.
- Classification Model: Function tries variety of classification models to use in the pipeline, such as Logistic Regression, Random Forest, Support Vector Machines.
- Cross-Validation: The pipeline performs cross-validation to evaluate the performance of the model on the given dataset. This helps in assessing the generalization ability of the model and avoiding overfitting.
Usage
- Prepare Your Data: Ensure that your data is in a suitable format for classification tasks.
- Import the Pipeline: Import function
process_data
which contains preprocessing steps and the classification model. - Train and Evaluate the Model: Pass your data to the pipeline's function along with the target variable (i.e., the label to be predicted).
- Interpret the Results: The pipeline will determine the average accuracy of the model across the cross-validation folds. Use this metric to assess the performance of the model on your dataset.
- Use generated pipeline for predictions: Function will return generated pipeline.
Example Usage
You can pass path to dataset with column name to classify.
from flexible_classifier import classifier
pipeline = classifier.process_data('data.csv', 'class')
Or pandas DataFrame.
import pandas as pd
from flexible_classifier import classifier
df1 = pd.read_csv('train.csv')
df2 = pd.read_csv('test.csv')
df = pd.concat([df1, df2])
classifier.process_data(df, 'class')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flexible_classifier-0.0.1.tar.gz
(120.4 kB
view hashes)
Built Distribution
Close
Hashes for flexible_classifier-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5ac732d525bc4b3763a7837df66303c570dd0def439e117a96dbf8e4cf38022 |
|
MD5 | b4d8460775dc39a8cbaa4a6d7bb7cd15 |
|
BLAKE2b-256 | 9cedf774579b37081a8f5c536a1be92ebce68aa97346512625e2b099b5bfee6f |
Close
Hashes for flexible_classifier-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22c96561dc4ca31b59f97b93d404e427dece7027faf43c49b6b5d8679c3c8d06 |
|
MD5 | 5bcfe650d7a0a5918a995604bfacb2f0 |
|
BLAKE2b-256 | 6bf9b258aea2e5b1606729638d8c65c158186315196966c28eb257234f52cf2c |