<div dir="ltr">Hello James, Parth,<div><br></div><div>Following our discussion on IRC and on code review, the way FeatureVector class works needs some discussion.</div><div><br></div><div>Presently, the FeatureVector class is defined as follows, with a fixed number of feature count (19):</div><div><br></div><div><pre style="color:rgb(0,0,0);background-image:initial;background-repeat:initial"><span style="color:rgb(128,0,0);font-weight:bold">class</span> FeatureVector<span style="color:rgb(128,0,128)">::</span>Internal <span style="color:rgb(128,0,128)">:</span> <span style="color:rgb(128,0,0);font-weight:bold">public</span> Xapian<span style="color:rgb(128,0,128)">::</span>Internal<span style="color:rgb(128,0,128)">::</span>intrusive_base
<span style="color:rgb(128,0,128)">{</span>
<span style="color:rgb(128,0,0);font-weight:bold">friend</span> <span style="color:rgb(128,0,0);font-weight:bold">class</span> FeatureVector<span style="color:rgb(128,0,128)">;</span>
<span style="color:rgb(128,0,0);font-weight:bold">double</span> label<span style="color:rgb(128,0,128)">;</span>
<span style="color:rgb(128,0,0);font-weight:bold">double</span> score<span style="color:rgb(128,0,128)">;</span>
<span style="color:rgb(102,102,22)">std</span><span style="color:rgb(128,0,128)">::</span><span style="color:rgb(96,48,0)">map</span><span style="color:rgb(128,0,128)"><</span><span style="color:rgb(128,0,0);font-weight:bold">int</span><span style="color:rgb(128,128,48)">,</span><span style="color:rgb(128,0,0);font-weight:bold">double</span><span style="color:rgb(128,0,128)">></span> fvals<span style="color:rgb(128,0,128)">;</span>
<span style="color:rgb(128,0,0);font-weight:bold">int</span> fcount<span style="color:rgb(128,0,128)">;</span>
Xapian<span style="color:rgb(128,0,128)">::</span>docid did<span style="color:rgb(128,0,128)">;</span></pre>The two approaches that were discussed were: </div><div>1. Using enums as IDs for features in fvals. </div><div>2. Making fvals into a configurable vector of feature values.</div><div><br></div><div>The issues were that the first way would still assume an order in which the features occur, and the second way would require the feature generation code to be changed into lots of little classes, which might be an overhead right now but would be a good functionality to have in future.</div><div><br></div><div>What would be the best approach here?</div><div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px;font-family:arial"><font size="2" color="#666666">----------------------------------------------------------------------------</font></div><div style="font-size:12.8px;font-family:arial"><font size="2" color="#666666">Kind Regards,</font></div><div style="font-size:12.8px"><font size="2" color="#666666" style="font-family:arial">Ayush Tomar</font><font size="2" color="#0000ee" style="font-family:arial"> | <a href="http://ayshtmr.xyz" style="color:rgb(17,85,204)" target="_blank">My Webpage</a></font><font color="#666666" style="font-family:arial"> | <a href="https://in.linkedin.com/in/ayushtomar" style="color:rgb(17,85,204)" target="_blank">LinkedIn</a></font></div></div></div></div></div></div></div></div></div></div>
</div></div>