Coder Social home page Coder Social logo

Comments (18)

shankarpandala avatar shankarpandala commented on May 20, 2024 6

We can see which model is running by setting verbose>1
Some models take really long time and memory to build models.

I have manually removed them from the list already but still there are some models that take long time.

My long term plan is to divide algorithms by time-complexity let users choose which complexity they want

from lazypredict.

SSMK-wq avatar SSMK-wq commented on May 20, 2024 2

@shankarpandala - how to specify the list of algorithms that we want to try? Is there any syntax that you can share? Am not able to find anything in the documentation. Can help please?

from lazypredict.

dchecks avatar dchecks commented on May 20, 2024 2

@shankarpandala - how to specify the list of algorithms that we want to try? Is there any syntax that you can share? Am not able to find anything in the documentation. Can help please?

Here's some code to only include regressors that are in the "chosen_regressors" list.
The actual list of regressors is quite long, if you want them jump into the code def for the LazyRegressor class. I've just included the first two in the list for this example.

from sklearn.utils import all_estimators
from sklearn.base import RegressorMixin
chosen_regressors = [
    'SVR',
    'BaggingRegressor'
]

REGRESSORS = [
    est
    for est in all_estimators()
    if (issubclass(est[1], RegressorMixin) and (est[0] in chosen_regressors))
]

reg = LazyRegressor(verbose=1, ignore_warnings=False, custom_metric=None, regressors=REGRESSORS)

I had this issue with the 'GaussianProcessRegressor'
You'll see the code that this has been adapted from here

from lazypredict.

jahnfirth avatar jahnfirth commented on May 20, 2024 1

I've had a similar issue as described by @SSMK-wq. My LazyRegressor got stuck on 74% too and I had left it for 2h+.

My dataset is around 8000r/150c, filled with binary independent 1/0 values predicting a continuous target variable.

I use lazypredict as an initial screen and have enjoyed it's user-friendly low code workflow.

@shankarpandala It would be great if you could include a timeout = threshold parameter within the LazyRegressor() that when passed the algorithm would skip to the next model. This would save a lot of time and avoid waiting for a model which you probably wouldn't use.

Thanks a lot for all your work. Top stuff!

from lazypredict.

Unco3892 avatar Unco3892 commented on May 20, 2024 1

@dchecks I have the same issue, and using your method, I specified all the models except GaussianProcessRegressor and the training worked. Thanks for posting this.

from lazypredict.

brendalf avatar brendalf commented on May 20, 2024

Hi @Vinitkumar89 , thank you for the report.

How many features your dataset has? There is categorical features or all features are numerical?

from lazypredict.

Vinitkumar89 avatar Vinitkumar89 commented on May 20, 2024

Hi @brendalf.

sorry for the late reply.
It has 2 categorical and 10 numerical features in it. with train data having 550068 rows and test data having 233529 rows.

from lazypredict.

brendalf avatar brendalf commented on May 20, 2024

@shankarpandala, can you help me here? You know what model the lazypredict is stuck (step 26/43)?
Different version of lazypredict tends to have a different number of classifiers/regressors to train. I think that a quick win here can be the progress bar showing up what model is currently running.

from lazypredict.

abbasshujah avatar abbasshujah commented on May 20, 2024

I would like to work on this I might have an idea on how to improve the speed. How do I contribute

from lazypredict.

SSMK-wq avatar SSMK-wq commented on May 20, 2024

@shankarpandala - I also face the same issue. It is stuck at 74% more than 5 hours. My dataset size is also small. It has only 5900 rows and 70 features. could 70 features be the culprit? I didn't do feature engineering/selection yet. I just passed the train and test as it is to see how the model is doing. Can help me please? Is there anyway to fix this issue? I can sponsor by paying 50 USD

from lazypredict.

shankarpandala avatar shankarpandala commented on May 20, 2024

I've had a similar issue as described by @SSMK-wq. My LazyRegressor got stuck on 74% too and I had left it for 2h+.

My dataset is around 8000r/150c, filled with binary independent 1/0 values predicting a continuous target variable.

