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

executing the code #6

Open
rajneesh-gobin opened this issue Oct 8, 2020 · 3 comments
Open

executing the code #6

rajneesh-gobin opened this issue Oct 8, 2020 · 3 comments

Comments

@rajneesh-gobin
Copy link

i got a copy of the dataset from the email however when executing the script i get the following error
Traceback (most recent call last):
File "main.py", line 22, in
x_test, y_test = timestamped_to_vector(test, vector_col=v, time_start=0, classification_col=c)
File "C:\Users\MT\Google Drive\Dissertation\malware\malware-prediction-rnn\experiments\useful.py", line 130, in timestamped_to_vector
assert int(input_row[classification_col]) in [0,1]
ValueError: cannot convert float NaN to integer

i tried to put a validation if not Nan to continue then the errors keep geting worst

i am using python 3.5.4

can you confirm this is the latest version

@zeHibou
Copy link

zeHibou commented Oct 9, 2020

I encountered the same issue. "as_matrix" seems to be deprecated. Try this in main:

#train = train.as_matrix(columns=headers.training_headers)
#test = test.as_matrix(columns=headers.training_headers)

train = train.reindex(columns=headers.training_headers).to_numpy()
test = test.reindex(columns=headers.training_headers).to_numpy()

x_test, y_test = timestamped_to_vector(test, vector_col=v, time_start=0, classification_col=c)
x_train, y_train = timestamped_to_vector(train, vector_col=v, time_start=0, classification_col=c)

@rajneesh-gobin
Copy link
Author

hello thanks for the reply, i am having the same issue after replacing by
train = train.reindex(columns=headers.training_headers).to_numpy()
test = test.reindex(columns=headers.training_headers).to_numpy()
\malware-prediction-rnn\experiments\useful.py", line 130, in timestamped_to_vector
assert int(input_row[classification_col]) in [0,1]
ValueError: cannot convert float NaN to integer

@pan2za
Copy link

pan2za commented Dec 22, 2022

change the header.py line N, 'malcious' to 'malware' may kill this issue.

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