diff --git a/machine-learning/tutorials/SentimentAnalysis/Program.cs b/machine-learning/tutorials/SentimentAnalysis/Program.cs index dd7ebcc721e..b91a9535bbe 100644 --- a/machine-learning/tutorials/SentimentAnalysis/Program.cs +++ b/machine-learning/tutorials/SentimentAnalysis/Program.cs @@ -5,8 +5,7 @@ using System.Linq; using Microsoft.ML; using Microsoft.ML.Core.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Data; using Microsoft.ML.Transforms.Text; // @@ -35,7 +34,7 @@ static void Main(string[] args) // all the column names and their types. This is used to create the model, and train it. // Initialize our TextLoader // - _textLoader = mlContext.Data.TextReader(new TextLoader.Arguments() + _textLoader = mlContext.Data.CreateTextReader(new TextLoader.Arguments() { Separator = "tab", HasHeader = true, @@ -155,7 +154,7 @@ public static void Evaluate(MLContext mlContext, ITransformer model) private static void Predict(MLContext mlContext, ITransformer model) { // - var predictionFunction = model.MakePredictionFunction(mlContext); + var predictionFunction = model.CreatePredictionEngine(mlContext); // // diff --git a/machine-learning/tutorials/SentimentAnalysis/SentimentAnalysis.csproj b/machine-learning/tutorials/SentimentAnalysis/SentimentAnalysis.csproj index 77605820364..6f09605ba55 100644 --- a/machine-learning/tutorials/SentimentAnalysis/SentimentAnalysis.csproj +++ b/machine-learning/tutorials/SentimentAnalysis/SentimentAnalysis.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.2 + netcoreapp2.1 @@ -14,7 +14,7 @@ - + diff --git a/machine-learning/tutorials/SentimentAnalysis/SentimentData.cs b/machine-learning/tutorials/SentimentAnalysis/SentimentData.cs index 1d451f8df24..8211f0d5e93 100644 --- a/machine-learning/tutorials/SentimentAnalysis/SentimentData.cs +++ b/machine-learning/tutorials/SentimentAnalysis/SentimentData.cs @@ -1,5 +1,5 @@ // -using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Data; // namespace SentimentAnalysis diff --git a/machine-learning/tutorials/TaxiFarePrediction/Program.cs b/machine-learning/tutorials/TaxiFarePrediction/Program.cs index 65323bf851d..58721811e9a 100644 --- a/machine-learning/tutorials/TaxiFarePrediction/Program.cs +++ b/machine-learning/tutorials/TaxiFarePrediction/Program.cs @@ -3,8 +3,7 @@ using System.IO; using Microsoft.ML; using Microsoft.ML.Core.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Data; using Microsoft.ML.Transforms; using Microsoft.ML.Transforms.Categorical; using Microsoft.ML.Transforms.Normalizers; @@ -31,7 +30,7 @@ static void Main(string[] args) // // - _textLoader = mlContext.Data.TextReader(new TextLoader.Arguments() + _textLoader = mlContext.Data.CreateTextReader(new TextLoader.Arguments() { Separator = ",", HasHeader = true, @@ -139,7 +138,7 @@ private static void TestSinglePrediction(MLContext mlContext) //Prediction test // Create prediction function and make prediction. // - var predictionFunction = loadedModel.MakePredictionFunction(mlContext); + var predictionFunction = loadedModel.CreatePredictionEngine(mlContext); // //Sample: //vendor_id,rate_code,passenger_count,trip_time_in_secs,trip_distance,payment_type,fare_amount diff --git a/machine-learning/tutorials/TaxiFarePrediction/TaxiFarePrediction.csproj b/machine-learning/tutorials/TaxiFarePrediction/TaxiFarePrediction.csproj index 462958be8a2..6906d36b958 100644 --- a/machine-learning/tutorials/TaxiFarePrediction/TaxiFarePrediction.csproj +++ b/machine-learning/tutorials/TaxiFarePrediction/TaxiFarePrediction.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.2 + netcoreapp2.1 @@ -10,7 +10,7 @@ - + diff --git a/machine-learning/tutorials/TaxiFarePrediction/TaxiTrip.cs b/machine-learning/tutorials/TaxiFarePrediction/TaxiTrip.cs index 4b33a040ce7..13c059572b5 100644 --- a/machine-learning/tutorials/TaxiFarePrediction/TaxiTrip.cs +++ b/machine-learning/tutorials/TaxiFarePrediction/TaxiTrip.cs @@ -1,5 +1,5 @@ // -using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Data; // namespace TaxiFarePrediction