{"action":"created","issue":{"url":"https://api.github.com/repos/honeynet/cuckooml/issues/14","repository_url":"https://api.github.com/repos/honeynet/cuckooml","labels_url":"https://api.github.com/repos/honeynet/cuckooml/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/honeynet/cuckooml/issues/14/comments","events_url":"https://api.github.com/repos/honeynet/cuckooml/issues/14/events","html_url":"https://github.com/honeynet/cuckooml/issues/14","id":179701241,"number":14,"title":"Only one set of features is used for clustering","user":{"login":"dueland","id":16362808,"avatar_url":"https://avatars.githubusercontent.com/u/16362808?v=3","gravatar_id":"","url":"https://api.github.com/users/dueland","html_url":"https://github.com/dueland","followers_url":"https://api.github.com/users/dueland/followers","following_url":"https://api.github.com/users/dueland/following{/other_user}","gists_url":"https://api.github.com/users/dueland/gists{/gist_id}","starred_url":"https://api.github.com/users/dueland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dueland/subscriptions","organizations_url":"https://api.github.com/users/dueland/orgs","repos_url":"https://api.github.com/users/dueland/repos","events_url":"https://api.github.com/users/dueland/events{/privacy}","received_events_url":"https://api.github.com/users/dueland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-28T07:40:02Z","updated_at":"2016-09-29T12:04:54Z","closed_at":null,"body":"Hi,\r\n\r\nthanks for sharing this project! I am in the process of adding features to the nominal feature set. In that process I noticed that my changes were not taken into account in the clustering results, even though I specified nominal in the configuration. I believe the reason is that the code that handles the configuration settings is using an if... elif construct, which will lead to only choosing one set of features. Relevant code snippet is:\r\n\r\n        # Select features                               \r\n        selected_features = []                          \r\n        sf = [i.strip() for i in cfg.cuckooml.features.split(\",\")]\r\n        if \"simple\" in sf:\r\n            selected_features.append(simple_features)\r\n        elif \"nominal\" in sf:\r\n            selected_features.append(features_nominal)\r\n        elif \"numerical\" in sf:\r\n            selected_features.append(features_numerical)"},"comment":{"url":"https://api.github.com/repos/honeynet/cuckooml/issues/comments/250447558","html_url":"https://github.com/honeynet/cuckooml/issues/14#issuecomment-250447558","issue_url":"https://api.github.com/repos/honeynet/cuckooml/issues/14","id":250447558,"user":{"login":"dueland","id":16362808,"avatar_url":"https://avatars.githubusercontent.com/u/16362808?v=3","gravatar_id":"","url":"https://api.github.com/users/dueland","html_url":"https://github.com/dueland","followers_url":"https://api.github.com/users/dueland/followers","following_url":"https://api.github.com/users/dueland/following{/other_user}","gists_url":"https://api.github.com/users/dueland/gists{/gist_id}","starred_url":"https://api.github.com/users/dueland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dueland/subscriptions","organizations_url":"https://api.github.com/users/dueland/orgs","repos_url":"https://api.github.com/users/dueland/repos","events_url":"https://api.github.com/users/dueland/events{/privacy}","received_events_url":"https://api.github.com/users/dueland/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T12:04:54Z","updated_at":"2016-09-29T12:04:54Z","body":"I still encountered the issue after changing the conditionals to reflect the intention of the author (appending). The reason has to do with the ensuing for loop:\r\n\r\n        # Apply filters to selected datasets\r\n        filters = [i.strip() for i in cfg.cuckooml.features_filter.split(\",\")]\r\n        data = []\r\n        for f, d in itertools.izip(filters, selected_features):\r\n            if f == \"log_bin\":\r\n                data.append(d.applymap(ml.__log_bin))\r\n            elif f == \"filter_dataset\":                             #D: ISSUE. Only runs once!\r\n                print \"RUNs\\n\"\r\n                data.append(ml.filter_dataset(d))\r\n\r\nIf you only specified \"filter_dataset\" in the configuration, this for loop will only run once. To get around that, just add another element to the filters data structure in the configuration file:\r\n       \r\n      features_filter = filter_dataset, filter_dataset\r\n"}}
{"actor":{"display_login":"dueland"}}