question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Very slow in running a classification algorithm - how to make it faster?

See original GitHub issue
  • Lazy Predict version: lazypredict-0.2.7
  • Python version: 3
  • Operating System: Windows

Description

I am trying to run lazypredict code for a classification use-case and it has been stuck at 3% for over 2 hours. the data size is around 15,000 observations. Any way to speed up the code? Thanks!

What I Did

from lazypredict.Supervised import LazyClassifier
from sklearn.model_selection import train_test_split
import numpy as np

X=data['text']
y=data['category_id']
X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=.3,random_state =1)
clf = LazyClassifier(verbose=0,ignore_warnings=True, custom_metric=None)
models,predictions = clf.fit(np.array(X_train), np.array(X_test), np.array(y_train), np.array(y_test))
models

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
vaishalisvpcommented, Jul 21, 2020

hi yes, I was using text data. thanks for clarifying!

1reaction
ramanathan831commented, Jul 17, 2020

Hey, what was your Dataset set and was your processed killed after sometime?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to run your ML model Predictions 50 times faster?
We start by creating a sample dataset with 100,000 rows and using a RandomForestClassifier on top of that. import numpy as np from...
Read more >
Making an optimisation algorithm 10k times faster | MantisNLP
The rest of this blog post focuses on just this problem. We'll be using a tool called line_profiler to inspect the slow moving...
Read more >
How to Speed up Scikit-Learn Model Training - Anyscale
With a more efficient algorithm, you can produce an optimal model faster. One way to do this is to change your optimization algorithm...
Read more >
How To Improve Deep Learning Performance
1) Combine Models​​ If you have multiple different deep learning models, each that performs well on the problem, combine their predictions by ...
Read more >
7 tricks to speed up the training of a neural network
Training the neural networks faster is one of the important factors in deep learning. We generally find such difficulties with the neural ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found