mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Fix percent unk display in debug data (#7886)
* Fix percent unk display This was showing (ratio %), so 10% would show as 0.10%. Fix by multiplying ration by 100. Might want to add a warning if this is over a threshold. * Only show whole-integer percents
This commit is contained in:
		
							parent
							
								
									1690595e4d
								
							
						
					
					
						commit
						de6b5ed14d
					
				| 
						 | 
					@ -173,8 +173,8 @@ def debug_data(
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        n_missing_vectors = sum(gold_train_data["words_missing_vectors"].values())
 | 
					        n_missing_vectors = sum(gold_train_data["words_missing_vectors"].values())
 | 
				
			||||||
        msg.warn(
 | 
					        msg.warn(
 | 
				
			||||||
            "{} words in training data without vectors ({:0.2f}%)".format(
 | 
					            "{} words in training data without vectors ({:.0f}%)".format(
 | 
				
			||||||
                n_missing_vectors, n_missing_vectors / gold_train_data["n_words"]
 | 
					                n_missing_vectors, 100 * (n_missing_vectors / gold_train_data["n_words"])
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        msg.text(
 | 
					        msg.text(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user