generateme / fastmath

Fast primitive based math library
MIT License
238 stars 12 forks source link

printing linear regression - adjust for markdown #34

Open daslu opened 1 month ago

daslu commented 1 month ago

Some adjustments will be necessary to make the printed LMData and GLMData print nicely in Markdown.

One detail is that tables are printed using clojure.pprint/print-table. It uses plus signs instead of pipes. These plus signs are handled correctly in Quarto Markdown, but not in nextjournal/markdown which is used for plain HTML in Clay (and is also used in Clerk). Replacing them

2024-10-24-112649_3840x2160_scrot

@genmeblog added:

I think we should also round numbers to, let's say, 6 decimal places.

Probably additional whitespace can also help. We should try rendering it in different pathways (e.g. in Clay, with/without Quarto).

Zulip discussion: https://clojurians.zulipchat.com/#narrow/channel/283491-scicloj.2Eml-dev/topic/printing.20linear.20regression.20-.20adjust.20for.20markdown

daslu commented 1 month ago

The image above was generated using the[:html] target with Clay 2-beta20. We used Noj 2-alpha9.3, which depends on Fastmath 3.0.0-alpha2 and Kindly 4-beta12.

genmeblog commented 1 week ago

The best would be fix it on the nextjournal/markdown side but I'm not sure if it's possible.