//Step 1. Create an ML Context
var ctx = new MLContext();
//Step 2. Read in the input data from a text file for model training
IDataView trainingData = ctx.Data
.LoadFromTextFile<ModelInput>(dataPath, hasHeader: true);
//Step 3. Build your data processing and training pipeline
var pipeline = ctx.Transforms.Text
.FeaturizeText("Features", nameof(SentimentIssue.Text))
.Append(ctx.BinaryClassification.Trainers
.LbfgsLogisticRegression("Label", "Features"));
//Step 4. Train your model
ITransformer trainedModel = pipeline.Fit(trainingData);
//Step 5. Make predictions using your trained model
var predictionEngine = ctx.Model
.CreatePredictionEngine<ModelInput, ModelOutput>(trainedModel);
var sampleStatement = new ModelInput() { Text = "This is a horrible movie" };
var prediction = predictionEngine.Predict(sampleStatement);
//Step 1. Create an ML Context
let ctx = MLContext()
//Step 2. Read in the input data from a text file
let trainingData = ctx.Data.LoadFromTextFile<ModelInput>(dataPath, hasHeader=true)
//Step 3. Build your data processing and training pipeline
let scope = ctx.BinaryClassification.Trainers.LbfgsLogisticRegression("Label", "Features")
let pipeline = ctx.Transforms.Text.FeaturizeText("Features", "Text").Append(scope)
//Step 4. Train your model
let trainedModel = pipeline.Fit(trainingData)
//Step 5. Make predictions using your model
let predictionEngine = ctx.Model.CreatePredictionEngine<ModelInput, ModelOutput>(trainedModel)
let sampleStatement = { Label = false; Text = "This is a horrible movie" }
let prediction = predictionEngine.Predict(sampleStatement)
.NET 개발자를 위한 빌드
ML.NET을 사용하면 .NET 에코시스템을 벗어나지 않고도 C# 또는 F#을 사용하여 사용자 지정 ML 모델을 만들 수 있습니다.
ML.NET은 .NET 개발자로서 이미 보유하고 있는 모든 지식, 기술, 코드 및 라이브러리를 다시 사용하여 기계 학습을 웹, 모바일, 데스크톱, 게임 및 IoT 앱에 쉽게 통합할 수 있게 합니다.
GitHub에서 더 많은 ML.NET 샘플을 찾거나 ML.NET 자습서를 살펴보세요.
AutoML로 간편하게 사용자 지정 ML
ML.NET은 사용자 지정 ML 모델을 매우 쉽게 빌드할 수 있도록 ML.NET CLI를 제공합니다.
이러한 도구는 기계 학습 시나리오에 가장 적합한 모델을 빌드하는 프로세스를 자동화하는 최첨단 기술인 AutoML(Automated ML)을 사용합니다. 데이터를 로드하기만 하면 AutoML이 나머지 모델 빌드 프로세스를 처리합니다.
TensorFlow & 등
ML.NET은 다른 인기 있는 ML 프레임워크(TensorFlow, ONNX, Infer.NET 등)를 사용하고 이미지 분류, 개체 감지 등 더 많은 기계 학습 시나리오에 액세스할 수 있도록 확장 가능한 플랫폼으로 설계되었습니다.
문서에서 가져온 데이터입니다. Machine Learning at Microsoft with ML.NET paper. ~900MB의 Amazon 리뷰 데이터 세트를 사용한 감정 분석 결과. 정확도가 높고 런타임이 낮을수록 좋습니다.
높은 성능 및 정확도
9GB Amazon 리뷰 데이터 세트를 사용하여 ML.NET은 95% 정확도로 감정 분석 모델을 학습했습니다. 다른 인기 있는 기계 학습 프레임워크는 메모리 오류로 인해 데이터 세트를 처리하지 못했습니다. 모든 프레임워크가 학습을 완료할 수 있도록 데이터 세트의 10%에 대한 학습에서 ML.NET은 최고 속도와 정확도를 보여 주었습니다.
성능 평가는 클릭률 예측 및 비행 지연 예측을 포함하여 다른 기계 학습 시나리오에서 비슷한 결과를 발견했습니다.
시작할 준비가 되셨나요?
단계별 자습서는 컴퓨터에서 ML.NET을(를) 실행하는 데 도움이 될 것입니다.



