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

Improve kmeans query #14

Open
edgararuiz-zz opened this issue Jan 12, 2019 · 2 comments
Open

Improve kmeans query #14

edgararuiz-zz opened this issue Jan 12, 2019 · 2 comments
Labels
feature a feature request or enhancement

Comments

@edgararuiz-zz
Copy link
Collaborator

In the query, pass the actual center numbers as a column rather than the formula

@topepo topepo added the feature a feature request or enhancement label Apr 3, 2020
@tidymodels tidymodels deleted a comment from anadiedrichs Jul 28, 2020
@anadiedrichs
Copy link

Hi all! Can someone explain more about this issue ?

Is "the actual center numbers" the centroids data frame? Or the argument center, which is by default 3 ?

@juliasilge
Copy link
Member

If you look in the README and check out the results of dbplyr::remote_query(km), notice that there are some formulae that are passed in:

## FROM (SELECT `LHS`.`mpg` AS `mpg`, `LHS`.`cyl` AS `cyl`, `LHS`.`disp` AS `disp`, `LHS`.`hp` AS `hp`, `LHS`.`drat` AS `drat`, `LHS`.`wt` AS `wt`, `LHS`.`qsec` AS `qsec`, `LHS`.`vs` AS `vs`, `LHS`.`am` AS `am`, `LHS`.`gear` AS `gear`, `LHS`.`carb` AS `carb`, `LHS`.`k_center` AS `k_center`, `RHS`.`k_mpg` AS `k_mpg`, `RHS`.`k_wt` AS `k_wt`

This has LHS and RHS for the two sides of the R formula. I believe the idea here is to change the handling to work with columns instead of the formula.

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

No branches or pull requests

4 participants