r/scikit_learn • • Mar 04 '24

Best print on demand sites in 2024

9 Upvotes

What is everyone using for their Print on Demand sites at the moment? I have used Gelato, Printify and Printful but looking to change to a new POD service.

I am using POD for posters, wall art, t shirts, sweaters and mugs.

The Print On Demand site needs to supply quality merch, fast shipping and good customer service.

Any recommendations are highly appreciated!

Update: See my comment below. Using Sellfy now. Great service and company.


r/scikit_learn • • Jun 07 '22

A handy scikit-learn cheat sheet to machine learning with Python, including code examples.

Post image
9 Upvotes

r/scikit_learn • • Jun 12 '20

Visualize Scikit-learn models – ROC, PR curves, confusion matrices etc

Thumbnail
app.wandb.ai
7 Upvotes

r/scikit_learn • • Apr 12 '20

Should scikit-learn include an "Estimated Time to Arrival" (ETA) feature? Discuss.

Thumbnail
github.com
7 Upvotes

r/scikit_learn • • Oct 03 '19

When to use these unsupervised algorithms?

7 Upvotes

There are a lot of modules in sklearn. I am interested when these unsupervised algorithmes (bellow )are used.
When to use a Gaussian mixture model? When to use Manifold Learning, When to Biclustering? etc.


r/scikit_learn • • Jan 26 '24

Building Data Science Applications - Gael Varoquaux creator of Scikit Learn

Thumbnail
youtu.be
6 Upvotes

r/scikit_learn • • Nov 19 '21

Feature Selection for Sklearn using AI

6 Upvotes

Hi, I just want to let you know that the sklearn-genetic-opt version 0.7.0 is now available, it implements feature selection using evolutionary algorithms, it uses a multi-objective function to optimize the cross-validation score while minimizing the number of features used. It's compatible with any sklearn classifier or regressor.

Let me know if you have any question/suggestion

This new feature is compatible with all the callbacks, tensorboard and mlflow, for example using the progress bar callback:

You can check here the docs: https://sklearn-genetic-opt.readthedocs.io/en/stable/

If you would like to contribute or to check the implementation, here is the repo: https://github.com/rodrigo-arenas/Sklearn-genetic-opt


r/scikit_learn • • Oct 12 '20

A scikit-learn compatible library to construct and benchmark rule-based systems that are designed by humans

Thumbnail
koaning.github.io
6 Upvotes

r/scikit_learn • • Sep 30 '20

Scikit-learn. In the case of a single point, k-nearest neighbours predictions doesn’t literally match with the literally nearest point. I think I know why. Correct me if I’m wrong.

6 Upvotes

Hello. I’ve looked at the source code.

Case population sizes in the range 10 ^ 2 to 10 ^ 5 ish. Vanilla, straight out the box knn from scikit-learn. Except 1 nearest neighbours not the default 5.

When I try to predict the nearest neighbour of a point, using 1 nearest neighbours. after using knn.fit to make a model, it doesn’t always return the same value of the actual nearest neighbour. I’ve worked out the actual real nearest neighbour myself to check, using trig, and unit tested it.

I think that’s because for pragmatic reasons knn is just a probabilistic model applied at group level. Not exactly the actual knn for each and every point.

Am I right?

EDIT: My. Trig. Was. Wrong. Due. To. A. Data frame. Handling. Issue. Ggaaahhhh.


r/scikit_learn • • Mar 05 '19

Predicting the runtime of scikit-learn algorithms

6 Upvotes

Hey guys,

We're two friend who met in college and learned Python together, we co-created a package which can provide an estimate for the training time of scikit-learn algorithms.

The main function in this package is called “time”. Given a matrix vector X, the estimated vector Y along with the Scikit Learn model of your choice, time will output both the estimated time and its confidence interval.

Let’s say you wanted to train a kmeans clustering for example, given an input matrix X. Here’s how you would compute the runtime estimate:

From sklearn.clusters import KMeans
from scitime import Estimator 
kmeans = KMeans()
estimator = Estimator(verbose=3) 
# Run the estimation
estimation, lower_bound, upper_bound = estimator.time(kmeans, X)

We are able to predict the runtime to fit by using our own estimator, we call it meta algorithm (meta_algo), whose weights are stored in a dedicated pickle file in the package metadata.

The meta algos estimate the time to fit using a set of ‘meta’ features, including the parameters of the algo itself (in this case kmeans) and also external parameters such as cpu, memory or number of rows/columns.

We built these meta algos by generating the data ourselves using a combination of computers and VM hardwares to simulate what the training time would be on the different systems, circling through different values of the parameters of the algo and dataset sizes .

Check it out! https://github.com/nathan-toubiana/scitime

Any feedback is greatly appreciated.


r/scikit_learn • • Mar 05 '17

Scikit learn vs Open Cv for small problems in image processing

6 Upvotes

I am a Image processing noob. I've used Numpy and Scipy for some matrix related stuff before and OpenCV for some image processing problems. I recently learned that scipy lets me manipulate images too. What are the pros and cons of using OpenCv and Scipy I am not able to figure out which would be better for me. Appreciate your help!


r/scikit_learn • • Jun 11 '20

Scikit Learn Tutorial in One Hour

Thumbnail
youtube.com
5 Upvotes

r/scikit_learn • • Oct 18 '18

modAL: A modular active learning framework for Python, built on top of scikit-learn

Thumbnail
github.com
5 Upvotes

r/scikit_learn • • Jul 31 '24

Check out how to run a scikit-learn code sample and implement ML workloads on Intel Tiber Developer Cloud

Thumbnail
community.intel.com
4 Upvotes

r/scikit_learn • • Jul 29 '22

Using Pandas DataFrame vs Numpy Array

4 Upvotes

Why am I getting two different predictions, and two different R2 for the same data, when I use a dataframe vs array for X?

def regression_NN(df, X_names, y_name):
    X = df[X_names].to_numpy() #***** vs: df[X_names]
    y = df[y_name].to_numpy()

    X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=1, test_size=0.2)
    sc_X = StandardScaler()
    X_trainscaled = sc_X.fit_transform(X_train)
    X_testscaled = sc_X.transform(X_test)


    reg = MLPRegressor(hidden_layer_sizes=(5,5,5),  activation="relu", random_state=1, max_iter=20000).fit(X_trainscaled, y_train)

    y_pred = reg.predict(X_testscaled)
    score = r2_score(y_pred, y_test)
    print(y_pred)
    print("The R^2 Score with X_testscaled", score)

r/scikit_learn • • Apr 29 '22

Chassis.ml: FOSS project that turns scikit-learn models into containers

4 Upvotes

A few of my teammates and I just launched a new open source project called chassis.ml. It's a python service and SDK that wraps ML models into containers that can run just about anywhere (Docker, K8s, KServe, etc.) and includes a simple inference API. You can even define how you want your model to

  • pre-process inputs

  • operate on GPUs

  • run on both ARM and x86 processors.

Anyway, it's brand new so if it sounds useful, we invite you to try it out and let us know what you think! Thanks! Here's the how-to guide for packaging scikit-learn models: https://chassis.ml/how-to-guides/frameworks/#scikit-learn


r/scikit_learn • • Mar 21 '22

What are the cons in not using sklearn Pipelines?

4 Upvotes

I have tried to adapt using sklearn Pipelines but I am facing the following issues when trying to use it:

  • The Pipeline uses numpy arrays. I find it hard to keep track what goes on with my preprocessing and features when everything is an array of numbers (as opposed to Pandas DataFrames where I have titles for the data columns).

  • If I want to implement unit tests to verify that individual steps in my pipeline work as intended I find it complex to do with sklearn Pipelines because of the level of abstraction it adds on top of my code.

  • It takes time to learn how to properly use all the Pipeline related machinery in sklearn.

What are the biggest cons if I choose to build my ML pipelines without sklearn's Pipeline objects? Is it ok to not use sklearn Pipeline?

