{"action":"created","issue":{"url":"https://api.github.com/repos/Craigacp/FEAST/issues/3","repository_url":"https://api.github.com/repos/Craigacp/FEAST","labels_url":"https://api.github.com/repos/Craigacp/FEAST/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/Craigacp/FEAST/issues/3/comments","events_url":"https://api.github.com/repos/Craigacp/FEAST/issues/3/events","html_url":"https://github.com/Craigacp/FEAST/issues/3","id":146641683,"number":3,"title":"Add pre given feautes to CMIM.","user":{"login":"alecuba16","id":1557780,"avatar_url":"https://avatars.githubusercontent.com/u/1557780?v=3","gravatar_id":"","url":"https://api.github.com/users/alecuba16","html_url":"https://github.com/alecuba16","followers_url":"https://api.github.com/users/alecuba16/followers","following_url":"https://api.github.com/users/alecuba16/following{/other_user}","gists_url":"https://api.github.com/users/alecuba16/gists{/gist_id}","starred_url":"https://api.github.com/users/alecuba16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alecuba16/subscriptions","organizations_url":"https://api.github.com/users/alecuba16/orgs","repos_url":"https://api.github.com/users/alecuba16/repos","events_url":"https://api.github.com/users/alecuba16/events{/privacy}","received_events_url":"https://api.github.com/users/alecuba16/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-04-07T14:23:50Z","updated_at":"2016-08-03T14:13:01Z","closed_at":null,"body":"Hello!\r\n\r\nAs I told you on mloss, I would like to modify the CMIM to accept a set of predefined features by a input , so as a first approach I will work on this code from [CMIM.c](https://github.com/Craigacp/FEAST/blob/master/CMIM.c):\r\n\r\nI think that the first loop on lines [80-94](https://github.com/Craigacp/FEAST/blob/master/CMIM.c#L80-94) is mandatory because you have to calculate first the max CMIM of whole the features (including pre-selected), is right?\r\n\r\nImagine that I have already received preSelectedFeatures as an array of the positions of the features presents on feature2D and a auxiliary function isApreSelectedFeature as a simply search and check if exists.\r\n\r\n[CMIM.c lines 104 ->129 ](https://github.com/Craigacp/FEAST/blob/master/CMIM.c#L104-129)  \r\n\r\n> for (i = 1; i < k; i++)\r\n>   {\r\n>     score = 0.0;\r\n>     iMinus = i-1;\r\n>     for (j = 0; j < noOfFeatures; j++)\r\n>     {\r\n>       while ((classMI[j] > score) && (lastUsedFeature[j] < i))\r\n>       {\r\n----------- my code ----------------------------------\r\n>         if( isApreSelectedFeature(j,preSelectedFeatures)){\r\n>            outputFeatures[i] = j;\r\n>         }else{ \r\n---------- finish my code ----------------------------\r\n>         /*double calculateConditionalMutualInformation(double *firstVector, double *targetVector, double *conditionVector, int vectorLength);*/\r\n>         currentFeature = (int) outputFeatures[lastUsedFeature[j]];\r\n>         conditionalInfo = calculateConditionalMutualInformation(feature2D[j],classColumn,feature2D[currentFeature],noOfSamples);\r\n>         if (classMI[j] > conditionalInfo)\r\n>         {\r\n>           classMI[j] = conditionalInfo;\r\n>         }/*reset classMI*/\r\n>         }\r\n>         /*moved due to C indexing from 0 rather than 1*/\r\n>         lastUsedFeature[j] += 1;\r\n>       }/*while partial score greater than score & not reached last feature*/\r\n>       if (classMI[j] > score)\r\n>       {\r\n>         score = classMI[j];\r\n>         outputFeatures[i] = j;\r\n>       }/*if partial score still greater than score*/\r\n> \t}/*for number of features*/\r\n>   }/*for the number of feature\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/Craigacp/FEAST/issues/comments/237248423","html_url":"https://github.com/Craigacp/FEAST/issues/3#issuecomment-237248423","issue_url":"https://api.github.com/repos/Craigacp/FEAST/issues/3","id":237248423,"user":{"login":"Craigacp","id":729696,"avatar_url":"https://avatars.githubusercontent.com/u/729696?v=3","gravatar_id":"","url":"https://api.github.com/users/Craigacp","html_url":"https://github.com/Craigacp","followers_url":"https://api.github.com/users/Craigacp/followers","following_url":"https://api.github.com/users/Craigacp/following{/other_user}","gists_url":"https://api.github.com/users/Craigacp/gists{/gist_id}","starred_url":"https://api.github.com/users/Craigacp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Craigacp/subscriptions","organizations_url":"https://api.github.com/users/Craigacp/orgs","repos_url":"https://api.github.com/users/Craigacp/repos","events_url":"https://api.github.com/users/Craigacp/events{/privacy}","received_events_url":"https://api.github.com/users/Craigacp/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T14:13:01Z","updated_at":"2016-08-03T14:13:01Z","body":"@mbq That R library looks good. I'm not sure exactly what the compilation path is for a C extension in R, is there a reason you have to break apart the header files like that? Would adding more flags to the header files help? Also, we should move this discussion to a different issue."}}
{"actor":{"display_login":"Craigacp"}}