amueller / scipy_2015_sklearn_tutorial

Scikit-Learn tutorial material for Scipy 2015
Creative Commons Zero v1.0 Universal
576 stars 311 forks source link

cross validation #62

Closed MEHWISHSABA closed 7 years ago

MEHWISHSABA commented 7 years ago

i m doing cross validation .the following code as shown.what;s error in this because it gives an error plz solve this issue..

from sklearn.cross_validation import KFold

def run_cv(X,y,clf_class,**kwargs):

Construct a kfolds object

kf = KFold(len(y),n_folds=5,shuffle=True)
y_pred = y.copy()

# Iterate through folds
for train_index, test_index in kf:
    X_train, X_test = X[train_index], X[test_index]
    y_train = y[train_index]
    # Initialize a classifier with key word arguments
    clf = clf_class(**kwargs)
    clf.fit(X_train,y_train)
    y_pred[test_index] = clf.predict(X_test)
return y_pred

E:\Anaconda folder\lib\site-packages\sklearn\cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20. "This module will be removed in 0.20.", DeprecationWarning) what should i do now???

amueller commented 7 years ago

It's not an error, it's a warning, and the code still works. To avoid the warning, use the updated version of the tutorial at https://github.com/amueller/scipy-2017-sklearn/

MEHWISHSABA commented 7 years ago

sir updated version for what

On Mon, Jul 17, 2017 at 9:25 PM, Andreas Mueller notifications@github.com wrote:

Closed #62 https://github.com/amueller/scipy_2015_sklearn_tutorial/issues/62.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amueller/scipy_2015_sklearn_tutorial/issues/62#event-1166723463, or mute the thread https://github.com/notifications/unsubscribe-auth/AXuJE1f7ZOIF3LZrJCs4WmDDCB2fSdnlks5sO4nNgaJpZM4OZoGm .

MEHWISHSABA commented 7 years ago

i m doing this code at jupyter notebook

On Tue, Jul 18, 2017 at 1:16 AM, saba mehwish sabamehwish212@gmail.com wrote:

sir updated version for what

On Mon, Jul 17, 2017 at 9:25 PM, Andreas Mueller <notifications@github.com

wrote:

Closed #62 https://github.com/amueller/scipy_2015_sklearn_tutorial/issues/62.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amueller/scipy_2015_sklearn_tutorial/issues/62#event-1166723463, or mute the thread https://github.com/notifications/unsubscribe-auth/AXuJE1f7ZOIF3LZrJCs4WmDDCB2fSdnlks5sO4nNgaJpZM4OZoGm .

MEHWISHSABA commented 7 years ago

dear sir. i need data description of the customer churn dataset this is the link of dataset https://github.com/tarikd/Churn-Prediction/blob/master/churn.csv

i extremely need it .because i want to know why these fields(state, area code,phone number ,churn) are removed in customer churn dataset .so that i will be able to get the information about dataset. so please sir send me data description as soon as possible. i will be very thankful to you.

On Tue, Jul 18, 2017 at 1:16 AM, saba mehwish sabamehwish212@gmail.com wrote:

i m doing this code at jupyter notebook

On Tue, Jul 18, 2017 at 1:16 AM, saba mehwish sabamehwish212@gmail.com wrote:

sir updated version for what

On Mon, Jul 17, 2017 at 9:25 PM, Andreas Mueller < notifications@github.com> wrote:

Closed #62 https://github.com/amueller/scipy_2015_sklearn_tutorial/issues/62.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amueller/scipy_2015_sklearn_tutorial/issues/62#event-1166723463, or mute the thread https://github.com/notifications/unsubscribe-auth/AXuJE1f7ZOIF3LZrJCs4WmDDCB2fSdnlks5sO4nNgaJpZM4OZoGm .

MEHWISHSABA commented 7 years ago

sir is the link working and opening the github to you ,because its not working to me now i dont know what happened to this site but sir i need data dictionary of customer churn dataset . plz sir send me as soon as possible i extremely need that i need data dictionary earlier i wrote data description sorry for that

On Tue, Jul 18, 2017 at 1:24 AM, saba mehwish sabamehwish212@gmail.com wrote:

dear sir. i need data description of the customer churn dataset this is the link of dataset https://github.com/tarikd/Churn-Prediction/blob/master/churn.csv

i extremely need it .because i want to know why these fields(state, area code,phone number ,churn) are removed in customer churn dataset .so that i will be able to get the information about dataset. so please sir send me data description as soon as possible. i will be very thankful to you.

On Tue, Jul 18, 2017 at 1:16 AM, saba mehwish sabamehwish212@gmail.com wrote:

i m doing this code at jupyter notebook

On Tue, Jul 18, 2017 at 1:16 AM, saba mehwish sabamehwish212@gmail.com wrote:

sir updated version for what

On Mon, Jul 17, 2017 at 9:25 PM, Andreas Mueller < notifications@github.com> wrote:

Closed #62 https://github.com/amueller/scipy_2015_sklearn_tutorial/issues/62.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amueller/scipy_2015_sklearn_tutorial/issues/62#event-1166723463, or mute the thread https://github.com/notifications/unsubscribe-auth/AXuJE1f7ZOIF3LZrJCs4WmDDCB2fSdnlks5sO4nNgaJpZM4OZoGm .

amueller commented 7 years ago

yes, the link to the 2017 version works. Maybe check it out in github and not in your mail. And I'm not sure what your churn data has to do with this issue.

MEHWISHSABA commented 7 years ago

sir my churn dataset will predict those customers who are likely to leave company that's way i need data dictionary to know the description plz sir send me data dictionary customer churn data set .this is dataset

On Tue, Jul 18, 2017 at 7:57 PM, Andreas Mueller notifications@github.com wrote:

yes, the link to the 2017 version works. Maybe check it out in github and not in your mail. And I'm not sure what your churn data has to do with this issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amueller/scipy_2015_sklearn_tutorial/issues/62#issuecomment-316091127, or mute the thread https://github.com/notifications/unsubscribe-auth/AXuJE-rX0QOwEitaxrVHaNu1L3CAgmLiks5sPMfqgaJpZM4OZoGm .