forked from divy9881/Malware_Classifier_For_PE_Files
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreprocess.py
More file actions
28 lines (23 loc) · 653 Bytes
/
preprocess.py
File metadata and controls
28 lines (23 loc) · 653 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import matplotlib.pyplot as plt
import pandas as pd
from sklearn import preprocessing
# load the iris dataset
malwaredata=pd.read_csv("cleaned_data - Copy.csv")
dataframe=pd.DataFrame(malwaredata)
x=dataframe.iloc[: ,2:56]
min_max_scaler = preprocessing.MinMaxScaler()
x_scaled = min_max_scaler.fit_transform(x)
df = pd.DataFrame(x_scaled)
df.hist(column=0)
# plt.show()
colname = df.columns[0]
plt.title('Mean')
plt.xlabel("value")
plt.ylabel("Frequency")
plt.savefig("abc.png")
# df.head
# separate the data from the target attributes
# X = iris.data
# y = iris.target
# # normalize the data attributes
# normalized_X = preprocessing.normalize(X)