Skip to content
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

FileNotFoundError: [Errno 2] No such file or directory: 'pickle/train_data_resampled.pkl' #2

Open
sensito opened this issue Jun 6, 2019 · 3 comments

Comments

@sensito
Copy link

sensito commented Jun 6, 2019

System: Ubuntu 16.4
User: root
Python: 2
console:
`python adasyn.py
Loading creditcard.csv
test
starting...
adasyn.py:24: DeprecationWarning:
.ix is deprecated. Please use
.loc for label based indexing or
.iloc for positional indexing

See the documentation here:
http://pandas.pydata.org/pandas-docs/stable/indexing.html#ix-indexer-is-deprecated
np.array(X_train.ix[:, X_train.columns != 'Class']),
pickling...
Traceback (most recent call last):
File "adasyn.py", line 28, in
with open('pickle/train_data_resampled.pkl', 'wb+') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'pickle/train_data_resampled.pkl'
`

Jupyter notebook project.ipynb:
In[13]:

Resample the Training Data using ADASYN

The test data remains imbalanced

#from imblearn.over_sampling import ADASYN
#ada = ADASYN()
#data_resampled, data_labels_resampled = ada.fit_sample(

np.array(X_train.ix[:, X_train.columns != 'Class']),

np.array(X_train.Class))

SLOW so will just unpickle something that was run previously

with open('pickle/train_data_resampled.pkl', 'rb') as f:
X_train_resampled = pickle.load(f)
with open('pickle/train_data_labels_resampled.pkl', 'rb') as f:
X_train_labels_resampled = pickle.load(f)

print(Counter(X_train_labels_resampled))

X_train_resampled = pd.DataFrame(X_train_resampled)
X_train_labels_resampled = pd.DataFrame(X_train_labels_resampled)
X_train_resampled = pd.concat([X_train_resampled, X_train_labels_resampled], axis=1)
X_train_resampled.columns = X_train.columns
X_train_resampled.head()

`FileNotFoundError Traceback (most recent call last)
in
8 # np.array(X_train.Class))
9 # SLOW so will just unpickle something that was run previously
---> 10 with open('pickle/train_data_resampled.pkl', 'rb') as f:
11 X_train_resampled = pickle.load(f)
12 with open('pickle/train_data_labels_resampled.pkl', 'rb') as f:

FileNotFoundError: [Errno 2] No such file or directory: 'pickle/train_data_resampled.pkl'`

@lucas8023
Copy link

have you deal with the problem yet?

@sensito
Copy link
Author

sensito commented Sep 4, 2019

no, I did not succeed and did not try again

@yytcyytc
Copy link

where is train_data_resampled.pkl??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants