dotnet / dotnet/machinelearning
[Nice to have] having transformers to get date information from Datetime
- Dominant language
- C#
- Stars
- 9.4k
- Forks
- 2k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 11
Description
ModelBuilder just add support for `Datetime` type, in order to make the most use of this type, it would be helpful if ML.Net has API to extract specific date information from datetime column
**Describe the solution you'd like**
```csharp
class Input
{
public Datetime date {get; set;]
}
var pipeline = mlContext.Transformer.GetYearOutOfDate("year", "date")
.Append(mlContext.Transformer.GetDayOutOfDate("day", "date")
.Append(mlContext.Transformer.GetWeekdayOutOfDate("weekday", "date")
.Append(mlContext.Transformer.GetMonthOutOfDate("month", "date");
class Output
{
public Datetme date {get; set;}
public int Year {get; set;}
public int day {get; set;}
public string Month {get; set;} // Feb, Jan...
public string Weekday {get; set;} // Mon, Tue,..
}
```
## What's more
ignore this issue if ML.Net already support that.
Contributor guide
Assessment
This issue has not been assessed yet.