Skip to content

Commit e5b3f41

Browse files
renamed folders, renamed python tutorial files, updated readme files
1 parent 56decfa commit e5b3f41

39 files changed

+10
-13
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ Saves the predicted results to a DB table </br>
6060

6161
This sample shows how to create a predictive model with Python and generate predictions using the model and deploy that in SQL Server with SQL Server Machine Learning Services.
6262

63-
### predictive_model.py
63+
### rental_prediction.py
6464
The Python script that generates a predictive model and uses it to predict rental counts
6565

66-
### predictive_model_python.sql
66+
### rental_prediction.sql
6767
Takes the Python code in Predictive Model.py and deploys it inside SQL Server. Creating stored procedures and tables for training, storing models and creating stored procedures for prediction.
6868

6969

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
def get_rental_predictions():
11-
conn_str = 'Driver=SQL Server;Server=NELLIELAPTOP\\SQLSERVER20;Database=TutorialDB;Trusted_Connection=True;'
11+
conn_str = 'Driver=SQL Server;Server=MYSQLSERVER;Database=TutorialDB;Trusted_Connection=True;'
1212
column_info = {
1313
"Year" : { "type" : "integer" },
1414
"Month" : { "type" : "integer" },
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ BEGIN
2626
EXECUTE sp_execute_external_script
2727
@language = N'Python'
2828
, @script = N'
29-
import pandas as pd
30-
df = pd.DataFrame(rental_train_data)
31-
print(df)
29+
30+
df = rental_train_data
3231
3332
# Get all the columns from the dataframe.
3433
columns = df.columns.tolist()
@@ -84,8 +83,8 @@ BEGIN
8483
import pickle
8584
rental_model = pickle.loads(py_model)
8685
87-
import pandas as pd
88-
df = pd.DataFrame(rental_score_data)
86+
87+
df = rental_score_data
8988
#print(df)
9089
9190
# Get all the columns from the dataframe.

samples/features/r-services/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# Samples for SQL Server R Services
1+
# Samples for SQL Server Machine Learning Services
2+
23

3-
Go to the getting started tutorials to learn more about:
4-
[Predictive Modeling with R Services](https://www.microsoft.com/en-us/sql-server/developer-get-started/rprediction)
5-
[Customer Clustering with R Services](https://www.microsoft.com/en-us/sql-server/developer-get-started/rclustering)
64

75
[Telco Customer Churn](Telco Customer Churn)
86

samples/features/r-services/Getting-Started/Predictive-Modeling/Predictive Model.R renamed to samples/features/r-services/getting-started/rental-prediction/Predictive Model.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
##################### STEP1 - Connect to DB and read data ####################
33

44
#Connection string to connect to SQL Server named instance
5-
connStr <- paste("Driver=SQL Server; Server=", "NELLIELAPTOP\\VNEXTCTP14",
5+
connStr <- paste("Driver=SQL Server; Server=", "MYSQLSERVER",
66
";Database=", "Tutorialdb", ";Trusted_Connection=true;", sep = "");
77

88
#Get the data from SQL Server Table
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)