Skip to content

[Nice to have] having transformers to get date information from Datetime #6232

Open

Description

@LittleLittleCloud

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

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.

Activity

  1. ghost added
    untriagedNew issue has not been triaged
    on Jun 16, 2022
  2. added this to the ML.NET Future milestone on Jul 11, 2022
  3. ghost removed
    untriagedNew issue has not been triaged
    on Jul 11, 2022
  4. ghost removed
    untriagedNew issue has not been triaged
    on Jul 11, 2022
  5. luisquintanilla commented on Sep 20, 2022

    @luisquintanilla
    Contributor

    @LittleLittleCloud Sorry for the late reply. Check out the FeaturizeTimeDate and ReplaceMissingTimeSeriesValues transforms. They're not in the docs but are part of ML.NET.

    Currently tracking adding them to docs in #6333 and #6334

    Closing this issue for now.

  6. reopened this on Oct 7, 2022
  7. ericstj commented on Oct 7, 2022

    @ericstj
    Member

    Reactivating since we're removing Microsoft.ML.Featurizers in #6355. Per offline discussion we think that we could bring back some of these as a managed implementation.

  8. added
    Priority:2Work that is important, but not critical for the release
    area-TransformsData preparation and feature transforms
    and removed on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:2Work that is important, but not critical for the releasearea-TransformsData preparation and feature transformsenhancementNew feature or requestgreendevelopment

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions