machinelearning-samples icon indicating copy to clipboard operation
machinelearning-samples copied to clipboard

How to use Feature selection

Open Vijay27anand opened this issue 8 years ago • 11 comments

I want to use FeatureSelectorByMutualInformation feature selection, can you please provide me a sample code snippet how to use it with a dataset, i could not able find in the samples provided.

Vijay27anand avatar Nov 23 '18 05:11 Vijay27anand

@Zruty0 would be able to help with this one.

asthana86 avatar Nov 23 '18 10:11 asthana86

@Zruty0 what i am trying to do is to use a feature selection by mutual information to return me the list of columns with the scores, can you help with a sample. Also do i need to do onehotencoding, normalize on the IDataView before doing feature selection?

Vijay27anand avatar Nov 23 '18 14:11 Vijay27anand

@Zruty0 is out on parental leave. Tom/Ivan can you folks help answer Vijay's query. @Ivanidzo4ka @TomFinley

asthana86 avatar Nov 28 '18 12:11 asthana86

Sure. https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/FeatureSelectionTransform.cs Here is example of our Count selection and Mutual information transforms in action. They are gonna be part of 0.8 release (which is around the corner) but you can always try our daily nugets to test them.

Ivanidzo4ka avatar Nov 28 '18 17:11 Ivanidzo4ka

Thanks @Ivanidzo4ka it was helpful. I need more details on how to get the scores of individual columns similar to what we get from Azure ML Studio. I have attached the sample ML studio screen shot that showing the score of columns. Similar to this i want to identify the top columns to consider for my Label. azureml-mi

Vijay27anand avatar Nov 29 '18 09:11 Vijay27anand

@Vijay27anand - As Ivan mentioned, with the upcoming ML.NET v08 version we're also releasing improved model explainability, so in 0.8 release, we have included tools for model explainability that we use internally at Microsoft to help machine learning developers better understand the feature importance of models ("Permutation Feature Importance") and create high-capacity models that can be easily interpreted by others ("Generalized Additive Models"). I'm writing a blog post including these features which will be published next week. Stay tuned and check it out next week at the .NET Blog, on? 👍

CESARDELATORRE avatar Nov 29 '18 16:11 CESARDELATORRE

@CESARDELATORRE with 0.8 the MutualInformationFeatureSelectionUtils.Train seems to be removed, i was using to understand the score for the columns in the Mutual feature selection. Please let me know which on should i use now.

Vijay27anand avatar Dec 05 '18 06:12 Vijay27anand

Adding @rogancarr - Rogan, is there something comparable to MutualInformationFeatureSelectionUtils.Train in the new model features explainability coming in 0.8? Any other choice to understand the score for the columns in the Mutual feature selection?

CESARDELATORRE avatar Dec 05 '18 09:12 CESARDELATORRE

@CESARDELATORRE @rogancarr can you answer how to understand the score for the columns in the Mutual feature selection in 0.8

Vijay27anand avatar Jan 03 '19 16:01 Vijay27anand

it will be implemented with #2328

Vijay27anand avatar Jan 31 '19 06:01 Vijay27anand

https://github.com/dotnet/machinelearning/issues/2328

justinormont avatar Jan 31 '19 06:01 justinormont