machine learning - Features (Attributes) ranking -
i have dataset items , features (attributes). each item has features.
total number of features ~400 feature.
i want rank features based on importance. not looking classification, looking features ranking.
i convert item-feature binary matrix fowllowing, 1 means feature exists in item , 0 otherwise.
itemid | feature1 | feature2 | feature3 | feature4 .... 1 | 0 | 1 | 1 | 0 2 | 1 | 0 | 0 | 1 3 | 1 | 1 | 1 | 0 4 | 0 | 0 | 1 | 1
an example of real data hotels, features like: air condition, free wifi, etc.
hotelid | air condition| free wifi .... 1 | 0 | 1 2 | 1 | 0 3 | 1 | 1 4 | 0 | 0 .....
i need know use , how use it.
a sample code appreciated
it looks looking algorithm such information gain. taken documentation of class:
evaluates worth of attribute measuring information gain respect class
here can find usage example:
good luck.
Comments
Post a Comment