@@ -588,8 +588,42 @@ def _continuized_vars(self, var, hint=None):
588588 ]
589589
590590 def send_report (self ):
591- # TOTO: Implement
592- pass
591+ if not self .data :
592+ return
593+ single_disc = len (self .disc_view .model ()) > 0 \
594+ and len (self .disc_var_hints ) == 1 \
595+ and DiscreteOptions [self .disc_var_hints [DefaultKey ]].label .lower ()
596+ single_cont = len (self .cont_view .model ()) > 0 \
597+ and len (self .cont_var_hints ) == 1 \
598+ and ContinuousOptions [self .cont_var_hints [DefaultKey ]].label .lower ()
599+ class_treatment = \
600+ self .data .domain .class_var .is_discrete and \
601+ "As ordinal" if self .continuize_class else "Leave categorical"
602+ if single_disc and single_cont :
603+ self .report_items (
604+ (("Categorical variables" , single_disc ),
605+ ("Numeric variables" , single_cont ),
606+ ("Class variable" , class_treatment ))
607+ )
608+ else :
609+ if single_disc :
610+ self .report_paragraph ("Categorical variables" , single_disc )
611+ elif len (self .disc_view .model ()) > 0 :
612+ self .report_items (
613+ "Categorical variables" ,
614+ [("Default" if name == DefaultKey else name ,
615+ DiscreteOptions [id_ ].label .lower ())
616+ for name , id_ in self .disc_var_hints .items ()])
617+ if single_cont :
618+ self .report_paragraph ("Numeric varialbes" , single_cont )
619+ elif len (self .cont_view .model ()) > 0 :
620+ self .report_items (
621+ "Numeric variables" ,
622+ [("Default" if name == DefaultKey else name ,
623+ ContinuousOptions [id_ ].label .lower ())
624+ for name , id_ in self .cont_var_hints .items ()])
625+ if class_treatment :
626+ self .report_paragraph ("Class variable" , class_treatment )
593627
594628 @classmethod
595629 def migrate_settings (cls , settings , version ):
0 commit comments