Skip to content

Commit

Permalink
update to version 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
need47 committed Nov 5, 2012
1 parent c158719 commit 32fc278
Show file tree
Hide file tree
Showing 120 changed files with 310 additions and 257 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2012-11-05 v1.4.0
------------------

* update according to reviewers' comments
* several bug fixes based on users' feedback

2012-05-31 v1.3.1
------------------

Expand Down
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
FSelector: a Ruby gem for feature selection and ranking
===========================================================
FSelector: a Ruby gem for feature selection
===========================================

**Home**: [https://rubygems.org/gems/fselector](https://rubygems.org/gems/fselector)
**Source Code**: [https://github.com/need47/fselector](https://github.com/need47/fselector)
**Documentation** [http://rubydoc.info/gems/fselector/frames](http://rubydoc.info/gems/fselector/frames)
**Documentation**: [http://rubydoc.info/gems/fselector/frames](http://rubydoc.info/gems/fselector/frames)
**Publication**: [Bioinformatics, 2012, 28, 2851-2852](http://bioinformatics.oxfordjournals.org/content/28/21/2851)
**Author**: Tiejun Cheng
**Email**: [[email protected]](mailto:[email protected])
**Copyright**: 2012
**License**: MIT License
**Latest Version**: 1.3.1
**Release Date**: 2012-05-31
**Latest Version**: 1.4.0
**Release Date**: 2012-11-05

Synopsis
--------

FSelector is a Ruby gem that aims to integrate various feature
selection/ranking algorithms and related functions into one single
selection algorithms and related functions into one single
package. Welcome to contact me ([email protected]) if you'd like to
contribute your own algorithms or report a bug. FSelector allows user
to perform feature selection by using either a single algorithm or an
Expand Down Expand Up @@ -49,18 +50,18 @@ Feature List
Accuracy Acc weighting multi-class discrete
AccuracyBalanced Acc2 weighting multi-class discrete
BiNormalSeparation BNS weighting multi-class discrete
CFS_d CFS_d subset multi-class discrete
CFS_d CFS_d searching multi-class discrete
ChiSquaredTest CHI weighting multi-class discrete
CorrelationCoefficient CC weighting multi-class discrete
DocumentFrequency DF weighting multi-class discrete
F1Measure F1 weighting multi-class discrete
FishersExactTest FET weighting multi-class discrete
FastCorrelationBasedFilter FCBF subset multi-class discrete
FastCorrelationBasedFilter FCBF searching multi-class discrete
GiniIndex GI weighting multi-class discrete
GMean GM weighting multi-class discrete
GSSCoefficient GSS weighting multi-class discrete
InformationGain IG weighting multi-class discrete
INTERACT INTERACT subset multi-class discrete
INTERACT INTERACT searching multi-class discrete
JMeasure JM weighting multi-class discrete
KLDivergence KLD weighting multi-class discrete
MatthewsCorrelationCoefficient MCC, PHI weighting multi-class discrete
Expand All @@ -78,25 +79,25 @@ Feature List
Specificity SP weighting multi-class discrete
SymmetricalUncertainty SU weighting multi-class discrete
BetweenWithinClassesSumOfSquare BSS_WSS weighting multi-class continuous
CFS_c CFS_c subset multi-class continuous
CFS_c CFS_c searching multi-class continuous
FTest FT weighting multi-class continuous
KS_CCBF KS_CCBF subset multi-class continuous
KS_CCBF KS_CCBF searching multi-class continuous
KSTest KST weighting two-class continuous
PMetric PM weighting two-class continuous
Relief_c Relief_c weighting two-class continuous
ReliefF_c ReliefF_c weighting multi-class continuous
TScore TS weighting two-class continuous
WilcoxonRankSum WRS weighting two-class continuous
LasVegasFilter LVF subset multi-class discrete, continuous, mixed
LasVegasIncremental LVI subset multi-class discrete, continuous, mixed
LasVegasFilter LVF searching multi-class discrete, continuous, mixed
LasVegasIncremental LVI searching multi-class discrete, continuous, mixed
Random Rand weighting multi-class discrete, continuous, mixed
RandomSubset RandS subset multi-class discrete, continuous, mixed
RandomSubset RandS searching multi-class discrete, continuous, mixed

**note for feature selection interface:**
there are two types of filter methods, i.e., feature weighting algorithms and feature subset selection algorithms
there are two types of filter algorithms: filter\_by\_feature\_weighting and filter\_by\_feature\_searching

- for weighting type: use either **select\_feature\_by\_score!** or **select\_feature\_by\_rank!**
- for subset type: use **select\_feature!**
- for former: use either **select\_feature\_by\_score!** or **select\_feature\_by\_rank!**
- for latter: use **select\_feature!**

**3. feature selection approaches**

Expand Down Expand Up @@ -205,7 +206,7 @@ Usage
# an ensemble of 40 feature selectors with 90% data by random sampling
re = FSelector::EnsembleSingle.new(r, 40, 0.90, :random_sampling)

# read SPECT data set (under the test/ directory)
# read SPECT data set (under the test/ directory)
re.data_from_csv('test/SPECT_train.csv')

# number of features before feature selection
Expand All @@ -225,7 +226,7 @@ Usage
# creating an ensemble of feature selectors by using
# two feature selection algorithms: InformationGain (IG) and Relief_d.
# note: can be 2+ algorithms, as long as they are of the same type,
# either feature weighting or feature subset selection algorithms
# either filter_by_feature_weighting or filter_by_feature_searching

# test for the type of feature weighting algorithms
r1 = FSelector::IG.new
Expand Down
2 changes: 1 addition & 1 deletion doc/Array.html
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ <h3>Returns:</h3>
</div>

<div id="footer">
Generated on Thu May 31 14:31:38 2012 by
Generated on Mon Nov 5 11:19:44 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Consistency.html
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ <h3>Returns:</h3>
</div>

<div id="footer">
Generated on Thu May 31 14:31:39 2012 by
Generated on Mon Nov 5 11:19:44 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Discretizer.html
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ <h3>Parameters:</h3>
</div>

<div id="footer">
Generated on Thu May 31 14:31:39 2012 by
Generated on Mon Nov 5 11:19:44 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Entropy.html
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ <h3>Returns:</h3>
</div>

<div id="footer">
Generated on Thu May 31 14:31:39 2012 by
Generated on Mon Nov 5 11:19:44 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
4 changes: 2 additions & 2 deletions doc/FSelector.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h2>Constant Summary</h2>

</div>
</dt>
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.3.1</span><span class='tstring_end'>'</span></span></pre></dd>
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.4.0</span><span class='tstring_end'>'</span></span></pre></dd>

<dt id="Rand-constant" class="">Rand =
<div class="docstring">
Expand Down Expand Up @@ -673,7 +673,7 @@ <h2>Constant Summary</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:38 2012 by
Generated on Mon Nov 5 11:19:44 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
4 changes: 3 additions & 1 deletion doc/FSelector/Accuracy.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ <h2>Overview</h2><div class="docstring">
tp+fn+tn+fp A+B+C+D
</code></pre>

<p>ref: <a href="http://dl.acm.org/citation.cfm?id=944974">An extensive empirical study of feature selection metrics for text classification</a></p>


</div>
</div>
Expand Down Expand Up @@ -199,7 +201,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:40 2012 by
Generated on Mon Nov 5 11:19:45 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/AccuracyBalanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:41 2012 by
Generated on Mon Nov 5 11:19:47 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
8 changes: 4 additions & 4 deletions doc/FSelector/Base.html
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,7 @@ <h3>Returns:</h3>
<pre class="code"><span class="info file"># File 'lib/fselector/algo_base/base.rb', line 345</span>

<span class='kw'>def</span> <span class='id identifier rubyid_select_feature!'>select_feature!</span>
<span class='kw'>if</span> <span class='kw'>not</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_algo_type'>algo_type</span> <span class='op'>==</span> <span class='symbol'>:feature_subset_selection</span>
<span class='kw'>if</span> <span class='kw'>not</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_algo_type'>algo_type</span> <span class='op'>==</span> <span class='symbol'>:filter_by_feature_searching</span>
<span class='id identifier rubyid_abort'>abort</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='kw'>__FILE__</span><span class='rbrace'>}</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='kw'>__LINE__</span><span class='rbrace'>}</span><span class='tstring_content'>]: \n</span><span class='tstring_end'>&quot;</span></span><span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> select_feature! is the interface for the type of feature subset selection algorithms only. \n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> please consider select_featue_by_score! or select_feature_by_rank!, \n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
Expand Down Expand Up @@ -2000,7 +2000,7 @@ <h3>Parameters:</h3>
<pre class="code"><span class="info file"># File 'lib/fselector/algo_base/base.rb', line 413</span>

<span class='kw'>def</span> <span class='id identifier rubyid_select_feature_by_rank!'>select_feature_by_rank!</span><span class='lparen'>(</span><span class='id identifier rubyid_criterion'>criterion</span><span class='comma'>,</span> <span class='id identifier rubyid_my_ranks'>my_ranks</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='kw'>not</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_algo_type'>algo_type</span> <span class='op'>==</span> <span class='symbol'>:feature_weighting</span>
<span class='kw'>if</span> <span class='kw'>not</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_algo_type'>algo_type</span> <span class='op'>==</span> <span class='symbol'>:filter_by_feature_weighting</span>
<span class='id identifier rubyid_abort'>abort</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='kw'>__FILE__</span><span class='rbrace'>}</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='kw'>__LINE__</span><span class='rbrace'>}</span><span class='tstring_content'>]: \n</span><span class='tstring_end'>&quot;</span></span><span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> select_feature_by_rank! is the interface for the type of feature weighting algorithms only. \n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> please consider select_featue!, \n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
Expand Down Expand Up @@ -2120,7 +2120,7 @@ <h3>Parameters:</h3>
<pre class="code"><span class="info file"># File 'lib/fselector/algo_base/base.rb', line 379</span>

<span class='kw'>def</span> <span class='id identifier rubyid_select_feature_by_score!'>select_feature_by_score!</span><span class='lparen'>(</span><span class='id identifier rubyid_criterion'>criterion</span><span class='comma'>,</span> <span class='id identifier rubyid_my_scores'>my_scores</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='kw'>not</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_algo_type'>algo_type</span> <span class='op'>==</span> <span class='symbol'>:feature_weighting</span>
<span class='kw'>if</span> <span class='kw'>not</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_algo_type'>algo_type</span> <span class='op'>==</span> <span class='symbol'>:filter_by_feature_weighting</span>
<span class='id identifier rubyid_abort'>abort</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='kw'>__FILE__</span><span class='rbrace'>}</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='kw'>__LINE__</span><span class='rbrace'>}</span><span class='tstring_content'>]: \n</span><span class='tstring_end'>&quot;</span></span><span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> select_feature_by_score! is the interface for the type of feature weighting algorithms only. \n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> please consider select_featue!, \n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
Expand Down Expand Up @@ -2525,7 +2525,7 @@ <h3>Parameters:</h3>
</div>

<div id="footer">
Generated on Thu May 31 14:31:39 2012 by
Generated on Mon Nov 5 11:19:45 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/BaseCFS.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:39 2012 by
Generated on Mon Nov 5 11:19:45 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/BaseContinuous.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:41 2012 by
Generated on Mon Nov 5 11:19:46 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/BaseDiscrete.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:40 2012 by
Generated on Mon Nov 5 11:19:46 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/BaseEnsemble.html
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ <h3>Parameters:</h3>
</div>

<div id="footer">
Generated on Thu May 31 14:31:39 2012 by
Generated on Mon Nov 5 11:19:44 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/BaseRelief.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ <h3>Parameters:</h3>
</div>

<div id="footer">
Generated on Thu May 31 14:31:39 2012 by
Generated on Mon Nov 5 11:19:45 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/BaseReliefF.html
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ <h3>Parameters:</h3>
</div>

<div id="footer">
Generated on Thu May 31 14:31:40 2012 by
Generated on Mon Nov 5 11:19:45 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/BetweenWithinClassesSumOfSquare.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:40 2012 by
Generated on Mon Nov 5 11:19:45 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/BiNormalSeparation.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:42 2012 by
Generated on Mon Nov 5 11:19:47 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/CFS_c.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:40 2012 by
Generated on Mon Nov 5 11:19:45 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/CFS_d.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:39 2012 by
Generated on Mon Nov 5 11:19:45 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/ChiSquaredTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ <h3>Parameters:</h3>
</div>

<div id="footer">
Generated on Thu May 31 14:31:41 2012 by
Generated on Mon Nov 5 11:19:46 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/CorrelationCoefficient.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:42 2012 by
Generated on Mon Nov 5 11:19:47 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/DocumentFrequency.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Thu May 31 14:31:41 2012 by
Generated on Mon Nov 5 11:19:47 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/EnsembleMultiple.html
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ <h3>Parameters:</h3>
</div>

<div id="footer">
Generated on Thu May 31 14:31:39 2012 by
Generated on Mon Nov 5 11:19:44 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/FSelector/EnsembleSingle.html
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ <h3>Parameters:</h3>
</div>

<div id="footer">
Generated on Thu May 31 14:31:39 2012 by
Generated on Mon Nov 5 11:19:44 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.3).
</div>
Expand Down
Loading

0 comments on commit 32fc278

Please sign in to comment.