boopathiviky
/
Using-Deep-Learning-Neural-Networks-and-Candlestick-Chart-Representation-to-Predict-Stock-Market
Public
forked from jason887/Using-Deep-Learning-Neural-Networks-and-Candlestick-Chart-Representation-to-Predict-Stock-Market
-
Notifications
You must be signed in to change notification settings - Fork 0
/
count_dataset.py
29 lines (25 loc) · 754 Bytes
/
count_dataset.py
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
29
import os
import sys
pathdir = sys.argv[1]
counttest = 0
counttrain = 0
negtest = 0
postest = 0
negtrain = 0
postrain = 0
for root, dirs, files in os.walk("{}/test".format(pathdir)):
for file in files:
counttest += 1
if file.startswith('0'):
negtest += 1
if file.startswith('1'):
postest += 1
for root, dirs, files in os.walk("{}/train".format(pathdir)):
for file in files:
counttrain += 1
if file.startswith('0'):
negtrain += 1
if file.startswith('1'):
postrain += 1
print("test num : {}\nnegative : {}\npositive : {}\n====\ntrain num : {}\nnegative : {}\npositive : {}".format(
counttest, negtest, postest, counttrain, negtrain, postrain))