Mercurial > repos > bimib > cobraxy
comparison COBRAxy/marea_cluster.py @ 152:7f3552eaf774 draft
Uploaded
author | luca_milaz |
---|---|
date | Wed, 06 Nov 2024 21:14:57 +0000 |
parents | 3fca9b568faf |
children | a95ac9ae9648 |
comparison
equal
deleted
inserted
replaced
151:8e3cbf68cdc4 | 152:7f3552eaf774 |
---|---|
509 X = pd.DataFrame.to_dict(X, orient='list') | 509 X = pd.DataFrame.to_dict(X, orient='list') |
510 X = rewrite_input(X) | 510 X = rewrite_input(X) |
511 X = pd.DataFrame.from_dict(X, orient = 'index') | 511 X = pd.DataFrame.from_dict(X, orient = 'index') |
512 | 512 |
513 for i in X.columns: | 513 for i in X.columns: |
514 tmp = X[i][0] | 514 if any(val is None for val in X[i]): |
515 if tmp == None: | |
516 X = X.drop(columns=[i]) | 515 X = X.drop(columns=[i]) |
517 | |
518 ## NAN TO HANLDE | |
519 | 516 |
520 if args.k_max != None: | 517 if args.k_max != None: |
521 numero_classi = X.shape[0] | 518 numero_classi = X.shape[0] |
522 while args.k_max >= numero_classi: | 519 while args.k_max >= numero_classi: |
523 err = 'Skipping k = ' + str(args.k_max) + ' since it is >= number of classes of dataset' | 520 err = 'Skipping k = ' + str(args.k_max) + ' since it is >= number of classes of dataset' |