From 08962ddbe6d2303c07c17dce01d2c05c6ae6ced1 Mon Sep 17 00:00:00 2001 From: Nellie Gustafsson Date: Mon, 30 Jan 2017 15:31:13 -0800 Subject: [PATCH 1/2] Update to Clustering.sql file by NEGUST --- .../Customer-Clustering/Customer Clustering.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.sql b/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.sql index 7d0ee0aa..e262295c 100644 --- a/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.sql +++ b/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.sql @@ -10,7 +10,6 @@ AS */ BEGIN DECLARE @duration FLOAT - , @predict_duration FLOAT , @instance_name NVARCHAR(100) = @@SERVERNAME , @database_name NVARCHAR(128) = db_name() @@ -99,4 +98,4 @@ SELECT customer.[c_email_address], customer.c_customer_sk JOIN [dbo].[customer_return_clusters] as r ON r.customer = customer.c_customer_sk - WHERE r.cluster = 1 \ No newline at end of file + WHERE r.cluster = 3 \ No newline at end of file From 0af9d0adb1c243f82bcef11a039cac58a7574ff3 Mon Sep 17 00:00:00 2001 From: Nellie Gustafsson Date: Mon, 30 Jan 2017 15:34:46 -0800 Subject: [PATCH 2/2] Update to Clustering.sql file v2 --- .../Getting-Started/Customer-Clustering/Customer Clustering.R | 2 +- .../Getting-Started/Customer-Clustering/Customer Clustering.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.R b/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.R index 0cf70b6d..ba5a7d68 100644 --- a/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.R +++ b/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.R @@ -64,7 +64,7 @@ plot(1:20, wss, type = "b", xlab = "Number of Clusters", ylab = "Within groups s # Output table to hold the customer group mappings return_cluster = RxSqlServerData(table = "return_cluster", connectionString = connStr); -# Set.seed for random number generator for predicatability +# Set.seed for random number generator for predictability set.seed(10); # Generate clusters using rxKmeans and output key / cluster to a table in SQL Server called return_cluster diff --git a/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.sql b/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.sql index e262295c..1a9e4b0f 100644 --- a/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.sql +++ b/samples/features/r-services/Getting-Started/Customer-Clustering/Customer Clustering.sql @@ -65,7 +65,7 @@ customer_returns <- RxSqlServerData(sqlQuery = input_query, # Output table to hold the customer cluster mappings return_cluster = RxSqlServerData(table = "customer_return_clusters", connectionString = connStr); -# set.seed for random number generator for predicatability +# set.seed for random number generator for predictability set.seed(10); # generate clusters using rxKmeans and output clusters to a table called "customer_return_clusters".