Skip to content

Add scikit-learn models with OpenVINO optimization for AI PC training #4476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

leoheim
Copy link

@leoheim leoheim commented Jul 21, 2025

Summary

Mentor:'@SHIVAMBASIA'

This PR introduces comprehensive scikit-learn model wrappers with OpenVINO optimization as part of the GSoC 2025 "AI PC Model Training Kit" project. The implementation enables developers to train classical ML models on local machines using OpenVINO's optimized backend

Added features:

  • scikit-learn model wrappers across classification, regression, clustering, decomposition, and neighbors categories
  • Automatic OpenVINO optimization via sklearnex integration
  • Model persistence with joblib save/load functionality
  • OpenVINO IR export support for compatible models

Models included:

  • Classification: LogisticRegression, RandomForestClassifier, KNeighborsClassifier, SVC, NuSVC
  • Regression: LinearRegression, Ridge, ElasticNet, Lasso, RandomForestRegressor, KNeighborsRegressor, SVR, NuSVR
  • Clustering: KMeans, DBSCAN
  • Decomposition: PCA, IncrementalPCA, TSNE
  • Neighbors: NearestNeighbors

How to test

from otx.backend.openvino.models.scikit_learn import LogisticRegression
from sklearn.datasets import make_classification

# Generate sample data
X, y = make_classification(n_samples=1000, n_features=20, random_state=42)

# Initialize and train
model = LogisticRegression()
model.fit(X, y)

# Test save/load
model.save_model("test_model.joblib")
model.load_model("test_model.joblib")

# Test IR export (for supported models)
model.convert_to_ir(X, model_name="test_model")

@github-actions github-actions bot added the DOC Improvements or additions to documentation label Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DOC Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant