8000 R-Py parity for ml-regression page by kvdesai · Pull Request #63 · plotly/plotly.r-docs · GitHub
[go: up one dir, main page]

Skip to content

R-Py parity for ml-regression page #63

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

Merged
merged 20 commits into from
Jul 26, 2021
Merged

R-Py parity for ml-regression page #63

merged 20 commits into from
Jul 26, 2021

Conversation

kvdesai
Copy link
Contributor
@kvdesai kvdesai commented Jul 19, 2021

No description provided.

@kvdesai kvdesai changed the title Rpy-parity for ml-regression page R-Py parity for ml-regression page Jul 19, 2021
@HammadTheOne HammadTheOne self-requested a review July 21, 2021 05:34
kvdesai and others added 3 commits July 21, 2021 22:26
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
y_range <- lm_model %>% predict(x_range)

colnames(y_range) <- c('tip')
xy <- data.frame(x_range, y_range)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion here is to rename the dataframe variable to df for this example and other ones (unless there's multiple dataframes).


Notice how we can combine scatter points with lines using Plotly. You can learn more about [multiple chart types](https://plotly.com/r/graphing-multiple-chart-types/).

[knn]: https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsRegressor.html
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to replace this with the R example instead.

pred <- pred$.pred
pred <- matrix(pred, dim_val[1], dim_val[2])

dim(pred)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? If not, I would ✂️

Copy link
Collaborator
@HammadTheOne HammadTheOne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kvdesai , these examples look great! They're fast and fluid, and I like the syntax used. I was able to run all of them by copying and pasting the code into my local environment and running each example script. The knitted html also looks good.

I've made a few suggestions/comments that would bring it across the finish line. Along with that, I would suggest maybe just taking one more pass over the knitr generated HTML and addressing any of the non-blocking warnings that appear (eg. the geom_smooth formula ones). This will prevent any panic from inexperienced users who may not know what's causing the warning or what they mean for the model.

Other than that, it looks fantastic. I can approve it once those minor changes have been addressed.

kvdesai and others added 3 commits July 22, 2021 18:23
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
kvdesai and others added 4 commits July 22, 2021 18:24
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
@kvdesai
Copy link
Contributor Author
kvdesai commented Jul 23, 2021

@HammadTheOne - thanks for the review and insightful comments. I have addressed them. I also added one more snippet of the plot. Please verify and let me know if any other change is needed.

@HammadTheOne HammadTheOne self-requested a review July 25, 2021 17:37
Copy link
Collaborator
@HammadTheOne HammadTheOne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for making the requested changes.

I notice that one of the CI tests is failing now though (related to 2016-06-17-3d-tri-surf.Rmd, and possibly an update to the anglr package) and specifically this line:

mesh <- as.mesh3d(delmesh)

Once that's fixed and tests are passing we can go ahead and merge it.

💃

@kvdesai kvdesai merged commit 3742c1c into master Jul 26, 2021
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.

2 participants
0