Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions machine-learning/tutorials/SentimentAnalysis/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
// </Snippet1>

Expand Down Expand Up @@ -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
// <Snippet4>
_textLoader = mlContext.Data.TextReader(new TextLoader.Arguments()
_textLoader = mlContext.Data.CreateTextReader(new TextLoader.Arguments()
{
Separator = "tab",
HasHeader = true,
Expand Down Expand Up @@ -155,7 +154,7 @@ public static void Evaluate(MLContext mlContext, ITransformer model)
private static void Predict(MLContext mlContext, ITransformer model)
{
// <Snippet17>
var predictionFunction = model.MakePredictionFunction<SentimentData, SentimentPrediction>(mlContext);
var predictionFunction = model.CreatePredictionEngine<SentimentData, SentimentPrediction>(mlContext);
// </Snippet17>

// <Snippet18>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML" Version="0.8.0" />
<PackageReference Include="Microsoft.ML" Version="0.9.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <Snippet1>
using Microsoft.ML.Runtime.Api;
using Microsoft.ML.Data;
// </Snippet1>

namespace SentimentAnalysis
Expand Down
7 changes: 3 additions & 4 deletions machine-learning/tutorials/TaxiFarePrediction/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -31,7 +30,7 @@ static void Main(string[] args)
// </Snippet3>

// <Snippet4>
_textLoader = mlContext.Data.TextReader(new TextLoader.Arguments()
_textLoader = mlContext.Data.CreateTextReader(new TextLoader.Arguments()
{
Separator = ",",
HasHeader = true,
Expand Down Expand Up @@ -139,7 +138,7 @@ private static void TestSinglePrediction(MLContext mlContext)
//Prediction test
// Create prediction function and make prediction.
// <Snippet22>
var predictionFunction = loadedModel.MakePredictionFunction<TaxiTrip, TaxiTripFarePrediction>(mlContext);
var predictionFunction = loadedModel.CreatePredictionEngine<TaxiTrip, TaxiTripFarePrediction>(mlContext);
// </Snippet22>
//Sample:
//vendor_id,rate_code,passenger_count,trip_time_in_secs,trip_distance,payment_type,fare_amount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<LangVersion>7.1</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML" Version="0.8.0" />
<PackageReference Include="Microsoft.ML" Version="0.9.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <Snippet1>
using Microsoft.ML.Runtime.Api;
using Microsoft.ML.Data;
// </Snippet1>

namespace TaxiFarePrediction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class RegexUtilities
{
public static bool IsValidEmail(string email)
{
if (string.IsNullOrWhitespace(email))
if (string.IsNullOrWhiteSpace(email))
return false;

try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
using System.Text;
using System.Diagnostics;



namespace ConsoleApplication1
{

Expand Down Expand Up @@ -100,7 +98,6 @@ static void Main()
Output:
-1
*/

//</snippet6>

// !
Expand Down Expand Up @@ -163,7 +160,6 @@ static void Main()
0.6
-1.2
*/

//</snippet9>

// |=
Expand All @@ -185,7 +181,6 @@ static void Main()
0x0000000e
True
*/

//</snippet10>

//<snippet11>
Expand Down Expand Up @@ -327,7 +322,6 @@ void M()
System.Console.WriteLine("hello");
//</snippet20>
}

}

//<snippet21>
Expand Down Expand Up @@ -552,7 +546,6 @@ static void Main()
Bitwise result: 1010
Bitwise result: 11000111
*/

//</snippet30>


Expand Down Expand Up @@ -1096,7 +1089,7 @@ static void Main()
int? x = null;

// Set y to the value of x if x is NOT null; otherwise,
// if x = null, set y to -1.
// if x == null, set y to -1.
int y = x ?? -1;

// Assign i to return value of the method if the method's result
Expand Down
4 changes: 2 additions & 2 deletions windowsforms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ If you're new to .NET Core, here are a few resources to help you understand the
* [Video: Modernizing Desktop Apps on Windows 10 with .NET Core 3.0 and much more](https://channel9.msdn.com/events/Build/2018/BRK3501?term=scott%20hunter&pubDate=year&lang-en=true)

## Quality disclaimer
.NET Core 3 support for desktop development is not yet in preview. There are early daily builds available supporting WinForms and WPF. You will likely encounter missing tools, bugs, and unexpected behavior. We do not recommend using this SDK and tools for building applications for production scenarios. We do recommend using this SDK and tools to evaluate your how easy it will be to migrate your existing applications, or if you're just interested in trying out the latest upcoming Windows development technology.
.NET Core 3 support for desktop development is in preview. There are early daily builds available supporting WinForms and WPF. You will likely encounter missing tools, bugs, and unexpected behavior. We do not recommend using this SDK and tools for building applications for production scenarios. We do recommend using this SDK and tools to evaluate your how easy it will be to migrate your existing applications, or if you're just interested in trying out the latest upcoming Windows development technology.

## Samples in this repo
| Sample Name | Description |
Expand All @@ -21,7 +21,7 @@ If you're new to .NET Core, here are a few resources to help you understand the

### Prerequisites and getting the tools

Install Visual Studio 2017 Update 15.8 or higher from [https://visualstudio.microsoft.com/downloads/](https://visualstudio.microsoft.com/downloads/), selecting the **.NET desktop development** workload with the options: **.NET Framwork 4.7.2 development tools** and **.NET Core 2.1 development tools**.
Install Visual Studio 2019 preview from [https://visualstudio.microsoft.com/vs/preview](https://visualstudio.microsoft.com/vs/preview), selecting the **.NET desktop development** workload with the options: **.NET Framwork 4.7.2 development tools** and **.NET Core 2.2 development tools**.

Install the latest [.NET Core 3.0 SDK daily build](https://aka.ms/netcore3sdk) available in the [dotnet/code-sdk repo](https://github.com/dotnet/core-sdk).

Expand Down
2 changes: 1 addition & 1 deletion wpf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ See [WPF Samples](https://www.github.com/Microsoft/wpf-samples) repo for additio

### Prerequisites and getting the tools

Install Visual Studio 2017 Update 15.8 or higher from [https://visualstudio.microsoft.com/downloads/](https://visualstudio.microsoft.com/downloads/), selecting the **.NET desktop development** workload with the options: **.NET Framwork 4.7.2 development tools** and **.NET Core 2.1 development tools**.
Install Visual Studio 2019 preview from [https://visualstudio.microsoft.com/vs/preview](https://visualstudio.microsoft.com/vs/preview), selecting the **.NET desktop development** workload with the options: **.NET Framwork 4.7.2 development tools** and **.NET Core 2.2 development tools**.

Install the latest [.NET Core 3.0 SDK daily build](https://aka.ms/netcore3sdk) available in the [dotnet/code-sdk repo](https://github.com/dotnet/core-sdk).

Expand Down