gnn-nids's People
gnn-nids's Issues
ValueError: Expect x to be a non-empty array or dataset
Hi there
First of all, many thanks for publishing the code.
I am trying to re-run your code (TensorFlow version).
What I did:
- install latest tensorflow (CPU version) 2.5
- numpy 1.19 (otherwise there will be an error of feeding tensorflow to numpy).
- networkx 2.6.2
- matplotlib
I downloaded the CICIDS 2017, unzip the file GeneratedLabelledFlows.zip
and get the list of 8 CSV files.
For each CSV file, I sort them by Timestamp
column, then store first 70% of lines to train.csv and last 30% to val.csv
The code:
for i,f in tqdm (enumerate (csv_files)):
fname = join ('TrafficLabelling', f)
df = pd.read_csv (fname, low_memory=False)
df = df.sort_values (by = ' Timestamp')
N = df.shape [0]
train_filename = 'train/' + f
val_filename = 'val/' + f
df_train = df[0:int(N*.7)]
df_val = df[int(N*.7):]
df_train.to_csv (train_filename, index = False)
df_val.to_csv (val_filename, index = False)
Then I modify the config.ini
and run python main.py
(Python 3.8.11)
I got the following error:
raise ValueError('Expect x to be a non-empty array or dataset.')
ValueError: Expect x to be a non-empty array or dataset.
Do you have any idea what did I do wrong?
Many thanks
Jc ism
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.