I use lazypredict as an initial screen and have enjoyed it's user-friendly low code workflow.

@shankarpandala It would be great if you could include a timeout = threshold parameter within the LazyRegressor() that when passed the algorithm would skip to the next model. This would save a lot of time and avoid waiting for a model which you probably wouldn't use.

Thanks a lot for all your work. Top stuff!

There is already a way to skip models by specifying the algorithms. Time based skipping doesn't work with windows so I didn't implement it

from lazypredict.

shankarpandala avatar shankarpandala commented on May 20, 2024

@shankarpandala - I also face the same issue. It is stuck at 74% more than 5 hours. My dataset size is also small. It has only 5900 rows and 70 features. could 70 features be the culprit? I didn't do feature engineering/selection yet. I just passed the train and test as it is to see how the model is doing. Can help me please? Is there anyway to fix this issue? I can sponsor by paying 50 USD

Maybe some algorithm is taking a long time to train.
You can skip those algorithms that are taking time. You can specify the list of algorithms you want.

from lazypredict.

hakkache avatar hakkache commented on May 20, 2024

Hello dears,

@Vinitkumar89 maybe you are facing the same issue as me .
make the parametrs Verbose =1 and ignore_warnings=False to see the warnings messages .

For my case i am using OneHotEncoder for the Categorical Data but when i am fitting the Data to LazyRegressor he show me a warning regrading the unkown categories found . (There is some categories on test dataset not available on training dataset)
on OneHotEncoder there is a way to avoid the issue by making the parameter "handle_unknown="ignore" " but on lazyPredict Package i didn't found anything useful for solve this issue on Documentation .

@shankarpandala could you please help if there is anyway to avoid this issue ??

Thanks Guys for This interessting Subject .

from lazypredict.

hakkache avatar hakkache commented on May 20, 2024

Hello Dears ,

i hope you're doing fine :)
there is any news regarding my question ?

Thanks for your help

from lazypredict.

danielwalke avatar danielwalke commented on May 20, 2024

@SSMK-wq It seems that you can specify it either with a string ("all"), or with a list of classifiers (probably model classifiers from scikit)
if self.classifiers == "all":
self.classifiers = CLASSIFIERS
else:
try:
temp_list = []
for classifier in self.classifiers:
full_name = (classifier.name, classifier)
temp_list.append(full_name)
self.classifiers = temp_list
except Exception as exception:
print(exception)
print("Invalid Classifier(s)")

from lazypredict.

Lramos505 avatar Lramos505 commented on May 20, 2024

I tried adding a LGBM regressor to the list of chosen regressors and it wasn't added, any ideas what I might have done wrong?
image

from lazypredict.

KayO-GH avatar KayO-GH commented on May 20, 2024

@Lramos505 According to the codebase, LGBMRegressor is already included.
Check out line 84 at https://github.com/shankarpandala/lazypredict/blob/dev/lazypredict/Supervised.py
I see it in my output.

Also, you can probably reverse-engineer this GitHub entry to get where you want if you still have issues: https://stackoverflow.com/a/76557962/6712832

from lazypredict.

surzua avatar surzua commented on May 20, 2024

Just for completion, here is the code for classification algorithms. Also,from my experience, SVC is taking too long in problems with real data, so it's better to drop it from classifiers to try with this LazyClassifier.

`from sklearn.utils import all_estimators
from sklearn.base import ClassifierMixin

removed_classifiers = [
"ClassifierChain",
"ComplementNB",
"GradientBoostingClassifier",
"GaussianProcessClassifier",
"HistGradientBoostingClassifier",
"MLPClassifier",
"LogisticRegressionCV",
"MultiOutputClassifier",
"MultinomialNB",
"OneVsOneClassifier",
"OneVsRestClassifier",
"OutputCodeClassifier",
"RadiusNeighborsClassifier",
"VotingClassifier",
'SVC','LabelPropagation','LabelSpreading','NuSV']
classifiers_list = [est for est in all_estimators() if (issubclass(est[1], ClassifierMixin) and (est[0] not in removed_classifiers))]`

from lazypredict.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.