Skip to content

Add Date Transform/Vectorizers #789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dckorben opened this issue Aug 31, 2018 · 4 comments
Closed

Add Date Transform/Vectorizers #789

dckorben opened this issue Aug 31, 2018 · 4 comments
Labels
enhancement New feature or request up-for-grabs A good issue to fix if you are trying to contribute to the project

Comments

@dckorben
Copy link

It naturally makes sense to be able to take a date column and break it into the common sub components used in data analysis. As a very common workflow, it makes sense to build a vectorizer that does this internally effectively adding columns to the dataset from a single source date column which can then be Concatenator to the features.

I was thinking perhaps a vectorizer that takes a flags enum of various types of date transform (e.g. Day, Month, Year, Day of Week, Day of Year, Quarter, ISO Week of Year, etc). Obviously there are many ways to slice a date so maybe ultimately the best option is a builtin user defined formula transform which can solve this but Dates are a very common workflow as lots of real world data is actually time series.

@zeahmed
Copy link
Contributor

zeahmed commented Aug 31, 2018

Yes, there should be a DataTime Transform/Featurizer in ML.Net that will do the jobs listed above. Its simple to implement and open for contribution.

@Ivanidzo4ka Ivanidzo4ka added enhancement New feature or request up-for-grabs A good issue to fix if you are trying to contribute to the project labels Oct 19, 2018
@Ivanidzo4ka
Copy link
Contributor

If someone interested in doing this I would recommend to look on https://github.com/dotnet/machinelearning/blob/master/src/Microsoft.ML.ImageAnalytics/ImageLoaderTransform.cs as base example.


this code responsible for converting incoming data into output
other than that
private readonly ImageType _imageType;
should be changed to private readonly ColumnType and be set to new VectorType(NumberType.Float,size_of_your_float_vector);

@dckorben
Copy link
Author

I will try to pick this up as it is still something I would use.

@najeeb-kazmi
Copy link
Member

This issue was addressed in #4521

@ghost ghost locked as resolved and limited conversation to collaborators Mar 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request up-for-grabs A good issue to fix if you are trying to contribute to the project
Projects
None yet
Development

No branches or pull requests

4 participants