MastodonC / kixi.stats

A library of statistical distribution sampling and transducing functions
https://cljdoc.xyz/d/kixi/stats
360 stars 18 forks source link

Organize namespaces in such a way to minimize dependencies #21

Closed sbelak closed 6 months ago

sbelak commented 6 years ago

This might be a very fringe concern, but for big apps any additional dependencies are a pain. It would be very nice if namespaces were organised in such a way that you could control what dependencies you have to pull in (via lein's :exclude). Or at least (since what's proposed would be a breaking change) if this is something that the project is mindful of going forward.

Happy do to a PR for this, but it's something I feel should be discussed first.

henrygarner commented 6 years ago

I'm going to go out on a limb: is this request driven by the recent addition of Apache Commons Math3 in kixi.core? If so, I support moving LOESS to a separate namespace. It's one of only a few functions in core which return a model rather than scalar statistics (the others being simple regression models), and perhaps all could be moved together since they're semantically related.

Let me know if this is what you had in mind, or if not then concretely what you'd prefer instead. No need to provide a PR yet.

sbelak commented 6 years ago

Mostly, yes; and also as something to keep in mind for the future. Doubtless there will be other algorithms we'll be wanting to add in the future, but it would be a shame to sacrifice the super-lightweight nature of kixi for it.

gmp26 commented 5 years ago

As a new user I suspect I am hitting this issue when attempting to use LOESS. I have project.clj dependencies

[kixi/stats "0.4.3"]
[org.apache.commons/commons-math3 "3.5"]

but I get

(require '[kixi.stats.core :refer [locally-weighted-regression]])
IllegalAccessError locally-weighted-regression does not exist  clojure.core/refer (core.clj:4119)
henrygarner commented 5 years ago

@gmp26 Hi Mike, apologies LOESS has been added since the latest official release. If you update the kixi/stats dependency to "0.4.4-SNAPSHOT" you'll be able to use the locally-weighted-regression function in its current location.

gmp26 commented 5 years ago

@henrygarner Many thanks Henry. I'd tried 0.4.4 but hadn't noticed it was a snapshot release.

sritchie commented 1 year ago

I suspect this can be closed now, as there is no longer a commons-math dep?