Skip to content
Snippets Groups Projects
Commit 6fab2cf9 authored by Stephane Chavin's avatar Stephane Chavin
Browse files

add NB_CLASS

parent c885b845
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,7 @@ args = parser.parse_args() ...@@ -15,6 +15,7 @@ args = parser.parse_args()
path = str(args.path_to_data) path = str(args.path_to_data)
direction = str(args.direction) direction = str(args.direction)
NB_CLASS = 50
files = os.listdir(path) files = os.listdir(path)
...@@ -57,6 +58,7 @@ for i in tqdm(os.listdir(path)): ...@@ -57,6 +58,7 @@ for i in tqdm(os.listdir(path)):
df.reset_index(inplace = True) df.reset_index(inplace = True)
tab = df.groupby('espece').count() tab = df.groupby('espece').count()
tab = tab.sort_values(tab.columns[0],ascending = False).sample(NB_CLASS)
compte = pd.DataFrame(np.zeros((len(tab)+1,1)),columns = ['nombre']) compte = pd.DataFrame(np.zeros((len(tab)+1,1)),columns = ['nombre'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment