gpt4 book ai didi

sql-server - SQL Server 2016 的版本和支持的功能

转载 作者:行者123 更新时间:2023-12-03 03:16:21 25 4
gpt4 key购买 nike

我只是想知道基本 R 集成高级 R 集成 功能之间有什么区别MS-SQL Server 2016 官方网站提到的?

组件比较表的链接是 here .

下面这段代码属于哪个类别?

DROP TABLE IF EXISTS #TempTable

CREATE TABLE #TempTable (x NVARCHAR(MAX), y NVARCHAR(MAX))
INSERT INTO #TempTable
EXEC [dbo].[proc_ReturnDataForCurveGraphsDoubleNorm]
@sRAWFILEID = @sRAWFILEID,
@PREBLEACHVALUES = @sPREBLEACHVALUES,
@BLEACHVALUES = @sBLEACHVALUES,
@INITIALBLEACHVALUES = @sINITIALBLEACHVALUES

BEGIN TRY
execute sp_execute_external_script
@language = N'R'
, @script = N'
df <- as.data.frame(c(InputDataSet));
xdata <- as.numeric(as.character(df[,1]));
ydata <- as.numeric(as.character(df[,2]));

m = nls(ydata ~ yo - a * exp(-b * xdata),
data = df,
start = list(yo = 0.9, a = 0.5, b = 0.563),
trace = F,
control = list(maxiter = 1000, warnOnly = TRUE),
lower = list(0, 0, 0),
upper = list(1, 100, 100), algorith = "port");

param <- coef(m);

RSS.p <- sum(residuals(m)^2);
TSS <- sum((ydata - mean(ydata))^2);
r_square <- 1 - (RSS.p/TSS);

yo <- param[1];
a <- param[2];
b <- param[3];

xdata2 <- seq(0,max(xdata),0.01);

fe2 <- yo - a*exp(-b*xdata2);
mf <- ( (yo - fe2[1]) / (1 - fe2[1] ) ) ;

thalf <- log(2) / b;

OutputDataSet <- data.frame( round( yo , 4 ),
round( a, 4),
round( b, 4),
round( mf , 2 ),
round( thalf , 2 ),
round( r_square, 2) );
'
, @input_data_1 = N' SELECT * FROM #TempTable;


WITH RESULT SETS (([yo] NVARCHAR(MAX),
[a] NVARCHAR(MAX),
[b] NVARCHAR(MAX),
[mobile_fraction] NVARCHAR(MAX),
[t_half] NVARCHAR(MAX),
[r_square] NVARCHAR(MAX)));



END TRY

BEGIN CATCH
SELECT ERROR_NUMBER() AS ErrorNumber, ERROR_MESSAGE() AS ErrorMessage;
END CATCH
END

最佳答案

您应该查看R Services此类信息的部分,特别是 Differences in R Features between Editions of SQL Server .

据此,Standard 和 Express 具有流程限制和较低的可扩展性。您的代码将运行,但速度会变慢,并且在运行繁重的训练任务时可能会使服务器饱和:

However, Standard Edition does not support Resource Governor. Using resource governance is the best way to customize server resources to support varied R workloads such as model training and scoring.

Standard Edition also provides limited performance and scalability in comparison to Enterprise and Developer Editions. Specifically, all of the ScaleR functions and packages are included with Standard Edition, but the service that launches and manages R scripts is limited in the number of processes it can use. Moreover, data processed by the script must fit in memory.

您可以使用 SQL Server Express 测试差异,例如在 VM 中:

Express Edition with Advanced Services

Express Edition is subject to the same limitations as Standard Edition.

关于sql-server - SQL Server 2016 的版本和支持的功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41062767/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com