Auto MultiClassification is not Run;Help me me
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- csharp, machine-learning
调研方向
该 issue 仅提供了一个 inline C# reproduction;首先使用所述的 CsvHelper、ML.NET 和 AutoML 设置运行它,并检查 experiment.RunAsync() 处的失败。将 MapValueToKey/MapKeyToValue 列与 TaxiTripFarePrediction schema 进行比较。当 multiclass 实验完成并且能够生成三个示例预测时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
mycode
using CsvHelper;
using Microsoft.ML;
using Microsoft.ML.AutoML;
using Microsoft.ML.Data;
using Microsoft.ML.Trainers.LightGbm;
using System.Globalization;
using static Microsoft.ML.DataOperationsCatalog;
var list= new List();
for (int i = 1; i < 1000; i++)
{
list.Add(new TaxiTrip()
{
A = (float)i,
Label ="A"
});
}
for (int i = 1000; i < 2000; i++)
{
list.Add(new TaxiTrip()
{
A = (float)i,
Label = "B"
});
}
using (var writer = new StreamWriter("data.csv"))
using (var csv = new CsvWriter(writer, CultureInfo.InvariantCulture))
{
csv.WriteRecords(list);
}
MLContext ctx = new MLContext();
var dataPath = TrainDataPath;
// Infer column information
ColumnInferenceResults columnInference =
ctx.Auto().InferColumns(dataPath, labelColumnName: "Label", groupColumns: false);
// Create text loader
TextLoader loader = ctx.Data.CreateTextLoader(columnInference.TextLoaderOptions);
// Load data into IDataView
IDataView data = loader.Load(dataPath);
// Split into train (80%), validation (20%) sets
TrainTestData trainValidationData = ctx.Data.TrainTestSplit(data, testFraction: 0.2);
var context = new MLContext(1);
var experiment = context.Auto().CreateExperiment();
var pipeline = context.Auto().Featurizer(data, columnInformation: columnInference.ColumnInformation)
//.Append(context.Transforms.Conversion.MapKeyToValue(label, label))
.Append(context.Transforms.Conversion.MapValueToKey(outputColumnName: @"Label", inputColumnName: @"Label"))
.Append(context.Transforms.Conversion.MapKeyToValue(outputColumnName: @"PredictedLabel", inputColumnName: @"PredictedLabel"))
.Append(context.Auto().MultiClassification());
experiment.SetDataset(data, 5)
.SetMulticlassClassificationMetric(MulticlassClassificationMetric.MacroAccuracy, @"Label")
.SetPipeline(pipeline)
.SetTrainingTimeInSeconds(60);
var result = await experiment.RunAsync();
var predictionEngine = ctx.Model.CreatePredictionEngine<TaxiTrip, TaxiTripFarePrediction>(result.Model);
var testTaxiTrip = new TaxiTrip
{
A=888,
};
var prediction = predictionEngine.Predict(testTaxiTrip);
var testTaxiTrip2 = new TaxiTrip
{
A = 1888,
};
var prediction2 = predictionEngine.Predict(testTaxiTrip2);
var testTaxiTrip3 = new TaxiTrip
{
A = 555,
};
var prediction3 = predictionEngine.Predict(testTaxiTrip3);
//Console.WriteLine(prediction.FareAmount);
Console.WriteLine();
public class TaxiTrip
{
[ColumnName("A")]
public float A { get; set; }
[ColumnName("Label")]
public string Label { get; set; }
}
public class TaxiTripFarePrediction
{
[ColumnName(@"Label")]
public uint Label { get; set; }
[ColumnName(@"PredictedLabel")]
public string PredictedLabel { get; set; }
}
- 主要语言
- PowerShell
- 星标
- 4.7k
- 派生
- 2.7k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dotnet/machinelearning-samples 的其他 Issue
-
Missing "Anomaly Detection of Numbers of Phone Calls sample" link on main readme可能已有人在做 @tomaszcekalo 于 1966 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
-
Missing “DeepLearning Binary classification sample" link on main readme可能已有人在做 @tomaszcekalo 于 1966 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 68/100
-
难度 5/5 一周以上 新手友好度 25/100
dotnet/machinelearning-samples#1048 ·
-
难度 4/5 3-5 天 新手友好度 20/100
dotnet/machinelearning-samples#1044 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 15/100
dotnet/machinelearning-samples#1043 · 1 条评论 ·
查看 dotnet/machinelearning-samples 的全部 Issue
相似的 Issue
-
`unload()` returns the trained `modules_to_save` copy instead of the original module可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
huggingface/peft#3955 ·
维护者通常 1 天内回复
-
[Bug] WhisperTimeStampLogitsProcessor crashes with TypeError when eos_token_id is a single-element list可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 76/100
huggingface/transformers#49556 ·
维护者通常 1 天内回复
-
bug embedded exports
难度 2/5 1-3 小时 新手友好度 68/100
ultralytics/ultralytics#26655 · 2 条评论 ·
维护者通常 1 天内回复
-
enhancement needs-acceptance wg/router-models-inference-runtime
难度 2/5 1-3 小时 新手友好度 76/100
vllm-project/semantic-router#5015 · 1 条评论 ·
维护者通常 1 天内回复
-
1d-SAX distance shifts the representative segment center by half a sample可能已有人在做 @ktz03 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
tslearn-team/tslearn#776 ·
维护者通常 2 天内回复