-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Calculated Feature #595
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
Comments
Hi, I'm also curious how can I convert a date field to a set of new fields like: year, month, day_of_month, day_of_week, etc? |
for dynamic fields using .NET Dictionaries Dictionary<"YourNewField",Value> |
Hi @gironymo , Your and @WladdGorshenin 's cases are perfect examples of why we want to have https://github.com/dotnet/machinelearning/blob/master/src/Microsoft.ML.Api/MapTransform.cs available through the user API. When it is done, you will be able to add your own transformations to the pipeline, and mix&match them with the standard ones provided by ML.NET. Right now, even though |
Hi @AbhiOnGithub could you please elaborate a bit more? |
@WladdGorshenin , the comment from @AbhiOnGithub seems to me more like a feature request. We definitely do not support dictionaries as sources of data right now. Nor do we have plans to do this in the near future, unless there is a compelling argument that outweighs the perf and data consistency implications of this potential feature. |
@Zruty0 is there any workaround? |
@WladdGorshenin I assume you are referring to this:
My best recommendation at the moment would be to perform this pre-processing prior to giving this object to ML.NET. Actually, now that we're merging #616 , you should be able to get away with something like this: public class MyDataRow
{
private DateTime _dateTime;
public float Day { get { return _dateTime.Day; } set { throw new NotImplementedException(); } }
public float DayOfWeek { get { return (float)_dateTime.DayOfWeek; } set { throw new NotImplementedException(); } }
// etc
} |
I think this should be closed. Feel free to reopen to add more comments. |
Hello,
is there a way to add a calculated feature?
I get the data in a CSV-File which is loaded with a TextLoader. I'm not able to affect the data in the file. For My model I would use a calculated feature (e. g. NewFeature = Feature1 + Feature2) or any other calculations like manual binning (e. g. if Feature1 < 10 then NewFeature = 1 else if Feature1 >= 10 and Feature1 < 20 then NewFeature = 2 else NewFeature = 3).
In the Azure Machine Learning Studio are some tasks which can be used for e. g. SQL Transformation, R-Scripts ...
The text was updated successfully, but these errors were encountered: