Community & Support
Learn
Marketplace
Discussions
Categories
Discussions
General
Platform
Academic
Partner
Regional
User Groups
Documentation
Events
Altair Exchange
Share or Download Projects
Resources
News & Instructions
Programs
YouTube
Employee Resources
This tab can be seen by employees only. Please do not share these resources externally.
Groups
Join a User Group
Support
Altair RISE
A program to recognize and reward our most engaged community members
Nominate Yourself Now!
Home
Discussions
Community Q&A
"Rscript performance issue"
creatX
Hi all,
I'm using Rstudio to write my R code and I want to use it in Rapidminer. The Rscript extension is great. But I realized that code which will execute in Rstudio within less than 1 second will take up to 12 seconds in Rapidminer with the Rscript extension. For small datasets this is not really a problem. But for huge datasets I'm running into perfomance issues.
Did you face similiar issues? Is there any workaround to solve this problem?
A minimal example is:
[tt]# rm_main is a mandatory function,
# the number of arguments has to be the number of input ports (can be none)
rm_main = function(data)
{
require(fields)
lotlan <- cbind(data$C_1,data$C_2)
xy1 <- lotlan[1:length(data$C_1),]
xy2 <- rbind(lotlan[2:length(data$C_1),],c(NA,NA))
GeoDistance <- rdist.earth.vec(xy1, xy2)
data2 <- cbind(data,GeoDistance)
return(data2)
}[/tt]
where data$C_1,data$C_2 represent geocoordinates.
Best regards,
creatX
Find more posts tagged with
AI Studio
R
Performance
Accepted answers
All comments
David_A
Hi,
indeed there is a performance gap between executing your code directly in R or via the Rscript extension. The reason is the communication overhead when passing the data between RapidMiner and R, but on the other hand the interface is very robust and easy to install.
The only "workaround" is to reduce the amount of data passed between R and RapidMiner.
Best,
David
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
Groups