Repository: microsoft/ptvs
Issue: sklearn deprecation triggered by ML samples

Our ML samples trigger the following warning from scikit-learn (as of Anaconda 4.3.0):

> C:\\Program Files\\Anaconda3\\lib\\site-packages\\sklearn\\cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
>   "This module will be removed in 0.20.", DeprecationWarning)


Changed files:
Python/Templates/Core/ProjectTemplates/Python/Machine Learning/RegressionTemplate/regression.py
Python/Templates/Core/ProjectTemplates/Python/Machine Learning/ClassifierTemplate/classifier.py
Python/Templates/Core/ProjectTemplates/Python/Machine Learning/ClusteringTemplate/clustering.py

diff --git a/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/ClassifierTemplate/classifier.py b/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/ClassifierTemplate/classifier.py
index 912813c05..6ed30e666 100644
--- a/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/ClassifierTemplate/classifier.py	
+++ b/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/ClassifierTemplate/classifier.py	
@@ -59,10 +59,10 @@ def download_data():
     #from pandas import read_excel
     #frame = read_excel(URL)
 
-    # If your data is in a private Azure blob, install 'azure' and use
-    # BlobService.get_blob_to_path() with read_table() or read_excel()
-    #import azure.storage
-    #service = azure.storage.BlobService(ACCOUNT_NAME, ACCOUNT_KEY)
+    # If your data is in a private Azure blob, install 'azure-storage' and use
+    # BlockBlobService.get_blob_to_path() with read_table() or read_excel()
+    #from azure.storage.blob import BlockBlobService
+    #service = BlockBlobService(ACCOUNT_NAME, ACCOUNT_KEY)
     #service.get_blob_to_path(container_name, blob_name, 'my_data.csv')
     #frame = read_table('my_data.csv', ...
 
@@ -129,7 +129,7 @@ def get_features_and_labels(frame):
     #X, y = arr[:, 1:], arr[:, 0]
     
     # Use 80% of the data for training; test against the rest
-    from sklearn.cross_validation import train_test_split
+    from sklearn.model_selection import train_test_split
     X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
 
     # sklearn.pipeline.make_pipeline could also be used to chain 
diff --git a/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/ClusteringTemplate/clustering.py b/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/ClusteringTemplate/clustering.py
index f31b99267..1ecd7eb04 100644
--- a/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/ClusteringTemplate/clustering.py	
+++ b/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/ClusteringTemplate/clustering.py	
@@ -60,10 +60,10 @@ def download_data():
     #from pandas import read_excel
     #frame = read_excel(URL)
 
-    # If your data is in a private Azure blob, install 'azure' and use
-    # BlobService.get_blob_to_path() with read_table() or read_excel()
-    #import azure.storage
-    #service = azure.storage.BlobService(ACCOUNT_NAME, ACCOUNT_KEY)
+    # If your data is in a private Azure blob, install 'azure-storage' and use
+    # BlockBlobService.get_blob_to_path() with read_table() or read_excel()
+    #from azure.storage.blob import BlockBlobService
+    #service = BlockBlobService(ACCOUNT_NAME, ACCOUNT_KEY)
     #service.get_blob_to_path(container_name, blob_name, 'my_data.csv')
     #frame = read_table('my_data.csv', ...
 
diff --git a/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/RegressionTemplate/regression.py b/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/RegressionTemplate/regression.py
index 1c775a686..342d999d4 100644
--- a/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/RegressionTemplate/regression.py	
+++ b/Python/Templates/Core/ProjectTemplates/Python/Machine Learning/RegressionTemplate/regression.py	
@@ -64,10 +64,10 @@ def download_data():
     #from pandas import read_excel
     #frame = read_excel(URL)
 
-    # If your data is in a private Azure blob, install 'azure' and use
-    # BlobService.get_blob_to_path() with read_table() or read_excel()
-    #import azure.storage
-    #service = azure.storage.BlobService(ACCOUNT_NAME, ACCOUNT_KEY)
+    # If your data is in a private Azure blob, install 'azure-storage' and use
+    # BlockBlobService.get_blob_to_path() with read_table() or read_excel()
+    #from azure.storage.blob import BlockBlobService
+    #service = BlockBlobService(ACCOUNT_NAME, ACCOUNT_KEY)
     #service.get_blob_to_path(container_name, blob_name, 'my_data.csv')
     #frame = read_table('my_data.csv', ...
 
@@ -139,7 +139,7 @@ def get_features_and_labels(frame):
     
     # Use 50% of the data for training, but we will test against the
     # entire set
-    from sklearn.cross_validation import train_test_split
+    from sklearn.model_selection import train_test_split
     X_train, _, y_train, _ = train_test_split(X, y, test_size=0.5)
     X_test, y_test = X, y