Commit bedbd3ad authored by Marco Chierici's avatar Marco Chierici
Browse files

Updated FSTEPS calculation

parent 132f421f
......@@ -107,14 +107,11 @@ if RANK_METHOD == "rankList":
# build FSTEPS according to dataset size
nfeat = x.shape[1]
#ord = np.int(np.log10(nfeat))
#fs = np.empty(0, dtype=np.int)
#for p in range(ord+1):
# fs = np.concatenate( (fs, np.dot(10**p, np.arange(10))) )
#fs = np.unique(fs)[1:]
# cap FSTEPS at 10000 features, if applicable
fs = np.array([5, 10, 25, 50, 75, 100, 500, 1000, 5000, 10000], dtype=np.int)
FSTEPS = fs[ fs <= 10000 ].tolist() if nfeat>10000 else fs[ fs < nfeat ].tolist() + [nfeat]
feature_ranges = [5, 10, 25, 50, 75, 100]
FSTEPS = list()
for percentage in feature_ranges:
k = np.ceil((nfeat * percentage) / 100).astype(np.int)
FSTEPS.append(k)
# prepare output files
metricsf = open(OUTFILE + "_metrics.txt", 'w')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment