<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The problem with your analysis is it doesn’t include anything but features. You may want to look at Nina Zumel and John Mount’s work on y-aware PCR and PCA,
 as well as y-aware feature scaling.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a href="http://www.win-vector.com/blog/2016/05/pcr_part1_xonly/">http://www.win-vector.com/blog/2016/05/pcr_part1_xonly/</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a href="http://www.win-vector.com/blog/2016/05/pcr_part2_yaware/">http://www.win-vector.com/blog/2016/05/pcr_part2_yaware/</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a href="http://www.win-vector.com/blog/2016/06/y-aware-scaling-in-context/">http://www.win-vector.com/blog/2016/06/y-aware-scaling-in-context/</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="center" style="text-align:center"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:red;background:white">__________________________________________________________________________________________________________________________________________</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#212121"><br>
</span><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;background:white">Dale T. Smith</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;background:white">
</span><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:red;background:white">|</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;background:white"> Macy's Systems and Technology
</span><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:red;background:white">|</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D;background:white"> IFS eCom CSE Data Science
<br>
</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">5985 State Bridge Road, Johns Creek, GA 30097 </span><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:red">|</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"> dale.t.smith@macys.com<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> scikit-learn [mailto:scikit-learn-bounces+dale.t.smith=macys.com@python.org]
<b>On Behalf Of </b>Thomas Evangelidis<br>
<b>Sent:</b> Thursday, November 17, 2016 9:01 AM<br>
<b>To:</b> Scikit-learn user and developer mailing list<br>
<b>Subject:</b> Re: [scikit-learn] suggested classification algorithm<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="color:red">⚠ EXT MSG:</span> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:black">Guys thank you all for your hints! Practical experience is irreplaceable that's why I posted this query here. I could read all week the mailing list archives and the respective internet resources but still not
 find the key info I could potentially get by someone here.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">I did PCA on my training set (this one has 24 positive and 1278 negative observation) and projected the 19 features on the first 2 PCs, which explain 87.6 % of the variance in the data. Does this plot help to decide
 which classification algorithms and/or over- or under-sampling would be more suitable?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><a href="https://dl.dropboxusercontent.com/u/48168252/PCA_of_features.png">https://dl.dropboxusercontent.com/u/48168252/PCA_of_features.png</a></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">thanks for your advices<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">Thomas<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 16 November 2016 at 22:20, Sebastian Raschka <<a href="mailto:se.raschka@gmail.com" target="_blank">se.raschka@gmail.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">Yeah, there are many useful resources and implementations scattered around the web. However, a good, brief overview of the general ideas and concepts would be this one, for example:
<a href="http://www.svds.com/learning-imbalanced-classes/" target="_blank">http://www.svds.com/learning-imbalanced-classes/</a><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
> On Nov 16, 2016, at 3:54 PM, Dale T Smith <<a href="mailto:Dale.T.Smith@macys.com">Dale.T.Smith@macys.com</a>> wrote:<br>
><br>
> Unbalanced class classification has been a topic here in past years, and there are posts if you search the archives. There are also plenty of resources available to help you, from actual code on Stackoverflow, to papers that address various ideas. I don’t
 think it’s necessary to repeat any of this on the mailing list.<br>
><br>
><br>
> __________________________________________________________________________________________________________________________________________<br>
> Dale T. Smith | Macy's Systems and Technology | IFS eCom CSE Data Science<br>
> 5985 State Bridge Road, Johns Creek, GA 30097 | <a href="mailto:dale.t.smith@macys.com">
dale.t.smith@macys.com</a><br>
><br>
> From: scikit-learn [mailto:<a href="mailto:scikit-learn-bounces%2Bdale.t.smith">scikit-learn-bounces+dale.t.smith</a>=<a href="mailto:macys.com@python.org">macys.com@python.org</a>] On Behalf Of Fernando Marcos Wittmann<br>
> Sent: Wednesday, November 16, 2016 3:11 PM<br>
> To: Scikit-learn user and developer mailing list<br>
> Subject: Re: [scikit-learn] suggested classification algorithm<br>
><br>
> ⚠ EXT MSG:<br>
> Three based algorithms (like Random Forest) usually work well for imbalanced datasets. You can also take a look at the SMOTE technique (<a href="http://jair.org/media/953/live-953-2037-jair.pdf" target="_blank">http://jair.org/media/953/live-953-2037-jair.pdf</a>)
 which you can use for over-sampling the positive observations.<br>
><br>
> On Mon, Nov 14, 2016 at 9:14 AM, Thomas Evangelidis <<a href="mailto:tevang3@gmail.com">tevang3@gmail.com</a>> wrote:<br>
> Greetings,<br>
><br>
> I want to design a program that can deal with classification problems of the same type, where the  number of positive observations is small but the number of negative much larger. Speaking with numbers, the number of positive observations could range usually
 between 2 to 20 and the number of negative could be at least x30 times larger. The number of features could be between 2 and 20 too, but that could be reduced using feature selection and elimination algorithms. I 've read in the documentation that some algorithms
 like the SVM are still effective when the number of dimensions is greater than the number of samples, but I am not sure if they are suitable for my case. Moreover, according to this Figure, the Nearest Neighbors is the best and second is the RBF SVM:<br>
><br>
> <a href="http://scikit-learn.org/stable/_images/sphx_glr_plot_classifier_comparison_001.png" target="_blank">
http://scikit-learn.org/stable/_images/sphx_glr_plot_classifier_comparison_001.png</a><br>
><br>
> However, I assume that Nearest Neighbors would not be effective in my case where the number of positive observations is very low. For these reasons I would like to know your expert opinion about which classification algorithm should I try first.<br>
><br>
> thanks in advance<br>
> Thomas<br>
><br>
><br>
> --<br>
> ======================================================================<br>
> Thomas Evangelidis<br>
> Research Specialist<br>
> CEITEC - Central European Institute of Technology<br>
> Masaryk University<br>
> Kamenice 5/A35/1S081,<br>
> 62500 Brno, Czech Republic<br>
><br>
> email: <a href="mailto:tevang@pharm.uoa.gr">tevang@pharm.uoa.gr</a><br>
>           <a href="mailto:tevang3@gmail.com">tevang3@gmail.com</a><br>
><br>
> website: <a href="https://sites.google.com/site/thomasevangelidishomepage/" target="_blank">
https://sites.google.com/site/thomasevangelidishomepage/</a><br>
><br>
><br>
> _______________________________________________<br>
> scikit-learn mailing list<br>
> <a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/scikit-learn" target="_blank">
https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
><br>
><br>
><br>
><br>
> --<br>
><br>
> Fernando Marcos Wittmann<br>
> MS Student - Energy Systems Dept.<br>
> School of Electrical and Computer Engineering, FEEC<br>
> University of Campinas, UNICAMP, Brazil<br>
> <a href="tel:%2B55%20%2819%29%20987-211302">+55 (19) 987-211302</a><br>
><br>
> * This is an EXTERNAL EMAIL. Stop and think before clicking a link or opening attachments.<br>
> _______________________________________________<br>
> scikit-learn mailing list<br>
> <a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/scikit-learn" target="_blank">
https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
<br>
_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<p style="margin-bottom:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">======================================================================</span><o:p></o:p></p>
<p style="margin-bottom:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Thomas Evangelidis</span><o:p></o:p></p>
<p style="margin-bottom:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Research Specialist</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">CEITEC - Central European Institute of Technology<br>
Masaryk University<br>
Kamenice 5/A35/1S081, <br>
62500 Brno, Czech Republic </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin-bottom:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">email:
<a href="mailto:tevang@pharm.uoa.gr" target="_blank">tevang@pharm.uoa.gr</a></span><o:p></o:p></p>
<p style="margin-bottom:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">         
<a href="mailto:tevang3@gmail.com" target="_blank">tevang3@gmail.com</a></span><o:p></o:p></p>
<p style="margin-bottom:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><br>
website: <a href="https://sites.google.com/site/thomasevangelidishomepage/" target="_blank">
https://sites.google.com/site/thomasevangelidishomepage/</a></span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span style="color:red">* This is an EXTERNAL EMAIL. Stop and think before clicking a link or opening attachments.</span>
<o:p></o:p></p>
</div>
</div>
</body>
</html>