I was thinking about potential re-use of "examples" in other contexts,
The current var metadata of a symbol with attahced example-seesion, returns:
- original example code as "string"
- each "line" of the exampl-session as a fn, ready to execute
maybe in some contexts it would be nice to know the aliases as well.
So that when having:
:metadoc/examples [(example-session
"Train random-forest on iris data"
(def training-data
(->
(scicloj.metamorph.ml.rdatasets/datasets-iris)
(ds/drop-columns [:rownames])
(ds-mod/set-inference-target [:species])))
(def model
(scicloj.metamorph.ml/train training-data {:model-type :metamorph.ml/random-forest}))
(comment "forest with hundred trees created")
(-> model :model-data :forest :trees count)
)
]
we can now that alias "ds" aliases to tech.v3.dataset
I think your code could discover this at runtime
I was thinking about potential re-use of "examples" in other contexts,
The current var metadata of a symbol with attahced example-seesion, returns:
maybe in some contexts it would be nice to know the aliases as well.
So that when having:
we can now that alias "ds" aliases to tech.v3.dataset
I think your code could discover this at runtime