예제 #1
0
    def _repr_html_(self):
        from mako.template import Template
        from mako.lookup import TemplateLookup

        template = Template(filename=html.SELF_TEMPLATE(__file__),
                            lookup=TemplateLookup(directories=['/']))
        return template.render(summary=self)
예제 #2
0
    def _repr_html_(self):
        from mako.template import Template
        from mako.lookup import TemplateLookup

        template = Template(filename=html.SELF_TEMPLATE(__file__),
                            lookup=TemplateLookup(directories=['/']))
        return template.render(true_pred_scatter_plot=plot_to_html_img(
            self.plot_true_pred_scatter))
    def _repr_html_(self):
        from mako.template import Template
        from mako.lookup import TemplateLookup

        template = Template(filename=html.SELF_TEMPLATE(__file__),
                            lookup=TemplateLookup(directories=['/']))
        return template.render(fit=self,
                               recon_plot=plot_to_html_img(
                                   self.reconstruction_plot))
    def _repr_html_(self):
        from mako.template import Template
        from mako.lookup import TemplateLookup

        template = Template(filename=html.SELF_TEMPLATE(__file__),
                            lookup=TemplateLookup(directories=['/']))
        return template.render(fit=self,
                               roc_plot=plot_to_html_img(self.plot_ROC),
                               cmx_plot=plot_to_html_img(
                                   self.plot_confusion_matrix))
예제 #5
0
    def _repr_html_(self):
        from mako.template import Template
        from mako.lookup import TemplateLookup
        plot = "<class 'matplotlib.figure.Figure'>"

        figures = [arg(self.df, model=self.model) for arg in self.args]
        figures = [("img", plot_to_html_img(f)) if str(type(f)) == plot else
                   ("html",
                    f._repr_html_() if hasattr(f, "_repr_html_") else str(f))
                   for f in figures]

        template = Template(filename=html.SELF_TEMPLATE(__file__),
                            lookup=TemplateLookup(directories=['/']))
        return template.render(summary=self,
                               figures=figures,
                               layout=self.layout,
                               laypout_nr_columns=self.laypout_nr_columns)