Also, what would you suggest for mitigating the issues above if I would choose to go with sklearn Pipelines?


r/scikit_learn • • Sep 19 '21

Host and serve your Scikit-learn, TensorFlow, and PyTorch models in minutes

4 Upvotes

Hi All,

I want to let you know about a project I had been working on called FlashAI.io , which addresses some of the operational issues I came across when delivering models to clients or at the workplace.

I wanted to spend my time building great models instead of thinking about the infrastructure complexities of hosting and serving them, so I put together a service to do exactly that.

So if you want to enable clients, colleagues, or apps to send inference requests to your models, FlashAI lets you do this via web requests.

Serve your models 24/7 without any hassle.

The workflow is straight forward:

* Train your model locally

* Upload your model file to FlashAI.io

* Send inference requests to your model

Currently this service supports Scikit-learn, TensorFlow, and PyTorch models.

Try it out at flashai.io

You can check out the intro video here: https://youtu.be/0yxUmZ2GnX8

Please let me know what you think and if you have any suggestions for other features.


r/scikit_learn • • Jun 28 '21

Package for auto hyperparameters tuning of scikit-learn models

4 Upvotes

Hi everyone, I want to share with you this open source project that you can use to tune your supervised models from scikit-learn with some cool features.

Docs: https://sklearn-genetic-opt.readthedocs.io/ Repo: https://github.com/rodrigo-arenas/Sklearn-genetic-opt

Sklearn-genetic-opt uses evolutionary algorithms to choose the set of hyperparameters that optimizes (max or min) the cross-validation scores, it can be used for both regression and classification problems.

Currently it has these features:

  • GASearchCV: Principal class of the package, holds the evolutionary cross validation optimization routine.

  • Algorithms: Set of different evolutionary algorithms to use as optimization procedure.

  • Callbacks: Custom evaluation strategies to generate early stopping rules, logging (into TensorBoard, .pkl files, etc) or your custom logic.

  • Plots: Generate pre-defined plots to understand the optimization process.

  • MLflow: Build-in integration with mlflow to log all the hyperparameters, cv-scores and the fitted models.

Any feedback, suggestion, contribution or comments are very welcome!


r/scikit_learn • • Feb 04 '21

How to Speed Up Scikit-Learn Training

Thumbnail
medium.com
4 Upvotes

r/scikit_learn • • Sep 15 '20

How the 'init' parameter of GradientBoostingRegressor works?

4 Upvotes

i'm trying to create an ensemble of an determined regressor, with this in mind i've searched for some way to use the sklearn already existing ensemble methods, and try to change the base estimator of the ensemble. the bagging documentation is clear because it says that you can change the base estimator by passing your regressor as parameter to "base_estimator", but with GradientBoosting you can pass a regressor in the "init" parameter. my question is: passing my regressor in the init parameter of the GradientBoosting, will make it use the regressor i've specified as base estimator instead of trees? the documentation says that the init value must be "An estimator object that is used to compute the initial predictions", so i dont know if the estimator i'll pass in init will be the one used in fact as the weak learner to be enhanced by the bosting method, or it will just be used at the beginning and after that all the work is done by decision trees. If someone can help me with this question i would be grateful.


r/scikit_learn • • Nov 08 '19

The best alpha for ridge regression is... -85???

Post image
4 Upvotes

r/scikit_learn • • Sep 10 '19

Predict device from flow

4 Upvotes

Hey guys, I applied to a competition about AI and my task is to predict device class from flow. I have 13 types of classes which are all in train set but the test set is missing that one column. After I run training and then I try to predict it, I receive an error stating this: ValueError: query data dimension must match training data dimension.

How can I predict a column that is not there? I don't believe that I have to manually put the column to the test.json

Thanks for advices.


r/scikit_learn • • May 27 '24

Deploying machine learning model to mobile application

3 Upvotes

I am trying to deploy my machine learning model (in skearn) to my mobile application (iOS and Android). I read a lot about it online but I am afraid that it might affect the performance of my model. Can anyone provide any help or advice on this? Thank you.