You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2023/07/10 04:39:16 UTC
[GitHub] [spark] zhengruifeng opened a new pull request, #41914: [SPARK-44349][R] Add math functions to SparkR
zhengruifeng opened a new pull request, #41914:
URL: https://github.com/apache/spark/pull/41914
### What changes were proposed in this pull request?
Add following math functions to `SparkR`:
- e
- pi
- std
- ln
- negative
- positive
- pow
- power
- width_bucket
### Why are the changes needed?
for parity
### Does this PR introduce _any_ user-facing change?
yes
### How was this patch tested?
added UT
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #41914: [SPARK-44349][R] Add math functions to SparkR
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #41914:
URL: https://github.com/apache/spark/pull/41914#issuecomment-1632088199
merged to master
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #41914: [SPARK-44349][R] Add math functions to SparkR
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #41914:
URL: https://github.com/apache/spark/pull/41914#issuecomment-1630112963
`pi` and `power` are built-in R functions:
```
> pi
[1] 3.141593
> power
function (lambda = 1)
{
if (!is.numeric(lambda) || is.na(lambda))
stop("invalid argument 'lambda'")
if (lambda <= 0)
return(make.link("log"))
if (lambda == 1)
return(make.link("identity"))
linkfun <- function(mu) mu^lambda
linkinv <- function(eta) pmax(eta^(1/lambda), .Machine$double.eps)
mu.eta <- function(eta) pmax((1/lambda) * eta^(1/lambda -
1), .Machine$double.eps)
valideta <- function(eta) all(is.finite(eta)) && all(eta >
0)
link <- paste0("mu^", round(lambda, 3))
structure(list(linkfun = linkfun, linkinv = linkinv, mu.eta = mu.eta,
valideta = valideta, name = link), class = "link-glm")
}
<bytecode: 0x1444e5aa8>
<environment: namespace:stats>
```
so remove `pi`, `e` (it will be weird to add `pi` alone), `pow`, `power`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng closed pull request #41914: [SPARK-44349][R] Add math functions to SparkR
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #41914: [SPARK-44349][R] Add math functions to SparkR
URL: https://github.com/apache/spark/pull/41914
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org