Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow weights in cut(x, ngroups) #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

greimel
Copy link
Contributor

@greimel greimel commented Sep 18, 2019

[Branches from #202, there is only one new commit]

Adds a method

cut(x::AbstractArray, w::AbstractWeights, ngroups::Integer;
  labels) =
  cut(x, StatsBase.quantile(x, w, (1:ngroups-1)/ngroups); extend=true, labels=labels)

Adds StatsBase as a dependency.

Is this something that you want or should that live in a separate package?

@nalimilan
Copy link
Member

Thanks. Unfortunately, I don't think it's a good idea to depend on StatsBase, as it makes loading the package even slower. Hopefully, JuliaLang/julia#31395 will allow doing this with Statistics in Julia 1.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants