diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..5ee07b5
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2011-2012 Tiejun Cheng
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..58bd481
--- /dev/null
+++ b/README.md
@@ -0,0 +1,195 @@
+FSelector: a Ruby package for feature selection and ranking
+===========================================================
+
+**Git**: [https://github.com/need47/fselector](https://github.com/need47/fselector)
+**Author**: Tiejun Cheng
+**Email**: [need47@gmail.com](mailto:need47@gmail.com)
+**Copyright**: 2011-2012
+**License**: MIT License
+**Latest Version**: 0.1.0
+**Release Date**: March 1st 2012
+
+Synopsis
+--------
+
+FSelector is an open-access Ruby package that aims to integrate as many
+feature selection/ranking algorithms as possible. It enables the
+user to perform feature selection by either a single algorithm or by an
+ensemble of algorithms. Below is a summary of FSelector's features.
+
+Feature List
+------------
+
+**1. available algorithms**
+
+ algorithm alias feature type
+ -------------------------------------------------------
+ Accuracy Acc discrete
+ AccuracyBalanced Acc2 discrete
+ BiNormalSeparation BNS discrete
+ ChiSquaredTest CHI discrete
+ CorrelationCoefficient CC discrete
+ DocumentFrequency DF discrete
+ F1Measure F1 discrete
+ FishersExactTest FET discrete
+ GiniIndex GI discrete
+ GMean GM discrete
+ GSSCoefficient GSS discrete
+ InformationGain IG discrete
+ MatthewsCorrelationCoefficient MCC, PHI discrete
+ McNemarsTest MNT discrete
+ OddsRatio OR discrete
+ OddsRatioNumerator ORN discrete
+ PhiCoefficient Phi discrete
+ Power Power discrete
+ Precision Precision discrete
+ ProbabilityRatio PR discrete
+ Random Random discrete
+ Recall Recall discrete
+ Relief_d Relief_d discrete
+ ReliefF_d ReliefF_d discrete
+ Sensitivity SN, Recall discrete
+ Specificity SP discrete
+ PMetric PM continuous
+ Relief_c Relief_c continuous
+ ReliefF_c ReliefF_c continuous
+ TScore TS continuous
+
+**2. feature selection approaches**
+
+ - by a single algorithm
+ - by multiple algorithms in a tandem manner
+ - by multiple algorithms in a consensus manner
+
+**3. availabe normalization and discretization algorithms for continuous feature**
+
+ algorithm note
+ --------------------------------------------------------------------
+ log normalization by logarithmic transformation
+ min_max normalization by scaling into [min, max]
+ zscore normalization by converting into zscore
+ equal_width discretization by equal width among intervals
+ equal_frequency discretization by equal frequency among intervals
+ ChiMerge discretization by ChiMerge method
+
+**4. supported input/output file types**
+
+ - csv
+ - libsvm
+ - weka ARFF
+ - random (for test purpose)
+
+Installing
+----------
+
+To install FSelector, use the following command:
+
+ $ gem install fselector
+
+Usage
+-----
+
+**1. feature selection by a single algorithm**
+
+ require 'fselector'
+
+ # use InformationGain as a feature ranking algorithm
+ r1 = FSelector::InformationGain.new
+
+ # read from random data (or csv, libsvm, weka ARFF file)
+ # no. of samples: 100
+ # no. of classes: 2
+ # no. of features: 10
+ # no. of possible values for each feature: 3
+ # allow missing values: true
+ r1.data_from_random(100, 2, 10, 3, true)
+
+ # number of features before feature selection
+ puts "# features (before): "+ r1.get_features.size.to_s
+
+ # select the top-ranked features with scores >0.01
+ r1.select_data_by_score!('>0.01')
+
+ # number of features before feature selection
+ puts "# features (after): "+ r1.get_features.size.to_s
+
+ # you can also use multiple alogirithms in a tandem manner
+ # e.g. use the ChiSquaredTest with Yates' continuity correction
+ # initialize from r1's data
+ r2 = FSelector::ChiSquaredTest.new(:yates, r1.get_data)
+
+ # number of features before feature selection
+ puts "# features (before): "+ r2.get_features.size.to_s
+
+ # select the top-ranked 3 features
+ r2.select_data_by_rank!('<=3')
+
+ # number of features before feature selection
+ puts "# features (after): "+ r2.get_features.size.to_s
+
+ # save data to standard ouput as a weka ARFF file (sparse format)
+ # with selected features only
+ r2.data_to_weka(:stdout, :sparse)
+
+
+**2. feature selection by an ensemble of algorithms**
+
+ require 'fselector'
+
+ # use both Information and ChiSquaredTest
+ r1 = FSelector::InformationGain.new
+ r2 = FSelector::ChiSquaredTest.new
+
+ # ensemble ranker
+ re = FSelector::Ensemble.new(r1, r2)
+
+ # read random data
+ re.data_from_random(100, 2, 10, 3, true)
+
+ # number of features before feature selection
+ puts '# features before feature selection: ' + re.get_features.size.to_s
+
+ # based on the min feature rank among
+ # ensemble feature selection algorithms
+ re.ensemble_by_rank(re.method(:by_min))
+
+ # select the top-ranked 3 features
+ re.select_data_by_rank!('<=3')
+
+ # number of features before feature selection
+ puts '# features before feature selection: ' + re.get_features.size.to_s
+
+
+ **3. normalization and discretization before feature selection**
+
+ In addition to the algorithms designed for continous feature, one
+ can apply those deisgned for discrete feature after (optionally
+ normalization and) discretization
+
+ require 'fselector'
+
+ # for continuous feature
+ r1 = FSelector::BaseContinuous.new
+
+ # read the Iris data set (under the test/ directory)
+ r1.data_from_csv(File.expand_path(File.dirname(__FILE__))+'/iris.csv')
+
+ # normalization by log2 (optional)
+ # r1.normalize_log!(2)
+
+ # discretization by ChiMerge algorithm
+ # chi-squared value = 4.60 for a three-class problem at alpha=0.10
+ r1.discretize_chimerge!(4.60)
+
+ # apply Relief_d for discrete feature
+ # initialize with discretized data from r1
+ r2 = FSelector::ReliefF_d.new(r1.get_sample_size, 10, r1.get_data)
+
+ # print feature ranks
+ r2.print_feature_ranks
+
+Copyright
+---------
+FSelector © 2011-2012 by [Tiejun Cheng](mailto:need47@gmail.com).
+FSelector is licensed under the MIT license. Please see the {file:LICENSE} for
+more information.
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..549738c
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,22 @@
+#
+# make a ruby gem
+#
+
+task :default => :gem
+
+task :gem do
+ Gem::Builder.new(eval(File.read('fselector.gemspec'))).build
+end
+
+#
+# test example
+#
+require 'rake'
+require 'rake/testtask.rb'
+task :test do
+ Rake::TestTask.new do |t|
+ t.libs = ['lib']
+ t.test_files = FileList['test/test_*.rb']
+ t.verbose = true
+ end
+end
\ No newline at end of file
diff --git a/doc/Array.html b/doc/Array.html
new file mode 100644
index 0000000..755fb68
--- /dev/null
+++ b/doc/Array.html
@@ -0,0 +1,693 @@
+
+
+
+
+
+ Class: Array
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: Array
+
+
+
+
+
+
+
+ Inherits:
+
+ Object
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/util.rb
+
+
+
+
+
Overview
+
+
add functions to Array class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
Instance Method Details
+
+
+
+
+
+ - (Float ) ave
+
+
+
+ Also known as:
+ mean
+
+
+
+
+
+
+
+
+
+14
+15
+16
+
+
+ # File 'lib/fselector/util.rb', line 14
+
+def ave
+ self . sum / self . size
+end
+
+
+
+
+
+
+
+
+ - (Float ) sd
+
+
+
+
+
+
standard deviation
+
+
+
+
+
+
+
+
+
+
+32
+33
+34
+
+
+ # File 'lib/fselector/util.rb', line 32
+
+def sd
+ Math . sqrt ( self . var )
+end
+
+
+
+
+
+
+
+
+ - (Float ) sum
+
+
+
+
+
+
+
+
+
+
+7
+8
+9
+
+
+ # File 'lib/fselector/util.rb', line 7
+
+def sum
+ self . inject ( 0.0 ) { | s , i | s + i }
+end
+
+
+
+
+
+
+
+
+ - (Object ) to_scale (min = 0.0, max = 1.0)
+
+
+
+
+
+
scale to [min, max]
+
+
+
+
+
+
+
+
+
+
+
+
+
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+
+
+ # File 'lib/fselector/util.rb', line 38
+
+def to_scale ( min = 0.0 , max = 1.0 )
+ if ( min >= max )
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " min must be smaller than max "
+ end
+
+ old_min = self . min
+ old_max = self . max
+
+ self . collect do | v |
+ if old_min == old_max
+ max
+ else
+ min + ( v - old_min ) * ( max - min ) / ( old_max - old_min )
+ end
+ end
+end
+
+
+
+
+
+
+
+
+ - (Array <Symbol> ) to_sym
+
+
+
+
+
+
+
+
+
+
+70
+71
+72
+
+
+ # File 'lib/fselector/util.rb', line 70
+
+def to_sym
+ self . collect { | x | x . to_sym }
+end
+
+
+
+
+
+
+
+
+ - (Object ) to_zscore
+
+
+
+
+
+
+
+
+
+
+
+
+
+60
+61
+62
+63
+64
+65
+
+
+ # File 'lib/fselector/util.rb', line 60
+
+def to_zscore
+ ave = self . ave
+ sd = self . sd
+
+ return self . collect { | v | ( v - ave ) / sd }
+end
+
+
+
+
+
+
+
+
+ - (Float ) var
+
+
+
+
+
+
+
+
+
+
+22
+23
+24
+25
+26
+27
+
+
+ # File 'lib/fselector/util.rb', line 22
+
+def var
+ u = self . ave
+ v2 = self . inject ( 0.0 ) { | v , i | v + ( i - u ) * ( i - u ) }
+
+ v2 / ( self . size - 1 )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/Discretilizer.html b/doc/Discretilizer.html
new file mode 100644
index 0000000..344efbd
--- /dev/null
+++ b/doc/Discretilizer.html
@@ -0,0 +1,670 @@
+
+
+
+
+
+ Module: Discretilizer
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module: Discretilizer
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Included in:
+ FSelector::BaseContinuous
+
+
+
+ Defined in:
+ lib/fselector/algo_continuous/discretizer.rb
+
+
+
+
+
Overview
+
+
discretilize continous feature
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
Instance Method Details
+
+
+
+
+
+ - (Object ) discretize_chimerge! (chisq)
+
+
+
+
+
+
+
+
Note:
+
data structure will be altered
+
+
+
+
discretize by ChiMerge algorithm
+
+
ref: ChiMerge: Discretization of Numberic Attributes
+
+
chi-squared values and associated p values can be looked up at
+Wikipedia
+degrees of freedom: one less than number of classes
+
+
chi-squared values vs p values
+degree_of_freedom p<0.10 p<0.05 p<0.01 p<0.001
+ 1 2.71 3.84 6.64 10.83
+ 2 4.60 5.99 9.21 13.82
+ 3 6.35 7.82 11.34 16.27
+
+
+
+
+
+
+
+
+
+
+
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+
+
+ # File 'lib/fselector/algo_continuous/discretizer.rb', line 88
+
+def discretize_chimerge! ( chisq )
+ hzero = { }
+ each_class do | k |
+ hzero [ k ] = 0.0
+ end
+
+ f2bs = { }
+ each_feature do | f |
+ bs , cs , qs = [ ] , [ ] , [ ]
+ fvs = get_feature_values ( f ) . sort . uniq
+ fvs . each_with_index do | v , i |
+ if i + 1 < fvs . size
+ bs << ( v + fvs [ i + 1 ] ) / 2.0
+ cs << hzero . dup
+ qs << 0.0
+ end
+ end
+ bs << fvs . max + 1.0 cs << hzero . dup
+
+ each_sample do | k , s |
+ next if not s . has_key? f
+ bs . each_with_index do | b , i |
+ if s [ f ] < b
+ cs [ i ] [ k ] += 1.0
+ break
+ end
+ end
+ end
+
+ cs . each_with_index do | c , i |
+ if i + 1 < cs . size
+ qs [ i ] = calc_chisq ( c , cs [ i + 1 ] )
+ end
+ end
+
+ until qs . empty? or qs . min > chisq
+ qs . each_with_index do | q , i |
+ if q == qs . min
+
+ cm = { }
+ each_class do | k |
+ cm [ k ] = cs [ i ] [ k ] + cs [ i + 1 ] [ k ]
+ end
+
+ if i - 1 >= 0
+ qs [ i - 1 ] = calc_chisq ( cs [ i - 1 ] , cm )
+ end
+ if i + 1 < qs . size
+ qs [ i + 1 ] = calc_chisq ( cm , cs [ i + 2 ] )
+ end
+
+ bs = bs [ 0 ... i ] + bs [ i + 1 ... bs . size ]
+ cs = cs [ 0 ... i ] + [ cm ] + cs [ i + 2 ... cs . size ]
+ qs = qs [ 0 ... i ] + qs [ i + 1 ... qs . size ]
+
+
+ break
+
+ end
+ end
+ end
+
+ f2bs [ f ] = bs
+ end
+
+ each_sample do | k , s |
+ s . keys . each do | f |
+ s [ f ] = get_index ( s [ f ] , f2bs [ f ] )
+ end
+ end
+
+end
+
+
+
+
+
+
+
+
+ - (Object ) discretize_equal_frequency! (n_interval)
+
+
+
+
+
+
+
+
Note:
+
data structure will be altered
+
+
+
+
discretize by equal-frequency intervals
+
+
+
+
+
+
+
+
+
+
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+
+
+ # File 'lib/fselector/algo_continuous/discretizer.rb', line 42
+
+def discretize_equal_frequency! ( n_interval )
+ n_interval = 1 if n_interval < 1
+ f2bs = Hash . new { | h , k | h [ k ] = [ ] }
+ each_feature do | f |
+ fvs = get_feature_values ( f ) . sort
+ ns = ( fvs . size . to_f / n_interval ) . round
+ fvs . each_with_index do | v , i |
+ if ( i + 1 ) % ns == 0 and ( i + 1 ) < fvs . size
+ f2bs [ f ] << ( v + fvs [ i + 1 ] ) / 2.0
+ end
+ end
+ f2bs [ f ] << fvs . max + 1.0 end
+
+ each_sample do | k , s |
+ s . keys . each do | f |
+ s [ f ] = get_index ( s [ f ] , f2bs [ f ] )
+ end
+ end
+
+end
+
+
+
+
+
+
+
+
+ - (Object ) discretize_equal_width! (n_interval)
+
+
+
+
+
+
+
+
Note:
+
data structure will be altered
+
+
+
+
discretize by equal-width intervals
+
+
+
+
+
+
+
+
+
+
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
+
+ # File 'lib/fselector/algo_continuous/discretizer.rb', line 10
+
+def discretize_equal_width! ( n_interval )
+ n_interval = 1 if n_interval < 1
+ f2min_max = { }
+ each_feature do | f |
+ fvs = get_feature_values ( f )
+ f2min_max [ f ] = [ fvs . min , fvs . max ]
+ end
+
+ each_sample do | k , s |
+ s . keys . each do | f |
+ min_v , max_v = f2min_max [ f ]
+ if min_v == max_v
+ wn = 0
+ else
+ wn = ( ( s [ f ] - min_v ) * n_interval . to_f / ( max_v - min_v ) ) . to_i
+ end
+
+ s [ f ] = ( wn < n_interval ) ? wn : n_interval - 1
+ end
+ end
+
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank.html b/doc/FRank.html
new file mode 100644
index 0000000..cd6221a
--- /dev/null
+++ b/doc/FRank.html
@@ -0,0 +1,504 @@
+
+
+
+
+
+ Module: FRank
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module: FRank
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/base.rb,
+ lib/frank/ensemble.rb, lib/frank/algo_discrete/GMean.rb, lib/frank/algo_discrete/Power.rb, lib/frank/algo_discrete/Random.rb, lib/frank/algo_discrete/Recall.rb, lib/frank/algo_mixed/base_mixed.rb, lib/frank/algo_discrete/Accuracy.rb, lib/frank/algo_discrete/Relief_d.rb, lib/frank/algo_continuous/TScore.rb, lib/frank/algo_discrete/F1Measure.rb, lib/frank/algo_discrete/OddsRatio.rb, lib/frank/algo_continuous/PMetric.rb, lib/frank/algo_discrete/GiniIndex.rb, lib/frank/algo_discrete/Precision.rb, lib/frank/algo_discrete/ReliefF_d.rb, lib/frank/algo_continuous/Relief_c.rb, lib/frank/algo_continuous/ReliefF_c.rb, lib/frank/algo_discrete/Sensitivity.rb, lib/frank/algo_discrete/Specificity.rb, lib/frank/algo_discrete/McNemarsTest.rb, lib/frank/algo_discrete/base_discrete.rb, lib/frank/algo_discrete/ChiSquaredTest.rb, lib/frank/algo_discrete/PhiCoefficient.rb, lib/frank/algo_discrete/GSSCoefficient.rb, lib/frank/algo_discrete/InformationGain.rb, lib/frank/algo_discrete/AccuracyBalanced.rb, lib/frank/algo_discrete/ProbabilityRatio.rb, lib/frank/algo_discrete/FishersExactTest.rb, lib/frank/algo_discrete/DocumentFrequency.rb, lib/frank/algo_discrete/InformationGain_d.rb, lib/frank/algo_discrete/MutualInformation.rb, lib/frank/algo_continuous/base_continuous.rb, lib/frank/algo_discrete/OddsRatioNumerator.rb, lib/frank/algo_discrete/BiNormalSeparation.rb, lib/frank/algo_discrete/CorrelationCoefficient.rb, lib/frank/algo_discrete/MatthewsCorrelationCoefficient.rb
+
+
+
+
+
+
Overview
+
+
FRank: a ruby package for feature selection and ranking
+
+
+
+
+
+
+
+
Defined Under Namespace
+
+
+
+
+
+ Classes: Accuracy , AccuracyBalanced , Base , BaseContinuous , BaseDiscrete , BaseMixed , BiNormalSeparation , ChiSquaredTest , CorrelationCoefficient , DocumentFrequency , Ensemble , F1Measure , FishersExactTest , GMean , GSSCoefficient , GiniIndex , InformationGain , InformationGain_d , MatthewsCorrelationCoefficient , McNemarsTest , MutualInformation , OddsRatio , OddsRatioNumerator , PMetric , Power , Precision , ProbabilityRatio , Random , ReliefF_c , ReliefF_d , Relief_c , Relief_d , Sensitivity , Specificity , TScore
+
+
+
+
+
Constant Summary
+
+
+
+ GM =
+
+
+
shortcut so that you can use FRank::GM instead of FRank::GMean
+
+
+
+
+
+
+
+
+
+ GMean
+
+ Recall =
+
+
+
Recall, also known as Sensitivity.
+shortcut so that you can use FRank::Recall
+
+
+
+
+
+
+
+
+
+ Sensitivity
+
+ Acc =
+
+
+
shortcut so that you can use FRank::Acc instead of FRank::Accuracy
+
+
+
+
+
+
+
+
+
+ Accuracy
+
+ TS =
+
+
+
shortcut so that you can use FRank::TS instead of FRank::TScore
+
+
+
+
+
+
+
+
+
+ TScore
+
+ F1 =
+
+
+
shortcut so that you can use FRank::F1 instead of FRank::F1Measure
+
+
+
+
+
+
+
+
+
+ F1Measure
+
+ Odd =
+
+
+
shortcut so that you can use FRank::Odd instead of FRank::OddsRatio
+
+
+
+
+
+
+
+
+
+ OddsRatio
+
+ PM =
+
+
+
shortcut so that you can use FRank::PM instead of FRank::PMetric
+
+
+
+
+
+
+
+
+
+ PMetric
+
+ GI =
+
+
+
shortcut so that you can use FRank::GI instead of FRank::GiniIndex
+
+
+
+
+
+
+
+
+
+ GiniIndex
+
+ SN =
+
+
+
shortcut so that you can use FRank::SN instead of FRank::Sensitivity
+
+
+
+
+
+
+
+
+
+ Sensitivity
+
+ SP =
+
+
+
shortcut so that you can use FRank::SP instead of FRank::Specificity
+
+
+
+
+
+
+
+
+
+ Specificity
+
+ MNT =
+
+
+
shortcut so that you can use FRank::MNT instead of FRank::McNemarsTest
+
+
+
+
+
+
+
+
+
+ McNemarsTest
+
+ CHI =
+
+
+
shortcut so that you can use FRank::CHI instead of FRank::ChiSquaredTest
+
+
+
+
+
+
+
+
+
+ ChiSquaredTest
+
+ PHI =
+
+
+
Phi coefficient , also known as Matthews correlation coefficient.
+shortcut so that you can use FRank::PHI
+
+
+
+
+
+
+
+
+
+ MatthewsCorrelationCoefficient
+
+ GSS =
+
+
+
shortcut so that you can use FRank::GSS instead of FRank::GSSCoefficient
+
+
+
+
+
+
+
+
+
+ GSSCoefficient
+
+ IG =
+
+
+
shortcut so that you can use FRank::IG instead of FRank::InformationGain
+
+
+
+
+
+
+
+
+
+ InformationGain
+
+ Acc2 =
+
+
+
shortcut so that you can use FRank::Acc2 instead of FRank::AccuracyBalanced
+
+
+
+
+
+
+
+
+
+ AccuracyBalanced
+
+ PR =
+
+
+
shortcut so that you can use FRank::PR instead of FRank::ProbabilityRatio
+
+
+
+
+
+
+
+
+
+ ProbabilityRatio
+
+ FET =
+
+
+
shortcut so that you can use FRank::FET instead of FRank::FishersExactTest
+
+
+
+
+
+
+
+
+
+ FishersExactTest
+
+ DF =
+
+
+
shortcut so that you can use FRank::DF instead of FRank::DocumentFrequency
+
+
+
+
+
+
+
+
+
+ DocumentFrequency
+
+ IG_d =
+
+
+
shortcut so that you can use FRank::IG_d instead of FRank::InformationGain_d
+
+
+
+
+
+
+
+
+
+ InformationGain_d
+
+ MI =
+
+
+
shortcut so that you can use FRank::MI instead of FRank::MutualInformation
+
+
+
+
+
+
+
+
+
+ MutualInformation
+
+ OddN =
+
+
+
shortcut so that you can use FRank::OddN instead of FRank::OddsRatioNumerator
+
+
+
+
+
+
+
+
+
+ OddsRatioNumerator
+
+ BNS =
+
+
+
shortcut so that you can use FRank::BNS instead of FRank::BiNormalSeparation
+
+
+
+
+
+
+
+
+
+ BiNormalSeparation
+
+ CC =
+
+
+
shortcut so that you can use FRank::CC instead of FRank::CorrelationCoefficient
+
+
+
+
+
+
+
+
+
+ CorrelationCoefficient
+
+ MCC =
+
+
+
shortcut so that you can use FRank::MCC instead of FRank::MatthewsCorrelationCoefficient
+
+
+
+
+
+
+
+
+
+ MatthewsCorrelationCoefficient
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/Accuracy.html b/doc/FRank/Accuracy.html
new file mode 100644
index 0000000..99e38cf
--- /dev/null
+++ b/doc/FRank/Accuracy.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+ Class: FRank::Accuracy
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::Accuracy
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/Accuracy.rb
+
+
+
+
+
Overview
+
+
Accuracy (Acc)
+
+
tp+tn A+D
+Acc = ------------- = ---------
+ tp+fn+tn+fp A+B+C+D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/AccuracyBalanced.html b/doc/FRank/AccuracyBalanced.html
new file mode 100644
index 0000000..363bf80
--- /dev/null
+++ b/doc/FRank/AccuracyBalanced.html
@@ -0,0 +1,169 @@
+
+
+
+
+
+ Class: FRank::AccuracyBalanced
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::AccuracyBalanced
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/AccuracyBalanced.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/Base.html b/doc/FRank/Base.html
new file mode 100644
index 0000000..661f7bb
--- /dev/null
+++ b/doc/FRank/Base.html
@@ -0,0 +1,1891 @@
+
+
+
+
+
+ Class: FRank::Base
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::Base
+
+
+
+
+
+
+
+ Inherits:
+
+ Object
+
+
+ Object
+
+ FRank::Base
+
+
+ show all
+
+
+
+
+
+
+
+
+ Includes:
+ FileIO
+
+
+
+
+
+ Defined in:
+ lib/frank/base.rb
+
+
+
+
+
Overview
+
+
base ranking algorithm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Base ) initialize (data = nil)
+
+
+
+
+
+
initialize from an existing data structure
+
+
+
+
+
+
+
+
+
+
+
+
+
+13
+14
+15
+16
+
+
+ # File 'lib/frank/base.rb', line 13
+
+def initialize ( data = nil )
+ @data = data
+ @opts = { } end
+
+
+
+
+
+
+
+
+
+
Instance Method Details
+
+
+
+
+
+ - (Object ) each_class
+
+
+
+
+
+
iterator for each class
+
+
e . g .
+self . each_class do | k |
+ puts k
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+27
+28
+29
+30
+31
+32
+33
+34
+
+
+ # File 'lib/frank/base.rb', line 27
+
+def each_class
+ if not block_given?
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " block must be given! "
+ else
+ get_classes . each { | k | yield k }
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) each_feature
+
+
+
+
+
+
iterator for each feature
+
+
e . g .
+self . each_feature do | f |
+ puts f
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+45
+46
+47
+48
+49
+50
+51
+52
+
+
+ # File 'lib/frank/base.rb', line 45
+
+def each_feature
+ if not block_given?
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " block must be given! "
+ else
+ get_features . each { | f | yield f }
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) each_sample
+
+
+
+
+
+
iterator for each sample with class label
+
+
e . g .
+self . each_sample do | k , s |
+ print k
+ s . each { | f , v | ' ' + v }
+ puts
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
+ # File 'lib/frank/base.rb', line 65
+
+def each_sample
+ if not block_given?
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " block must be given! "
+ else
+ get_data . each do | k , samples |
+ samples . each { | s | yield k , s }
+ end
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_classes
+
+
+
+
+
+
+
+
+
+
+
+
+
+78
+79
+80
+
+
+ # File 'lib/frank/base.rb', line 78
+
+def get_classes
+ @classes ||= @data . keys
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_data
+
+
+
+
+
+
+
+
+
+
+
+
+
+130
+131
+132
+
+
+ # File 'lib/frank/base.rb', line 130
+
+def get_data
+ @data
+end
+
+
+
+
+
+
+
+
+ - (Hash ) get_feature_ranks
+
+
+
+
+
+
get the ranked features based on their best scores
+
+
+
+
+
+
+
+
+
+
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+
+
+ # File 'lib/frank/base.rb', line 236
+
+def get_feature_ranks
+ return @ranks if @ranks
+ scores = get_feature_scores
+
+ @ranks = { }
+ sorted_features = scores . keys . sort do | x , y |
+ scores [ y ] [ :BEST ] <=> scores [ x ] [ :BEST ]
+ end
+
+ sorted_features . each_with_index do | sf , si |
+ @ranks [ sf ] = si + 1
+ end
+
+ @ranks
+end
+
+
+
+
+
+
+
+
+ - (Hash ) get_feature_scores
+
+
+
+
+
+
get scores of all features for all classes
+
+
+
+
+
+
+
+
+
+
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+
+
+ # File 'lib/frank/base.rb', line 206
+
+def get_feature_scores
+ return @scores if @scores
+ each_feature do | f |
+ calc_contribution ( f )
+ end
+
+ @scores . each do | f , ks |
+ @scores [ f ] [ :BEST ] = ks . values . max
+ end
+
+ @scores
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_feature_values (f)
+
+
+
+
+
+
get feature values
+
+
+
+
+
+
+
+
+
+
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+
+
+ # File 'lib/frank/base.rb', line 105
+
+def get_feature_values ( f )
+ @fvs ||= { }
+
+ if not @fvs . has_key? f
+ @fvs [ f ] = [ ]
+ each_sample do | k , s |
+ @fvs [ f ] << s [ f ] if s . has_key? f
+ end
+ end
+
+ @fvs [ f ]
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_features
+
+
+
+
+
+
get unique features
+
+
+
+
+
+
+
+
+
+
+
+
+
+95
+96
+97
+
+
+ # File 'lib/frank/base.rb', line 95
+
+def get_features
+ @features ||= @data . map { | x | x [ 1 ] . map { | y | y . keys } } . flatten . uniq
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_opt (key)
+
+
+
+
+
+
get non-data information
+
+
+
+
+
+
+
+
+
+
+
+
+
+149
+150
+151
+
+
+ # File 'lib/frank/base.rb', line 149
+
+def get_opt ( key )
+ @opts . has_key? ( key ) ? @opts [ key ] : nil
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_sample_size
+
+
+
+
+
+
number of samples
+
+
+
+
+
+
+
+
+
+
+
+
+
+161
+162
+163
+
+
+ # File 'lib/frank/base.rb', line 161
+
+def get_sample_size
+ @sz ||= get_data . values . flatten . size
+end
+
+
+
+
+
+
+
+
+ - (Object ) print_feature_ranks
+
+
+
+
+
+
print feature ranks
+
+
+
+
+
+
+
+
+
+
+
+
+
+191
+192
+193
+194
+195
+196
+197
+
+
+ # File 'lib/frank/base.rb', line 191
+
+def print_feature_ranks
+ ranks = get_feature_ranks
+
+ ranks . each do | f , r |
+ puts " #{ f } => #{ r } "
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) print_feature_scores (feat = nil, kclass = nil)
+
+
+
+
+
+
print feature scores
+
+
+
+
+
+
+
+
+
+
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+
+
+ # File 'lib/frank/base.rb', line 171
+
+def print_feature_scores ( feat = nil , kclass = nil )
+ scores = get_feature_scores
+
+ scores . each do | f , ks |
+ next if feat and feat != f
+
+ print " #{ f } => "
+ ks . each do | k , s |
+ if kclass
+ print " #{ k } -> #{ s } " if k == kclass
+ else
+ print " #{ k } -> #{ s } "
+ end
+ end
+ puts
+ end
+end
+
+
+
+
+
+
+
+
+ - (Hash ) select_data_by_rank! (criterion, my_ranks = nil)
+
+
+
+
+
+
+
+
Note:
+
data structure will be altered
+
+
+
+
reconstruct data by rank
+
+
+
+
+
+
+
+
+
+
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+
+
+ # File 'lib/frank/base.rb', line 298
+
+def select_data_by_rank! ( criterion , my_ranks = nil )
+ ranks = my_ranks || get_feature_ranks
+
+ my_data = { }
+
+ each_sample do | k , s |
+ my_data [ k ] ||= [ ]
+ my_s = { }
+
+ s . each do | f , v |
+ my_s [ f ] = v if eval ( " #{ ranks [ f ] } #{ criterion } " )
+ end
+
+ my_data [ k ] << my_s if not my_s . empty?
+ end
+
+ set_data ( my_data )
+end
+
+
+
+
+
+
+
+
+ - (Hash ) select_data_by_score! (criterion, my_scores = nil)
+
+
+
+
+
+
+
+
Note:
+
data structure will be altered
+
+
+
+
reconstruct data with feature scores satisfying cutoff
+
+
+
+
+
+
+
+
+
+
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+
+
+ # File 'lib/frank/base.rb', line 267
+
+def select_data_by_score! ( criterion , my_scores = nil )
+ scores = my_scores || get_feature_scores
+
+ my_data = { }
+
+ each_sample do | k , s |
+ my_data [ k ] ||= [ ]
+ my_s = { }
+
+ s . each do | f , v |
+ my_s [ f ] = v if eval ( " #{ scores [ f ] [ :BEST ] } #{ criterion } " )
+ end
+
+ my_data [ k ] << my_s if not my_s . empty?
+ end
+
+ set_data ( my_data )
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_classes (classes)
+
+
+
+
+
+
+
+
+
+
+
+
+
+84
+85
+86
+87
+88
+89
+90
+91
+
+
+ # File 'lib/frank/base.rb', line 84
+
+def set_classes ( classes )
+ if classes and classes . class == Array
+ @classes = classes
+ else
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " classes must be a Array object! "
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_data (data)
+
+
+
+
+
+
+
+
+
+
+
+
+
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+
+
+ # File 'lib/frank/base.rb', line 135
+
+def set_data ( data )
+ if data and data . class == Hash
+ @data = data
+ @classes , @features , @fvs = nil , nil , nil
+ @scores , @ranks , @sz = nil , nil , nil
+ else
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " data must be a Hash object! "
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_feature_score (f, k, s)
+
+
+
+
+
+
set feature (f) score (f) for class (k)
+
+
+
+
+
+
+
+
+
+
+
+
+
+225
+226
+227
+228
+229
+
+
+ # File 'lib/frank/base.rb', line 225
+
+def set_feature_score ( f , k , s )
+ @scores ||= { }
+ @scores [ f ] ||= { }
+ @scores [ f ] [ k ] = s
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_features (features)
+
+
+
+
+
+
+
+
+
+
+
+
+
+119
+120
+121
+122
+123
+124
+125
+126
+
+
+ # File 'lib/frank/base.rb', line 119
+
+def set_features ( features )
+ if features and features . class == Array
+ @features = features
+ else
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " features must be a Array object! "
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_opt (key, value)
+
+
+
+
+
+
set non-data information as a key-value pair
+
+
+
+
+
+
+
+
+
+
+
+
+
+155
+156
+157
+
+
+ # File 'lib/frank/base.rb', line 155
+
+def set_opt ( key , value )
+ @opts [ key ] = value
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/BaseContinuous.html b/doc/FRank/BaseContinuous.html
new file mode 100644
index 0000000..0710019
--- /dev/null
+++ b/doc/FRank/BaseContinuous.html
@@ -0,0 +1,250 @@
+
+
+
+
+
+ Class: FRank::BaseContinuous
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::BaseContinuous
+
+
+
+
+
+
+
+ Inherits:
+
+ Base
+
+
+ Object
+
+ Base
+
+ FRank::BaseContinuous
+
+
+ show all
+
+
+
+
+
+
+
+
+ Includes:
+ Discretilizer , Normalizer
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_continuous/base_continuous.rb
+
+
+
+
+
Overview
+
+
base ranking algorithm for handling continous feature
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#discretize_chimerge! , #discretize_equal_frequency! , #discretize_equal_width!
+
+
+
+
+
+
+
+
+
Methods included from Normalizer
+
#normalize_log! , #normalize_min_max! , #normalize_zscore!
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (BaseContinuous ) initialize (data = nil)
+
+
+
+
+
+
initialize from an existing data structure
+
+
+
+
+
+
+
+
+
+
+
+
+
+17
+18
+19
+
+
+ # File 'lib/frank/algo_continuous/base_continuous.rb', line 17
+
+def initialize ( data = nil )
+ super ( data )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/BaseDiscrete.html b/doc/FRank/BaseDiscrete.html
new file mode 100644
index 0000000..7a0032a
--- /dev/null
+++ b/doc/FRank/BaseDiscrete.html
@@ -0,0 +1,246 @@
+
+
+
+
+
+ Class: FRank::BaseDiscrete
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::BaseDiscrete
+
+
+
+
+
+
+
+ Inherits:
+
+ Base
+
+
+ Object
+
+ Base
+
+ FRank::BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/base_discrete.rb
+
+
+
+
+
Overview
+
+
base ranking alogrithm for handling discrete feature
+
+
2 x 2 contingency table
+
+ c c'
+ ---------
+ f | A | B | A+B
+ |---|---|
+ f' | C | D | C+D
+ ---------
+ A+C B+D N = A+B+C+D
+
+ P(f) = (A+B)/N
+ P(f') = (C+D)/N
+ P(c) = (A+C)/N
+ P(c') = (B+D)/N
+ P(f,c) = A/N
+ P(f,c') = B/N
+ P(f',c) = C/N
+ P(f',c') = D/N
+
+
+
+
+
+
+
+
+
+
Direct Known Subclasses
+
Accuracy , AccuracyBalanced , BiNormalSeparation , ChiSquaredTest , CorrelationCoefficient , DocumentFrequency , F1Measure , FishersExactTest , GMean , GSSCoefficient , GiniIndex , InformationGain , InformationGain_d , MatthewsCorrelationCoefficient , McNemarsTest , MutualInformation , OddsRatio , OddsRatioNumerator , Power , Precision , ProbabilityRatio , Random , ReliefF_d , Relief_d , Sensitivity , Specificity
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (BaseDiscrete ) initialize (data = nil)
+
+
+
+
+
+
initialize from an existing data structure
+
+
+
+
+
+
+
+
+
+
+
+
+
+29
+30
+31
+
+
+ # File 'lib/frank/algo_discrete/base_discrete.rb', line 29
+
+def initialize ( data = nil )
+ super ( data )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/BaseMixed.html b/doc/FRank/BaseMixed.html
new file mode 100644
index 0000000..b12c1ed
--- /dev/null
+++ b/doc/FRank/BaseMixed.html
@@ -0,0 +1,222 @@
+
+
+
+
+
+ Class: FRank::BaseMixed
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::BaseMixed
+
+
+
+
+
+
+
+ Inherits:
+
+ Base
+
+
+ Object
+
+ Base
+
+ FRank::BaseMixed
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_mixed/base_mixed.rb
+
+
+
+
+
Overview
+
+
base class for handling feature of mixed data
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (BaseMixed ) initialize (data = nil)
+
+
+
+
+
+
initialize from an existing data structure
+
+
+
+
+
+
+
+
+
+
+
+
+
+10
+11
+12
+
+
+ # File 'lib/frank/algo_mixed/base_mixed.rb', line 10
+
+def initialize ( data = nil )
+ super ( data )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/BiNormalSeparation.html b/doc/FRank/BiNormalSeparation.html
new file mode 100644
index 0000000..66d06eb
--- /dev/null
+++ b/doc/FRank/BiNormalSeparation.html
@@ -0,0 +1,191 @@
+
+
+
+
+
+ Class: FRank::BiNormalSeparation
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::BiNormalSeparation
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+ Includes:
+ Rubystats
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/BiNormalSeparation.rb
+
+
+
+
+
Overview
+
+
+
+
+
Constant Summary
+
+
+
+
+
Constant Summary
+
+
Constants included
+ from Rubystats
+
Rubystats::MAX_VALUE , Rubystats::SQRT2 , Rubystats::SQRT2PI , Rubystats::TWO_PI
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/ChiSquaredTest.html b/doc/FRank/ChiSquaredTest.html
new file mode 100644
index 0000000..3180c84
--- /dev/null
+++ b/doc/FRank/ChiSquaredTest.html
@@ -0,0 +1,269 @@
+
+
+
+
+
+ Class: FRank::ChiSquaredTest
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::ChiSquaredTest
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/ChiSquaredTest.rb
+
+
+
+
+
Overview
+
+
Chi-Squared test (CHI)
+
+
N * ( P(f,c) * P(f',c') - P(f,c') * P(f',c) )^2
+ CHI(f,c) = -------------------------------------------------
+ P(f) * P(f') * P(c) * P(c')
+
+ N * (A*D - B*C)^2
+ = -------------------------------
+ (A+B) * (C+D) * (A+C) * (B+D)
+
+
+
suitable for large samples and
+none of the values of (A, B, C, D) < 5
+
+
ref: Wikipedia
+ and A Comparative Study on Feature Selection Methods for
+ Drug Discovery
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (ChiSquaredTest ) initialize (correction = nil, data = nil)
+
+
+
+
+
+
+
+
+
+
+30
+31
+32
+33
+
+
+ # File 'lib/frank/algo_discrete/ChiSquaredTest.rb', line 30
+
+def initialize ( correction = nil , data = nil )
+ super ( data )
+ @correction = ( correction == :yates ) ? true : false
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/CorrelationCoefficient.html b/doc/FRank/CorrelationCoefficient.html
new file mode 100644
index 0000000..c4fbd7b
--- /dev/null
+++ b/doc/FRank/CorrelationCoefficient.html
@@ -0,0 +1,172 @@
+
+
+
+
+
+ Class: FRank::CorrelationCoefficient
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::CorrelationCoefficient
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/CorrelationCoefficient.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/DocumentFrequency.html b/doc/FRank/DocumentFrequency.html
new file mode 100644
index 0000000..8b17f5f
--- /dev/null
+++ b/doc/FRank/DocumentFrequency.html
@@ -0,0 +1,169 @@
+
+
+
+
+
+ Class: FRank::DocumentFrequency
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::DocumentFrequency
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/DocumentFrequency.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/Ensemble.html b/doc/FRank/Ensemble.html
new file mode 100644
index 0000000..bd893ac
--- /dev/null
+++ b/doc/FRank/Ensemble.html
@@ -0,0 +1,911 @@
+
+
+
+
+
+ Class: FRank::Ensemble
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::Ensemble
+
+
+
+
+
+
+
+ Inherits:
+
+ Base
+
+
+ Object
+
+ Base
+
+ FRank::Ensemble
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/ensemble.rb
+
+
+
+
+
Overview
+
+
select feature by an ensemble of ranking algorithms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Ensemble ) initialize (*algos)
+
+
+
+
+
+
+
+
+
+
+10
+11
+12
+13
+14
+15
+16
+17
+
+
+ # File 'lib/frank/ensemble.rb', line 10
+
+def initialize ( * algos )
+ super ( nil )
+
+ @algos = [ ]
+ algos . each do | r |
+ @algos << r
+ end
+end
+
+
+
+
+
+
+
+
+
+
Instance Method Details
+
+
+
+
+
+ - (Object ) by_ave (arr)
+
+
+
+
+
+
by average value of an array
+
+
+
+
+
+
+
+
+
+
+
+
+
+125
+126
+127
+
+
+ # File 'lib/frank/ensemble.rb', line 125
+
+def by_ave ( arr )
+ arr . ave if arr . class == Array
+end
+
+
+
+
+
+
+
+
+ - (Object ) by_max (arr)
+
+
+
+
+
+
by max value of an array
+
+
+
+
+
+
+
+
+
+
+
+
+
+137
+138
+139
+
+
+ # File 'lib/frank/ensemble.rb', line 137
+
+def by_max ( arr )
+ arr . max if arr . class == Array
+end
+
+
+
+
+
+
+
+
+ - (Object ) by_min (arr)
+
+
+
+
+
+
by min value of an array
+
+
+
+
+
+
+
+
+
+
+
+
+
+131
+132
+133
+
+
+ # File 'lib/frank/ensemble.rb', line 131
+
+def by_min ( arr )
+ arr . min if arr . class == Array
+end
+
+
+
+
+
+
+
+
+ - (Object ) ensemble_by_rank (by_what = method(:by_min))
+
+
+
+
+
+
ensemble based on rank
+
+
+
+
+
+
+
+
+
+
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+
+
+ # File 'lib/frank/ensemble.rb', line 102
+
+def ensemble_by_rank ( by_what = method ( :by_min ) )
+ ranks = { }
+
+ each_feature do | f |
+ ranks [ f ] = by_what . call (
+ @algos . collect { | r | r . get_feature_ranks [ f ] }
+ )
+ end
+
+ new_ranks = { }
+
+ sorted_features = ranks . keys . sort do | x , y |
+ ranks [ x ] <=> ranks [ y ]
+ end
+ sorted_features . each_with_index do | sf , si |
+ new_ranks [ sf ] = si + 1
+ end
+
+ @ranks = new_ranks
+end
+
+
+
+
+
+
+
+
+ - (Object ) ensemble_by_score (by_what = method(:by_max), norm = :min_max)
+
+
+
+
+
+
+
+
Note:
+
scores from different algos are usually incompatible with
+each other, we have to normalize it first
+
+
+
+
ensemble based on score
+
+
+
+
+
+
+
+
+
+
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+
+
+ # File 'lib/frank/ensemble.rb', line 70
+
+def ensemble_by_score ( by_what = method ( :by_max ) , norm = :min_max )
+ @algos . each do | r |
+ if norm == :min_max
+ normalize_min_max! ( r )
+ elsif norm == :zscore
+ normalize_zscore! ( r )
+ else
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " invalid normalizer, only :min_max and :zscore supported! "
+ end
+ end
+
+ @scores = { }
+
+ each_feature do | f |
+ @scores [ f ] = { }
+ @scores [ f ] [ :BEST ] = by_what . call (
+ @algos . collect { | r | r . get_feature_scores [ f ] [ :BEST ] }
+ )
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_feature_ranks
+
+
+
+
+
+
reload get_feature_ranks
+
+
+
+
+
+
+
+
+
+
+
+
+
+47
+48
+49
+50
+51
+52
+
+
+ # File 'lib/frank/ensemble.rb', line 47
+
+def get_feature_ranks
+ return @ranks if @ranks
+
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " please call one consensus ranking method first! "
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_feature_scores
+
+
+
+
+
+
reload get_feature_scores
+
+
+
+
+
+
+
+
+
+
+
+
+
+36
+37
+38
+39
+40
+41
+
+
+ # File 'lib/frank/ensemble.rb', line 36
+
+def get_feature_scores
+ return @scores if @scores
+
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " please call one consensus scoring method first! "
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_data (data)
+
+
+
+
+
+
+
+
Note:
+
all algos share the same data structure
+
+
+
+
reload set_data
+
+
+
+
+
+
+
+
+
+
+
+
+
+25
+26
+27
+28
+29
+30
+
+
+ # File 'lib/frank/ensemble.rb', line 25
+
+def set_data ( data )
+ @data = data
+ @algos . each do | r |
+ r . set_data ( data )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/F1Measure.html b/doc/FRank/F1Measure.html
new file mode 100644
index 0000000..6499964
--- /dev/null
+++ b/doc/FRank/F1Measure.html
@@ -0,0 +1,175 @@
+
+
+
+
+
+ Class: FRank::F1Measure
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::F1Measure
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/F1Measure.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/FishersExactTest.html b/doc/FRank/FishersExactTest.html
new file mode 100644
index 0000000..f380eef
--- /dev/null
+++ b/doc/FRank/FishersExactTest.html
@@ -0,0 +1,191 @@
+
+
+
+
+
+ Class: FRank::FishersExactTest
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::FishersExactTest
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+ Includes:
+ Rubystats
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/FishersExactTest.rb
+
+
+
+
+
Overview
+
+
(two-sided) Fisher's Exact Test (FET)
+
+
(A+B)! * (C+D)! * (A+C)! * (B+D)!
+p = -----------------------------------
+ A! * B! * C! * D!
+
+for FET, the smaller, the better, but we intentionally negate it
+so that the larger is always the better (consistent with other algorithms)
+
+
+
ref: Wikipedia and Rubystats
+
+
+
+
+
+
+
+
+
Constant Summary
+
+
+
+
+
Constant Summary
+
+
Constants included
+ from Rubystats
+
Rubystats::MAX_VALUE , Rubystats::SQRT2 , Rubystats::SQRT2PI , Rubystats::TWO_PI
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/GMean.html b/doc/FRank/GMean.html
new file mode 100644
index 0000000..d192e2e
--- /dev/null
+++ b/doc/FRank/GMean.html
@@ -0,0 +1,170 @@
+
+
+
+
+
+ Class: FRank::GMean
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::GMean
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/GMean.rb
+
+
+
+
+
Overview
+
+
GMean (GM)
+
+
GM = sqrt(Sensitivity * Specificity)
+
+ TP*TN A*D
+ = sqrt(------------------) = sqrt(---------------)
+ (TP+FN) * (TN+FP) (A+C) * (B+D)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/GSSCoefficient.html b/doc/FRank/GSSCoefficient.html
new file mode 100644
index 0000000..200614f
--- /dev/null
+++ b/doc/FRank/GSSCoefficient.html
@@ -0,0 +1,175 @@
+
+
+
+
+
+ Class: FRank::GSSCoefficient
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::GSSCoefficient
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/GSSCoefficient.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/GiniIndex.html b/doc/FRank/GiniIndex.html
new file mode 100644
index 0000000..e0e3b7d
--- /dev/null
+++ b/doc/FRank/GiniIndex.html
@@ -0,0 +1,172 @@
+
+
+
+
+
+ Class: FRank::GiniIndex
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::GiniIndex
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/GiniIndex.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/InformationGain.html b/doc/FRank/InformationGain.html
new file mode 100644
index 0000000..d3205ee
--- /dev/null
+++ b/doc/FRank/InformationGain.html
@@ -0,0 +1,172 @@
+
+
+
+
+
+ Class: FRank::InformationGain
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::InformationGain
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/InformationGain.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/InformationGain_d.html b/doc/FRank/InformationGain_d.html
new file mode 100644
index 0000000..e0fb68d
--- /dev/null
+++ b/doc/FRank/InformationGain_d.html
@@ -0,0 +1,173 @@
+
+
+
+
+
+ Class: FRank::InformationGain_d
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::InformationGain_d
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/InformationGain_d.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/MatthewsCorrelationCoefficient.html b/doc/FRank/MatthewsCorrelationCoefficient.html
new file mode 100644
index 0000000..225862f
--- /dev/null
+++ b/doc/FRank/MatthewsCorrelationCoefficient.html
@@ -0,0 +1,174 @@
+
+
+
+
+
+ Class: FRank::MatthewsCorrelationCoefficient
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::MatthewsCorrelationCoefficient
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ Object
+
+ Base
+
+ BaseDiscrete
+
+ FRank::MatthewsCorrelationCoefficient
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/MatthewsCorrelationCoefficient.rb
+
+
+
+
+
Overview
+
+
Matthews Correlation Coefficient (MCC), also known as Phi coefficient
+
+
tp*tn - fp*fn
+MCC = ---------------------------------------------- = PHI = sqrt(CHI/N)
+ sqrt((tp+fp) * (tp+fn) * (tn+fp) * (tn+fn) )
+
+ A*D - B*C
+ = -------------------------------------
+ sqrt((A+B) * (A+C) * (B+D) * (C+D))
+
+
+
ref: Wikipedia
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/McNemarsTest.html b/doc/FRank/McNemarsTest.html
new file mode 100644
index 0000000..18fbde1
--- /dev/null
+++ b/doc/FRank/McNemarsTest.html
@@ -0,0 +1,262 @@
+
+
+
+
+
+ Class: FRank::McNemarsTest
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::McNemarsTest
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/McNemarsTest.rb
+
+
+
+
+
Overview
+
+
McNemar's test (MN), based on Chi-Squared test
+
+
(B-C)^2
+MN(f, c) = ---------
+ B+C
+
+
+
suitable for large samples and B+C >= 25
+
+
ref: Wikipedia
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (McNemarsTest ) initialize (correction = nil, data = nil)
+
+
+
+
+
+
+
+
+
+
+22
+23
+24
+25
+
+
+ # File 'lib/frank/algo_discrete/McNemarsTest.rb', line 22
+
+def initialize ( correction = nil , data = nil )
+ super ( data )
+ @correction = ( correction == :yates ) ? true : false
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/MutualInformation.html b/doc/FRank/MutualInformation.html
new file mode 100644
index 0000000..149aa3c
--- /dev/null
+++ b/doc/FRank/MutualInformation.html
@@ -0,0 +1,175 @@
+
+
+
+
+
+ Class: FRank::MutualInformation
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::MutualInformation
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/MutualInformation.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/OddsRatio.html b/doc/FRank/OddsRatio.html
new file mode 100644
index 0000000..93f598f
--- /dev/null
+++ b/doc/FRank/OddsRatio.html
@@ -0,0 +1,176 @@
+
+
+
+
+
+ Class: FRank::OddsRatio
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::OddsRatio
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/OddsRatio.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/OddsRatioNumerator.html b/doc/FRank/OddsRatioNumerator.html
new file mode 100644
index 0000000..250bfe1
--- /dev/null
+++ b/doc/FRank/OddsRatioNumerator.html
@@ -0,0 +1,173 @@
+
+
+
+
+
+ Class: FRank::OddsRatioNumerator
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::OddsRatioNumerator
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/OddsRatioNumerator.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/PMetric.html b/doc/FRank/PMetric.html
new file mode 100644
index 0000000..b035700
--- /dev/null
+++ b/doc/FRank/PMetric.html
@@ -0,0 +1,197 @@
+
+
+
+
+
+ Class: FRank::PMetric
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::PMetric
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseContinuous
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_continuous/PMetric.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
+
#discretize_chimerge! , #discretize_equal_frequency! , #discretize_equal_width!
+
+
+
+
+
+
+
+
+
Methods included from Normalizer
+
#normalize_log! , #normalize_min_max! , #normalize_zscore!
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/Power.html b/doc/FRank/Power.html
new file mode 100644
index 0000000..5076a55
--- /dev/null
+++ b/doc/FRank/Power.html
@@ -0,0 +1,262 @@
+
+
+
+
+
+ Class: FRank::Power
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::Power
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/Power.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Power ) initialize (k = 5, data = nil)
+
+
+
+
+
+
+
+
+
+
+24
+25
+26
+27
+
+
+ # File 'lib/frank/algo_discrete/Power.rb', line 24
+
+def initialize ( k = 5 , data = nil )
+ super ( data )
+ @k = k
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/Precision.html b/doc/FRank/Precision.html
new file mode 100644
index 0000000..d95165d
--- /dev/null
+++ b/doc/FRank/Precision.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+ Class: FRank::Precision
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::Precision
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/Precision.rb
+
+
+
+
+
Overview
+
+
Precision
+
+
TP A
+Precision = ------- = -----
+ TP+FP A+B
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/ProbabilityRatio.html b/doc/FRank/ProbabilityRatio.html
new file mode 100644
index 0000000..98460d4
--- /dev/null
+++ b/doc/FRank/ProbabilityRatio.html
@@ -0,0 +1,173 @@
+
+
+
+
+
+ Class: FRank::ProbabilityRatio
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::ProbabilityRatio
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/ProbabilityRatio.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/Random.html b/doc/FRank/Random.html
new file mode 100644
index 0000000..708d72c
--- /dev/null
+++ b/doc/FRank/Random.html
@@ -0,0 +1,259 @@
+
+
+
+
+
+ Class: FRank::Random
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::Random
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/Random.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Random ) initialize (seed = nil, data = nil)
+
+
+
+
+
+
initialize from an existing data structure
+
+
+
+
+
+
+
+
+
+
+22
+23
+24
+25
+
+
+ # File 'lib/frank/algo_discrete/Random.rb', line 22
+
+def initialize ( seed = nil , data = nil )
+ super ( data )
+ srand ( seed ) if seed
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/ReliefF_c.html b/doc/FRank/ReliefF_c.html
new file mode 100644
index 0000000..35872e2
--- /dev/null
+++ b/doc/FRank/ReliefF_c.html
@@ -0,0 +1,319 @@
+
+
+
+
+
+ Class: FRank::ReliefF_c
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::ReliefF_c
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseContinuous
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_continuous/ReliefF_c.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#discretize_chimerge! , #discretize_equal_frequency! , #discretize_equal_width!
+
+
+
+
+
+
+
+
+
Methods included from Normalizer
+
#normalize_log! , #normalize_min_max! , #normalize_zscore!
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (ReliefF_c ) initialize (m = nil, k = 10, data = nil)
+
+
+
+
+
+
+
+
+
+
+23
+24
+25
+26
+27
+
+
+ # File 'lib/frank/algo_continuous/ReliefF_c.rb', line 23
+
+def initialize ( m = nil , k = 10 , data = nil )
+ super ( data )
+ @m = m @k = ( k || 10 ) end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/ReliefF_d.html b/doc/FRank/ReliefF_d.html
new file mode 100644
index 0000000..2d91a7c
--- /dev/null
+++ b/doc/FRank/ReliefF_d.html
@@ -0,0 +1,299 @@
+
+
+
+
+
+ Class: FRank::ReliefF_d
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::ReliefF_d
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/ReliefF_d.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (ReliefF_d ) initialize (m = nil, k = 10, data = nil)
+
+
+
+
+
+
+
+
+
+
+22
+23
+24
+25
+26
+
+
+ # File 'lib/frank/algo_discrete/ReliefF_d.rb', line 22
+
+def initialize ( m = nil , k = 10 , data = nil )
+ super ( data )
+ @m = m @k = ( k || 10 ) end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/Relief_c.html b/doc/FRank/Relief_c.html
new file mode 100644
index 0000000..d49095f
--- /dev/null
+++ b/doc/FRank/Relief_c.html
@@ -0,0 +1,301 @@
+
+
+
+
+
+ Class: FRank::Relief_c
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::Relief_c
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseContinuous
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_continuous/Relief_c.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#discretize_chimerge! , #discretize_equal_frequency! , #discretize_equal_width!
+
+
+
+
+
+
+
+
+
Methods included from Normalizer
+
#normalize_log! , #normalize_min_max! , #normalize_zscore!
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Relief_c ) initialize (m = nil, data = nil)
+
+
+
+
+
+
+
+
+
+
+23
+24
+25
+26
+
+
+ # File 'lib/frank/algo_continuous/Relief_c.rb', line 23
+
+def initialize ( m = nil , data = nil )
+ super ( data )
+ @m = m end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/Relief_d.html b/doc/FRank/Relief_d.html
new file mode 100644
index 0000000..4f746d5
--- /dev/null
+++ b/doc/FRank/Relief_d.html
@@ -0,0 +1,281 @@
+
+
+
+
+
+ Class: FRank::Relief_d
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::Relief_d
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/Relief_d.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Relief_d ) initialize (m = nil, data = nil)
+
+
+
+
+
+
+
+
+
+
+23
+24
+25
+26
+
+
+ # File 'lib/frank/algo_discrete/Relief_d.rb', line 23
+
+def initialize ( m = nil , data = nil )
+ super ( data )
+ @m = m end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/Sensitivity.html b/doc/FRank/Sensitivity.html
new file mode 100644
index 0000000..df62ded
--- /dev/null
+++ b/doc/FRank/Sensitivity.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+ Class: FRank::Sensitivity
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::Sensitivity
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/Sensitivity.rb
+
+
+
+
+
Overview
+
+
Sensitivity (SN), also known as Recall
+
+
TP A
+SN = ------- = -----
+ TP+FN A+C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/Specificity.html b/doc/FRank/Specificity.html
new file mode 100644
index 0000000..0393cf2
--- /dev/null
+++ b/doc/FRank/Specificity.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+ Class: FRank::Specificity
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::Specificity
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_discrete/Specificity.rb
+
+
+
+
+
Overview
+
+
Specificity (SP)
+
+
TN D
+SP = ------- = -----
+ TN+FP B+D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FRank/TScore.html b/doc/FRank/TScore.html
new file mode 100644
index 0000000..6ce3387
--- /dev/null
+++ b/doc/FRank/TScore.html
@@ -0,0 +1,197 @@
+
+
+
+
+
+ Class: FRank::TScore
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FRank::TScore
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseContinuous
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/frank/algo_continuous/TScore.rb
+
+
+
+
+
Overview
+
+
+
+
Note:
+
TS applicable only to two-class problems
+
+
+
+
t-score (TS) based on Student's t-test for continous feature
+
+
|u1 - u2|
+TS(f) = --------------------------------------------
+ sqrt((n1*sigma1^2 + n_2*sigma2^2)/(n1+n2))
+
+
+
ref: Filter versus wrapper gene selection approaches
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
+
#discretize_chimerge! , #discretize_equal_frequency! , #discretize_equal_width!
+
+
+
+
+
+
+
+
+
Methods included from Normalizer
+
#normalize_log! , #normalize_min_max! , #normalize_zscore!
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector.html b/doc/FSelector.html
new file mode 100644
index 0000000..70bf6ab
--- /dev/null
+++ b/doc/FSelector.html
@@ -0,0 +1,502 @@
+
+
+
+
+
+ Module: FSelector
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module: FSelector
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector.rb,
+ lib/fselector/base.rb, lib/fselector/ensemble.rb, lib/fselector/base_discrete.rb, lib/fselector/base_continuous.rb, lib/fselector/algo_discrete/GMean.rb, lib/fselector/algo_discrete/Power.rb, lib/fselector/algo_discrete/Random.rb, lib/fselector/algo_discrete/Accuracy.rb, lib/fselector/algo_continuous/TScore.rb, lib/fselector/algo_discrete/Relief_d.rb, lib/fselector/algo_continuous/PMetric.rb, lib/fselector/algo_discrete/GiniIndex.rb, lib/fselector/algo_discrete/ReliefF_d.rb, lib/fselector/algo_discrete/OddsRatio.rb, lib/fselector/algo_discrete/Precision.rb, lib/fselector/algo_discrete/F1Measure.rb, lib/fselector/algo_continuous/Relief_c.rb, lib/fselector/algo_discrete/Specificity.rb, lib/fselector/algo_discrete/Sensitivity.rb, lib/fselector/algo_continuous/ReliefF_c.rb, lib/fselector/algo_discrete/McNemarsTest.rb, lib/fselector/algo_discrete/ChiSquaredTest.rb, lib/fselector/algo_discrete/GSSCoefficient.rb, lib/fselector/algo_discrete/InformationGain.rb, lib/fselector/algo_discrete/FishersExactTest.rb, lib/fselector/algo_discrete/ProbabilityRatio.rb, lib/fselector/algo_discrete/AccuracyBalanced.rb, lib/fselector/algo_discrete/DocumentFrequency.rb, lib/fselector/algo_discrete/MutualInformation.rb, lib/fselector/algo_discrete/OddsRatioNumerator.rb, lib/fselector/algo_discrete/BiNormalSeparation.rb, lib/fselector/algo_discrete/CorrelationCoefficient.rb, lib/fselector/algo_discrete/MatthewsCorrelationCoefficient.rb
+
+
+
+
+
+
Overview
+
+
FSelector: a Ruby gem for feature selection and ranking
+
+
+
+
+
+
+
+
Defined Under Namespace
+
+
+
+
+
+ Classes: Accuracy , AccuracyBalanced , Base , BaseContinuous , BaseDiscrete , BiNormalSeparation , ChiSquaredTest , CorrelationCoefficient , DocumentFrequency , Ensemble , F1Measure , FishersExactTest , GMean , GSSCoefficient , GiniIndex , InformationGain , MatthewsCorrelationCoefficient , McNemarsTest , MutualInformation , OddsRatio , OddsRatioNumerator , PMetric , Power , Precision , ProbabilityRatio , Random , ReliefF_c , ReliefF_d , Relief_c , Relief_d , Sensitivity , Specificity , TScore
+
+
+
+
+
Constant Summary
+
+
+
+ VERSION =
+
+
+
+
+
+
+ ' 0.1.0 '
+
+ GM =
+
+
+
shortcut so that you can use FSelector::GM instead of FSelector::GMean
+
+
+
+
+
+
+
+
+
+ GMean
+
+ Acc =
+
+
+
shortcut so that you can use FSelector::Acc instead of FSelector::Accuracy
+
+
+
+
+
+
+
+
+
+ Accuracy
+
+ TS =
+
+
+
shortcut so that you can use FSelector::TS instead of FSelector::TScore
+
+
+
+
+
+
+
+
+
+ TScore
+
+ PM =
+
+
+
shortcut so that you can use FSelector::PM instead of FSelector::PMetric
+
+
+
+
+
+
+
+
+
+ PMetric
+
+ GI =
+
+
+
shortcut so that you can use FSelector::GI instead of FSelector::GiniIndex
+
+
+
+
+
+
+
+
+
+ GiniIndex
+
+ Odd =
+
+
+
shortcut so that you can use FSelector::Odd instead of FSelector::OddsRatio
+
+
+
+
+
+
+
+
+
+ OddsRatio
+
+ F1 =
+
+
+
shortcut so that you can use FSelector::F1 instead of FSelector::F1Measure
+
+
+
+
+
+
+
+
+
+ F1Measure
+
+ SP =
+
+
+
shortcut so that you can use FSelector::SP instead of FSelector::Specificity
+
+
+
+
+
+
+
+
+
+ Specificity
+
+ SN =
+
+
+
shortcut so that you can use FSelector::SN instead of FSelector::Sensitivity
+
+
+
+
+
+
+
+
+
+ Sensitivity
+
+ Recall =
+
+
+
Sensitivity, also known as Recall
+
+
+
+
+
+
+
+
+
+ Sensitivity
+
+ MNT =
+
+
+
shortcut so that you can use FSelector::MNT instead of FSelector::McNemarsTest
+
+
+
+
+
+
+
+
+
+ McNemarsTest
+
+ CHI =
+
+
+
shortcut so that you can use FSelector::CHI instead of FSelector::ChiSquaredTest
+
+
+
+
+
+
+
+
+
+ ChiSquaredTest
+
+ GSS =
+
+
+
shortcut so that you can use FSelector::GSS instead of FSelector::GSSCoefficient
+
+
+
+
+
+
+
+
+
+ GSSCoefficient
+
+ IG =
+
+
+
shortcut so that you can use FSelector::IG instead of FSelector::InformationGain
+
+
+
+
+
+
+
+
+
+ InformationGain
+
+ FET =
+
+
+
shortcut so that you can use FSelector::FET instead of FSelector::FishersExactTest
+
+
+
+
+
+
+
+
+
+ FishersExactTest
+
+ PR =
+
+
+
shortcut so that you can use FSelector::PR instead of FSelector::ProbabilityRatio
+
+
+
+
+
+
+
+
+
+ ProbabilityRatio
+
+ Acc2 =
+
+
+
shortcut so that you can use FSelector::Acc2 instead of FSelector::AccuracyBalanced
+
+
+
+
+
+
+
+
+
+ AccuracyBalanced
+
+ DF =
+
+
+
shortcut so that you can use FSelector::DF instead of FSelector::DocumentFrequency
+
+
+
+
+
+
+
+
+
+ DocumentFrequency
+
+ MI =
+
+
+
shortcut so that you can use FSelector::MI instead of FSelector::MutualInformation
+
+
+
+
+
+
+
+
+
+ MutualInformation
+
+ OddN =
+
+
+
shortcut so that you can use FSelector::OddN instead of FSelector::OddsRatioNumerator
+
+
+
+
+
+
+
+
+
+ OddsRatioNumerator
+
+ BNS =
+
+
+
shortcut so that you can use FSelector::BNS instead of FSelector::BiNormalSeparation
+
+
+
+
+
+
+
+
+
+ BiNormalSeparation
+
+ CC =
+
+
+
shortcut so that you can use FSelector::CC instead of FSelector::CorrelationCoefficient
+
+
+
+
+
+
+
+
+
+ CorrelationCoefficient
+
+ MCC =
+
+
+
shortcut so that you can use FSelector::MCC instead of FSelector::MatthewsCorrelationCoefficient
+
+
+
+
+
+
+
+
+
+ MatthewsCorrelationCoefficient
+
+ PHI =
+
+
+
Matthews Correlation Coefficient (MCC), also known as Phi coefficient
+
+
+
+
+
+
+
+
+
+ MatthewsCorrelationCoefficient
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/Accuracy.html b/doc/FSelector/Accuracy.html
new file mode 100644
index 0000000..ae524b0
--- /dev/null
+++ b/doc/FSelector/Accuracy.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+ Class: FSelector::Accuracy
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::Accuracy
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/Accuracy.rb
+
+
+
+
+
Overview
+
+
Accuracy (Acc)
+
+
tp+tn A+D
+Acc = ------------- = ---------
+ tp+fn+tn+fp A+B+C+D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/AccuracyBalanced.html b/doc/FSelector/AccuracyBalanced.html
new file mode 100644
index 0000000..fe2bf3a
--- /dev/null
+++ b/doc/FSelector/AccuracyBalanced.html
@@ -0,0 +1,169 @@
+
+
+
+
+
+ Class: FSelector::AccuracyBalanced
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::AccuracyBalanced
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/AccuracyBalanced.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/Base.html b/doc/FSelector/Base.html
new file mode 100644
index 0000000..8a5cd0b
--- /dev/null
+++ b/doc/FSelector/Base.html
@@ -0,0 +1,1891 @@
+
+
+
+
+
+ Class: FSelector::Base
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::Base
+
+
+
+
+
+
+
+ Inherits:
+
+ Object
+
+
+ Object
+
+ FSelector::Base
+
+
+ show all
+
+
+
+
+
+
+
+
+ Includes:
+ FileIO
+
+
+
+
+
+ Defined in:
+ lib/fselector/base.rb
+
+
+
+
+
Overview
+
+
base ranking algorithm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Base ) initialize (data = nil)
+
+
+
+
+
+
initialize from an existing data structure
+
+
+
+
+
+
+
+
+
+
+
+
+
+13
+14
+15
+16
+
+
+ # File 'lib/fselector/base.rb', line 13
+
+def initialize ( data = nil )
+ @data = data
+ @opts = { } end
+
+
+
+
+
+
+
+
+
+
Instance Method Details
+
+
+
+
+
+ - (Object ) each_class
+
+
+
+
+
+
iterator for each class
+
+
e . g .
+self . each_class do | k |
+ puts k
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+27
+28
+29
+30
+31
+32
+33
+34
+
+
+ # File 'lib/fselector/base.rb', line 27
+
+def each_class
+ if not block_given?
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " block must be given! "
+ else
+ get_classes . each { | k | yield k }
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) each_feature
+
+
+
+
+
+
iterator for each feature
+
+
e . g .
+self . each_feature do | f |
+ puts f
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+45
+46
+47
+48
+49
+50
+51
+52
+
+
+ # File 'lib/fselector/base.rb', line 45
+
+def each_feature
+ if not block_given?
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " block must be given! "
+ else
+ get_features . each { | f | yield f }
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) each_sample
+
+
+
+
+
+
iterator for each sample with class label
+
+
e . g .
+self . each_sample do | k , s |
+ print k
+ s . each { | f , v | ' ' + v }
+ puts
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
+
+ # File 'lib/fselector/base.rb', line 65
+
+def each_sample
+ if not block_given?
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " block must be given! "
+ else
+ get_data . each do | k , samples |
+ samples . each { | s | yield k , s }
+ end
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_classes
+
+
+
+
+
+
+
+
+
+
+
+
+
+78
+79
+80
+
+
+ # File 'lib/fselector/base.rb', line 78
+
+def get_classes
+ @classes ||= @data . keys
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_data
+
+
+
+
+
+
+
+
+
+
+
+
+
+130
+131
+132
+
+
+ # File 'lib/fselector/base.rb', line 130
+
+def get_data
+ @data
+end
+
+
+
+
+
+
+
+
+ - (Hash ) get_feature_ranks
+
+
+
+
+
+
get the ranked features based on their best scores
+
+
+
+
+
+
+
+
+
+
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+
+
+ # File 'lib/fselector/base.rb', line 236
+
+def get_feature_ranks
+ return @ranks if @ranks
+ scores = get_feature_scores
+
+ @ranks = { }
+ sorted_features = scores . keys . sort do | x , y |
+ scores [ y ] [ :BEST ] <=> scores [ x ] [ :BEST ]
+ end
+
+ sorted_features . each_with_index do | sf , si |
+ @ranks [ sf ] = si + 1
+ end
+
+ @ranks
+end
+
+
+
+
+
+
+
+
+ - (Hash ) get_feature_scores
+
+
+
+
+
+
get scores of all features for all classes
+
+
+
+
+
+
+
+
+
+
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+
+
+ # File 'lib/fselector/base.rb', line 206
+
+def get_feature_scores
+ return @scores if @scores
+ each_feature do | f |
+ calc_contribution ( f )
+ end
+
+ @scores . each do | f , ks |
+ @scores [ f ] [ :BEST ] = ks . values . max
+ end
+
+ @scores
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_feature_values (f)
+
+
+
+
+
+
get feature values
+
+
+
+
+
+
+
+
+
+
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+
+
+ # File 'lib/fselector/base.rb', line 105
+
+def get_feature_values ( f )
+ @fvs ||= { }
+
+ if not @fvs . has_key? f
+ @fvs [ f ] = [ ]
+ each_sample do | k , s |
+ @fvs [ f ] << s [ f ] if s . has_key? f
+ end
+ end
+
+ @fvs [ f ]
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_features
+
+
+
+
+
+
get unique features
+
+
+
+
+
+
+
+
+
+
+
+
+
+95
+96
+97
+
+
+ # File 'lib/fselector/base.rb', line 95
+
+def get_features
+ @features ||= @data . map { | x | x [ 1 ] . map { | y | y . keys } } . flatten . uniq
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_opt (key)
+
+
+
+
+
+
get non-data information
+
+
+
+
+
+
+
+
+
+
+
+
+
+149
+150
+151
+
+
+ # File 'lib/fselector/base.rb', line 149
+
+def get_opt ( key )
+ @opts . has_key? ( key ) ? @opts [ key ] : nil
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_sample_size
+
+
+
+
+
+
number of samples
+
+
+
+
+
+
+
+
+
+
+
+
+
+161
+162
+163
+
+
+ # File 'lib/fselector/base.rb', line 161
+
+def get_sample_size
+ @sz ||= get_data . values . flatten . size
+end
+
+
+
+
+
+
+
+
+ - (Object ) print_feature_ranks
+
+
+
+
+
+
print feature ranks
+
+
+
+
+
+
+
+
+
+
+
+
+
+191
+192
+193
+194
+195
+196
+197
+
+
+ # File 'lib/fselector/base.rb', line 191
+
+def print_feature_ranks
+ ranks = get_feature_ranks
+
+ ranks . each do | f , r |
+ puts " #{ f } => #{ r } "
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) print_feature_scores (feat = nil, kclass = nil)
+
+
+
+
+
+
print feature scores
+
+
+
+
+
+
+
+
+
+
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+
+
+ # File 'lib/fselector/base.rb', line 171
+
+def print_feature_scores ( feat = nil , kclass = nil )
+ scores = get_feature_scores
+
+ scores . each do | f , ks |
+ next if feat and feat != f
+
+ print " #{ f } => "
+ ks . each do | k , s |
+ if kclass
+ print " #{ k } -> #{ s } " if k == kclass
+ else
+ print " #{ k } -> #{ s } "
+ end
+ end
+ puts
+ end
+end
+
+
+
+
+
+
+
+
+ - (Hash ) select_data_by_rank! (criterion, my_ranks = nil)
+
+
+
+
+
+
+
+
Note:
+
data structure will be altered
+
+
+
+
reconstruct data by rank
+
+
+
+
+
+
+
+
+
+
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+
+
+ # File 'lib/fselector/base.rb', line 298
+
+def select_data_by_rank! ( criterion , my_ranks = nil )
+ ranks = my_ranks || get_feature_ranks
+
+ my_data = { }
+
+ each_sample do | k , s |
+ my_data [ k ] ||= [ ]
+ my_s = { }
+
+ s . each do | f , v |
+ my_s [ f ] = v if eval ( " #{ ranks [ f ] } #{ criterion } " )
+ end
+
+ my_data [ k ] << my_s if not my_s . empty?
+ end
+
+ set_data ( my_data )
+end
+
+
+
+
+
+
+
+
+ - (Hash ) select_data_by_score! (criterion, my_scores = nil)
+
+
+
+
+
+
+
+
Note:
+
data structure will be altered
+
+
+
+
reconstruct data with feature scores satisfying cutoff
+
+
+
+
+
+
+
+
+
+
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+
+
+ # File 'lib/fselector/base.rb', line 267
+
+def select_data_by_score! ( criterion , my_scores = nil )
+ scores = my_scores || get_feature_scores
+
+ my_data = { }
+
+ each_sample do | k , s |
+ my_data [ k ] ||= [ ]
+ my_s = { }
+
+ s . each do | f , v |
+ my_s [ f ] = v if eval ( " #{ scores [ f ] [ :BEST ] } #{ criterion } " )
+ end
+
+ my_data [ k ] << my_s if not my_s . empty?
+ end
+
+ set_data ( my_data )
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_classes (classes)
+
+
+
+
+
+
+
+
+
+
+
+
+
+84
+85
+86
+87
+88
+89
+90
+91
+
+
+ # File 'lib/fselector/base.rb', line 84
+
+def set_classes ( classes )
+ if classes and classes . class == Array
+ @classes = classes
+ else
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " classes must be a Array object! "
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_data (data)
+
+
+
+
+
+
+
+
+
+
+
+
+
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+
+
+ # File 'lib/fselector/base.rb', line 135
+
+def set_data ( data )
+ if data and data . class == Hash
+ @data = data
+ @classes , @features , @fvs = nil , nil , nil
+ @scores , @ranks , @sz = nil , nil , nil
+ else
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " data must be a Hash object! "
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_feature_score (f, k, s)
+
+
+
+
+
+
set feature (f) score (f) for class (k)
+
+
+
+
+
+
+
+
+
+
+
+
+
+225
+226
+227
+228
+229
+
+
+ # File 'lib/fselector/base.rb', line 225
+
+def set_feature_score ( f , k , s )
+ @scores ||= { }
+ @scores [ f ] ||= { }
+ @scores [ f ] [ k ] = s
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_features (features)
+
+
+
+
+
+
+
+
+
+
+
+
+
+119
+120
+121
+122
+123
+124
+125
+126
+
+
+ # File 'lib/fselector/base.rb', line 119
+
+def set_features ( features )
+ if features and features . class == Array
+ @features = features
+ else
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " features must be a Array object! "
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_opt (key, value)
+
+
+
+
+
+
set non-data information as a key-value pair
+
+
+
+
+
+
+
+
+
+
+
+
+
+155
+156
+157
+
+
+ # File 'lib/fselector/base.rb', line 155
+
+def set_opt ( key , value )
+ @opts [ key ] = value
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/BaseContinuous.html b/doc/FSelector/BaseContinuous.html
new file mode 100644
index 0000000..50f1cb8
--- /dev/null
+++ b/doc/FSelector/BaseContinuous.html
@@ -0,0 +1,250 @@
+
+
+
+
+
+ Class: FSelector::BaseContinuous
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::BaseContinuous
+
+
+
+
+
+
+
+ Inherits:
+
+ Base
+
+
+ Object
+
+ Base
+
+ FSelector::BaseContinuous
+
+
+ show all
+
+
+
+
+
+
+
+
+ Includes:
+ Discretilizer , Normalizer
+
+
+
+
+
+ Defined in:
+ lib/fselector/base_continuous.rb
+
+
+
+
+
Overview
+
+
base ranking algorithm for handling continous feature
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#discretize_chimerge! , #discretize_equal_frequency! , #discretize_equal_width!
+
+
+
+
+
+
+
+
+
Methods included from Normalizer
+
#normalize_log! , #normalize_min_max! , #normalize_zscore!
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (BaseContinuous ) initialize (data = nil)
+
+
+
+
+
+
initialize from an existing data structure
+
+
+
+
+
+
+
+
+
+
+
+
+
+17
+18
+19
+
+
+ # File 'lib/fselector/base_continuous.rb', line 17
+
+def initialize ( data = nil )
+ super ( data )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/BaseDiscrete.html b/doc/FSelector/BaseDiscrete.html
new file mode 100644
index 0000000..2116fd0
--- /dev/null
+++ b/doc/FSelector/BaseDiscrete.html
@@ -0,0 +1,246 @@
+
+
+
+
+
+ Class: FSelector::BaseDiscrete
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::BaseDiscrete
+
+
+
+
+
+
+
+ Inherits:
+
+ Base
+
+
+ Object
+
+ Base
+
+ FSelector::BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/base_discrete.rb
+
+
+
+
+
Overview
+
+
base ranking alogrithm for handling discrete feature
+
+
2 x 2 contingency table
+
+ c c'
+ ---------
+ f | A | B | A+B
+ |---|---|
+ f' | C | D | C+D
+ ---------
+ A+C B+D N = A+B+C+D
+
+ P(f) = (A+B)/N
+ P(f') = (C+D)/N
+ P(c) = (A+C)/N
+ P(c') = (B+D)/N
+ P(f,c) = A/N
+ P(f,c') = B/N
+ P(f',c) = C/N
+ P(f',c') = D/N
+
+
+
+
+
+
+
+
+
+
Direct Known Subclasses
+
Accuracy , AccuracyBalanced , BiNormalSeparation , ChiSquaredTest , CorrelationCoefficient , DocumentFrequency , F1Measure , FishersExactTest , GMean , GSSCoefficient , GiniIndex , InformationGain , MatthewsCorrelationCoefficient , McNemarsTest , MutualInformation , OddsRatio , OddsRatioNumerator , Power , Precision , ProbabilityRatio , Random , ReliefF_d , Relief_d , Sensitivity , Specificity
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (BaseDiscrete ) initialize (data = nil)
+
+
+
+
+
+
initialize from an existing data structure
+
+
+
+
+
+
+
+
+
+
+
+
+
+29
+30
+31
+
+
+ # File 'lib/fselector/base_discrete.rb', line 29
+
+def initialize ( data = nil )
+ super ( data )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/BiNormalSeparation.html b/doc/FSelector/BiNormalSeparation.html
new file mode 100644
index 0000000..edf9a31
--- /dev/null
+++ b/doc/FSelector/BiNormalSeparation.html
@@ -0,0 +1,191 @@
+
+
+
+
+
+ Class: FSelector::BiNormalSeparation
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::BiNormalSeparation
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+ Includes:
+ Rubystats
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/BiNormalSeparation.rb
+
+
+
+
+
Overview
+
+
+
+
+
Constant Summary
+
+
+
+
+
Constant Summary
+
+
Constants included
+ from Rubystats
+
Rubystats::MAX_VALUE , Rubystats::SQRT2 , Rubystats::SQRT2PI , Rubystats::TWO_PI
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/ChiSquaredTest.html b/doc/FSelector/ChiSquaredTest.html
new file mode 100644
index 0000000..a96140c
--- /dev/null
+++ b/doc/FSelector/ChiSquaredTest.html
@@ -0,0 +1,269 @@
+
+
+
+
+
+ Class: FSelector::ChiSquaredTest
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::ChiSquaredTest
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/ChiSquaredTest.rb
+
+
+
+
+
Overview
+
+
Chi-Squared test (CHI)
+
+
N * ( P(f,c) * P(f',c') - P(f,c') * P(f',c) )^2
+ CHI(f,c) = -------------------------------------------------
+ P(f) * P(f') * P(c) * P(c')
+
+ N * (A*D - B*C)^2
+ = -------------------------------
+ (A+B) * (C+D) * (A+C) * (B+D)
+
+
+
suitable for large samples and
+none of the values of (A, B, C, D) < 5
+
+
ref: Wikipedia
+ and A Comparative Study on Feature Selection Methods for
+ Drug Discovery
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (ChiSquaredTest ) initialize (correction = nil, data = nil)
+
+
+
+
+
+
+
+
+
+
+30
+31
+32
+33
+
+
+ # File 'lib/fselector/algo_discrete/ChiSquaredTest.rb', line 30
+
+def initialize ( correction = nil , data = nil )
+ super ( data )
+ @correction = ( correction == :yates ) ? true : false
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/CorrelationCoefficient.html b/doc/FSelector/CorrelationCoefficient.html
new file mode 100644
index 0000000..8e8df6c
--- /dev/null
+++ b/doc/FSelector/CorrelationCoefficient.html
@@ -0,0 +1,172 @@
+
+
+
+
+
+ Class: FSelector::CorrelationCoefficient
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::CorrelationCoefficient
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/CorrelationCoefficient.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/DocumentFrequency.html b/doc/FSelector/DocumentFrequency.html
new file mode 100644
index 0000000..a9f5116
--- /dev/null
+++ b/doc/FSelector/DocumentFrequency.html
@@ -0,0 +1,169 @@
+
+
+
+
+
+ Class: FSelector::DocumentFrequency
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::DocumentFrequency
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/DocumentFrequency.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/Ensemble.html b/doc/FSelector/Ensemble.html
new file mode 100644
index 0000000..effbd4f
--- /dev/null
+++ b/doc/FSelector/Ensemble.html
@@ -0,0 +1,913 @@
+
+
+
+
+
+ Class: FSelector::Ensemble
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::Ensemble
+
+
+
+
+
+
+
+ Inherits:
+
+ Base
+
+
+ Object
+
+ Base
+
+ FSelector::Ensemble
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/ensemble.rb
+
+
+
+
+
Overview
+
+
select feature by an ensemble of ranking algorithms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Ensemble ) initialize (*algos)
+
+
+
+
+
+
+
+
+
+
+10
+11
+12
+13
+14
+15
+16
+17
+
+
+ # File 'lib/fselector/ensemble.rb', line 10
+
+def initialize ( * algos )
+ super ( nil )
+
+ @algos = [ ]
+ algos . each do | r |
+ @algos << r
+ end
+end
+
+
+
+
+
+
+
+
+
+
Instance Method Details
+
+
+
+
+
+ - (Object ) by_ave (arr)
+
+
+
+
+
+
by average value of an array
+
+
+
+
+
+
+
+
+
+
+
+
+
+126
+127
+128
+
+
+ # File 'lib/fselector/ensemble.rb', line 126
+
+def by_ave ( arr )
+ arr . ave if arr . class == Array
+end
+
+
+
+
+
+
+
+
+ - (Object ) by_max (arr)
+
+
+
+
+
+
by max value of an array
+
+
+
+
+
+
+
+
+
+
+
+
+
+138
+139
+140
+
+
+ # File 'lib/fselector/ensemble.rb', line 138
+
+def by_max ( arr )
+ arr . max if arr . class == Array
+end
+
+
+
+
+
+
+
+
+ - (Object ) by_min (arr)
+
+
+
+
+
+
by min value of an array
+
+
+
+
+
+
+
+
+
+
+
+
+
+132
+133
+134
+
+
+ # File 'lib/fselector/ensemble.rb', line 132
+
+def by_min ( arr )
+ arr . min if arr . class == Array
+end
+
+
+
+
+
+
+
+
+ - (Object ) ensemble_by_rank (by_what = method(:by_min))
+
+
+
+
+
+
ensemble based on rank
+
+
+
+
+
+
+
+
+
+
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+
+
+ # File 'lib/fselector/ensemble.rb', line 103
+
+def ensemble_by_rank ( by_what = method ( :by_min ) )
+ ranks = { }
+
+ each_feature do | f |
+ ranks [ f ] = by_what . call (
+ @algos . collect { | r | r . get_feature_ranks [ f ] }
+ )
+ end
+
+ new_ranks = { }
+
+ sorted_features = ranks . keys . sort do | x , y |
+ ranks [ x ] <=> ranks [ y ]
+ end
+ sorted_features . each_with_index do | sf , si |
+ new_ranks [ sf ] = si + 1
+ end
+
+ @ranks = new_ranks
+end
+
+
+
+
+
+
+
+
+ - (Object ) ensemble_by_score (by_what = method(:by_max), norm = :min_max)
+
+
+
+
+
+
+
+
Note:
+
scores from different algos are usually incompatible with
+each other, we have to normalize it first
+
+
+
+
ensemble based on score
+
+
+
+
+
+
+
+
+
+
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+
+
+ # File 'lib/fselector/ensemble.rb', line 71
+
+def ensemble_by_score ( by_what = method ( :by_max ) , norm = :min_max )
+ @algos . each do | r |
+ if norm == :min_max
+ normalize_min_max! ( r )
+ elsif norm == :zscore
+ normalize_zscore! ( r )
+ else
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " invalid normalizer, only :min_max and :zscore supported! "
+ end
+ end
+
+ @scores = { }
+
+ each_feature do | f |
+ @scores [ f ] = { }
+ @scores [ f ] [ :BEST ] = by_what . call (
+ @algos . collect { | r | r . get_feature_scores [ f ] [ :BEST ] }
+ )
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_feature_ranks
+
+
+
+
+
+
reload get_feature_ranks
+
+
+
+
+
+
+
+
+
+
+
+
+
+48
+49
+50
+51
+52
+53
+
+
+ # File 'lib/fselector/ensemble.rb', line 48
+
+def get_feature_ranks
+ return @ranks if @ranks
+
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " please call one consensus ranking method first! "
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_feature_scores
+
+
+
+
+
+
reload get_feature_scores
+
+
+
+
+
+
+
+
+
+
+
+
+
+37
+38
+39
+40
+41
+42
+
+
+ # File 'lib/fselector/ensemble.rb', line 37
+
+def get_feature_scores
+ return @scores if @scores
+
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " please call one consensus scoring method first! "
+end
+
+
+
+
+
+
+
+
+ - (Object ) set_data (data)
+
+
+
+
+
+
+
+
Note:
+
all algos share the same data structure
+
+
+
+
reload set_data
+
+
+
+
+
+
+
+
+
+
+
+
+
+25
+26
+27
+28
+29
+30
+31
+
+
+ # File 'lib/fselector/ensemble.rb', line 25
+
+def set_data ( data )
+ super
+
+ @algos . each do | r |
+ r . set_data ( data )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/F1Measure.html b/doc/FSelector/F1Measure.html
new file mode 100644
index 0000000..1a1df53
--- /dev/null
+++ b/doc/FSelector/F1Measure.html
@@ -0,0 +1,175 @@
+
+
+
+
+
+ Class: FSelector::F1Measure
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::F1Measure
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/F1Measure.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/FishersExactTest.html b/doc/FSelector/FishersExactTest.html
new file mode 100644
index 0000000..c5f3222
--- /dev/null
+++ b/doc/FSelector/FishersExactTest.html
@@ -0,0 +1,191 @@
+
+
+
+
+
+ Class: FSelector::FishersExactTest
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::FishersExactTest
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+ Includes:
+ Rubystats
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/FishersExactTest.rb
+
+
+
+
+
Overview
+
+
(two-sided) Fisher's Exact Test (FET)
+
+
(A+B)! * (C+D)! * (A+C)! * (B+D)!
+p = -----------------------------------
+ A! * B! * C! * D!
+
+for FET, the smaller, the better, but we intentionally negate it
+so that the larger is always the better (consistent with other algorithms)
+
+
+
ref: Wikipedia and Rubystats
+
+
+
+
+
+
+
+
+
Constant Summary
+
+
+
+
+
Constant Summary
+
+
Constants included
+ from Rubystats
+
Rubystats::MAX_VALUE , Rubystats::SQRT2 , Rubystats::SQRT2PI , Rubystats::TWO_PI
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/GMean.html b/doc/FSelector/GMean.html
new file mode 100644
index 0000000..445e781
--- /dev/null
+++ b/doc/FSelector/GMean.html
@@ -0,0 +1,170 @@
+
+
+
+
+
+ Class: FSelector::GMean
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::GMean
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/GMean.rb
+
+
+
+
+
Overview
+
+
GMean (GM)
+
+
GM = sqrt(Sensitivity * Specificity)
+
+ TP*TN A*D
+ = sqrt(------------------) = sqrt(---------------)
+ (TP+FN) * (TN+FP) (A+C) * (B+D)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/GSSCoefficient.html b/doc/FSelector/GSSCoefficient.html
new file mode 100644
index 0000000..cf781c6
--- /dev/null
+++ b/doc/FSelector/GSSCoefficient.html
@@ -0,0 +1,175 @@
+
+
+
+
+
+ Class: FSelector::GSSCoefficient
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::GSSCoefficient
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/GSSCoefficient.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/GiniIndex.html b/doc/FSelector/GiniIndex.html
new file mode 100644
index 0000000..901d24a
--- /dev/null
+++ b/doc/FSelector/GiniIndex.html
@@ -0,0 +1,172 @@
+
+
+
+
+
+ Class: FSelector::GiniIndex
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::GiniIndex
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/GiniIndex.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/InformationGain.html b/doc/FSelector/InformationGain.html
new file mode 100644
index 0000000..70bc20b
--- /dev/null
+++ b/doc/FSelector/InformationGain.html
@@ -0,0 +1,173 @@
+
+
+
+
+
+ Class: FSelector::InformationGain
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::InformationGain
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/InformationGain.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/MatthewsCorrelationCoefficient.html b/doc/FSelector/MatthewsCorrelationCoefficient.html
new file mode 100644
index 0000000..065d253
--- /dev/null
+++ b/doc/FSelector/MatthewsCorrelationCoefficient.html
@@ -0,0 +1,174 @@
+
+
+
+
+
+ Class: FSelector::MatthewsCorrelationCoefficient
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::MatthewsCorrelationCoefficient
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ Object
+
+ Base
+
+ BaseDiscrete
+
+ FSelector::MatthewsCorrelationCoefficient
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/MatthewsCorrelationCoefficient.rb
+
+
+
+
+
Overview
+
+
Matthews Correlation Coefficient (MCC)
+
+
tp*tn - fp*fn
+MCC = ---------------------------------------------- = PHI = sqrt(CHI/N)
+ sqrt((tp+fp) * (tp+fn) * (tn+fp) * (tn+fn) )
+
+ A*D - B*C
+ = -------------------------------------
+ sqrt((A+B) * (A+C) * (B+D) * (C+D))
+
+
+
ref: Wikipedia
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/McNemarsTest.html b/doc/FSelector/McNemarsTest.html
new file mode 100644
index 0000000..37d4630
--- /dev/null
+++ b/doc/FSelector/McNemarsTest.html
@@ -0,0 +1,262 @@
+
+
+
+
+
+ Class: FSelector::McNemarsTest
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::McNemarsTest
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/McNemarsTest.rb
+
+
+
+
+
Overview
+
+
McNemar's test (MN), based on Chi-Squared test
+
+
(B-C)^2
+MN(f, c) = ---------
+ B+C
+
+
+
suitable for large samples and B+C >= 25
+
+
ref: Wikipedia
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (McNemarsTest ) initialize (correction = nil, data = nil)
+
+
+
+
+
+
+
+
+
+
+22
+23
+24
+25
+
+
+ # File 'lib/fselector/algo_discrete/McNemarsTest.rb', line 22
+
+def initialize ( correction = nil , data = nil )
+ super ( data )
+ @correction = ( correction == :yates ) ? true : false
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/MutualInformation.html b/doc/FSelector/MutualInformation.html
new file mode 100644
index 0000000..d6d9a6b
--- /dev/null
+++ b/doc/FSelector/MutualInformation.html
@@ -0,0 +1,175 @@
+
+
+
+
+
+ Class: FSelector::MutualInformation
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::MutualInformation
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/MutualInformation.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/OddsRatio.html b/doc/FSelector/OddsRatio.html
new file mode 100644
index 0000000..bc6caa1
--- /dev/null
+++ b/doc/FSelector/OddsRatio.html
@@ -0,0 +1,176 @@
+
+
+
+
+
+ Class: FSelector::OddsRatio
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::OddsRatio
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/OddsRatio.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/OddsRatioNumerator.html b/doc/FSelector/OddsRatioNumerator.html
new file mode 100644
index 0000000..52c4c6f
--- /dev/null
+++ b/doc/FSelector/OddsRatioNumerator.html
@@ -0,0 +1,173 @@
+
+
+
+
+
+ Class: FSelector::OddsRatioNumerator
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::OddsRatioNumerator
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/OddsRatioNumerator.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/PMetric.html b/doc/FSelector/PMetric.html
new file mode 100644
index 0000000..b8b1e99
--- /dev/null
+++ b/doc/FSelector/PMetric.html
@@ -0,0 +1,197 @@
+
+
+
+
+
+ Class: FSelector::PMetric
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::PMetric
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseContinuous
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_continuous/PMetric.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
+
#discretize_chimerge! , #discretize_equal_frequency! , #discretize_equal_width!
+
+
+
+
+
+
+
+
+
Methods included from Normalizer
+
#normalize_log! , #normalize_min_max! , #normalize_zscore!
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/Power.html b/doc/FSelector/Power.html
new file mode 100644
index 0000000..2fc0dd5
--- /dev/null
+++ b/doc/FSelector/Power.html
@@ -0,0 +1,262 @@
+
+
+
+
+
+ Class: FSelector::Power
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::Power
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/Power.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Power ) initialize (k = 5, data = nil)
+
+
+
+
+
+
+
+
+
+
+24
+25
+26
+27
+
+
+ # File 'lib/fselector/algo_discrete/Power.rb', line 24
+
+def initialize ( k = 5 , data = nil )
+ super ( data )
+ @k = k
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/Precision.html b/doc/FSelector/Precision.html
new file mode 100644
index 0000000..dded2b0
--- /dev/null
+++ b/doc/FSelector/Precision.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+ Class: FSelector::Precision
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::Precision
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/Precision.rb
+
+
+
+
+
Overview
+
+
Precision
+
+
TP A
+Precision = ------- = -----
+ TP+FP A+B
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/ProbabilityRatio.html b/doc/FSelector/ProbabilityRatio.html
new file mode 100644
index 0000000..95d9aaa
--- /dev/null
+++ b/doc/FSelector/ProbabilityRatio.html
@@ -0,0 +1,173 @@
+
+
+
+
+
+ Class: FSelector::ProbabilityRatio
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::ProbabilityRatio
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/ProbabilityRatio.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/Random.html b/doc/FSelector/Random.html
new file mode 100644
index 0000000..ed75d24
--- /dev/null
+++ b/doc/FSelector/Random.html
@@ -0,0 +1,259 @@
+
+
+
+
+
+ Class: FSelector::Random
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::Random
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/Random.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Random ) initialize (seed = nil, data = nil)
+
+
+
+
+
+
initialize from an existing data structure
+
+
+
+
+
+
+
+
+
+
+22
+23
+24
+25
+
+
+ # File 'lib/fselector/algo_discrete/Random.rb', line 22
+
+def initialize ( seed = nil , data = nil )
+ super ( data )
+ srand ( seed ) if seed
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/ReliefF_c.html b/doc/FSelector/ReliefF_c.html
new file mode 100644
index 0000000..eda1d66
--- /dev/null
+++ b/doc/FSelector/ReliefF_c.html
@@ -0,0 +1,319 @@
+
+
+
+
+
+ Class: FSelector::ReliefF_c
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::ReliefF_c
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseContinuous
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_continuous/ReliefF_c.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#discretize_chimerge! , #discretize_equal_frequency! , #discretize_equal_width!
+
+
+
+
+
+
+
+
+
Methods included from Normalizer
+
#normalize_log! , #normalize_min_max! , #normalize_zscore!
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (ReliefF_c ) initialize (m = nil, k = 10, data = nil)
+
+
+
+
+
+
+
+
+
+
+23
+24
+25
+26
+27
+
+
+ # File 'lib/fselector/algo_continuous/ReliefF_c.rb', line 23
+
+def initialize ( m = nil , k = 10 , data = nil )
+ super ( data )
+ @m = m @k = ( k || 10 ) end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/ReliefF_d.html b/doc/FSelector/ReliefF_d.html
new file mode 100644
index 0000000..122f346
--- /dev/null
+++ b/doc/FSelector/ReliefF_d.html
@@ -0,0 +1,299 @@
+
+
+
+
+
+ Class: FSelector::ReliefF_d
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::ReliefF_d
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/ReliefF_d.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (ReliefF_d ) initialize (m = nil, k = 10, data = nil)
+
+
+
+
+
+
+
+
+
+
+22
+23
+24
+25
+26
+
+
+ # File 'lib/fselector/algo_discrete/ReliefF_d.rb', line 22
+
+def initialize ( m = nil , k = 10 , data = nil )
+ super ( data )
+ @m = m @k = ( k || 10 ) end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/Relief_c.html b/doc/FSelector/Relief_c.html
new file mode 100644
index 0000000..089502a
--- /dev/null
+++ b/doc/FSelector/Relief_c.html
@@ -0,0 +1,301 @@
+
+
+
+
+
+ Class: FSelector::Relief_c
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::Relief_c
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseContinuous
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_continuous/Relief_c.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#discretize_chimerge! , #discretize_equal_frequency! , #discretize_equal_width!
+
+
+
+
+
+
+
+
+
Methods included from Normalizer
+
#normalize_log! , #normalize_min_max! , #normalize_zscore!
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Relief_c ) initialize (m = nil, data = nil)
+
+
+
+
+
+
+
+
+
+
+23
+24
+25
+26
+
+
+ # File 'lib/fselector/algo_continuous/Relief_c.rb', line 23
+
+def initialize ( m = nil , data = nil )
+ super ( data )
+ @m = m end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/Relief_d.html b/doc/FSelector/Relief_d.html
new file mode 100644
index 0000000..724c523
--- /dev/null
+++ b/doc/FSelector/Relief_d.html
@@ -0,0 +1,281 @@
+
+
+
+
+
+ Class: FSelector::Relief_d
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::Relief_d
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/Relief_d.rb
+
+
+
+
+
Overview
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
Constructor Details
+
+
+
+
+ - (Relief_d ) initialize (m = nil, data = nil)
+
+
+
+
+
+
+
+
+
+
+23
+24
+25
+26
+
+
+ # File 'lib/fselector/algo_discrete/Relief_d.rb', line 23
+
+def initialize ( m = nil , data = nil )
+ super ( data )
+ @m = m end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/Sensitivity.html b/doc/FSelector/Sensitivity.html
new file mode 100644
index 0000000..638b50d
--- /dev/null
+++ b/doc/FSelector/Sensitivity.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+ Class: FSelector::Sensitivity
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::Sensitivity
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/Sensitivity.rb
+
+
+
+
+
Overview
+
+
Sensitivity (SN)
+
+
TP A
+SN = ------- = -----
+ TP+FN A+C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/Specificity.html b/doc/FSelector/Specificity.html
new file mode 100644
index 0000000..345dd1b
--- /dev/null
+++ b/doc/FSelector/Specificity.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+ Class: FSelector::Specificity
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::Specificity
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseDiscrete
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_discrete/Specificity.rb
+
+
+
+
+
Overview
+
+
Specificity (SP)
+
+
TN D
+SP = ------- = -----
+ TN+FP B+D
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FSelector/TScore.html b/doc/FSelector/TScore.html
new file mode 100644
index 0000000..c7284e1
--- /dev/null
+++ b/doc/FSelector/TScore.html
@@ -0,0 +1,197 @@
+
+
+
+
+
+ Class: FSelector::TScore
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: FSelector::TScore
+
+
+
+
+
+
+
+ Inherits:
+
+ BaseContinuous
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/algo_continuous/TScore.rb
+
+
+
+
+
Overview
+
+
+
+
Note:
+
TS applicable only to two-class problems
+
+
+
+
t-score (TS) based on Student's t-test for continous feature
+
+
|u1 - u2|
+TS(f) = --------------------------------------------
+ sqrt((n1*sigma1^2 + n_2*sigma2^2)/(n1+n2))
+
+
+
ref: Filter versus wrapper gene selection approaches
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+
+
+
#initialize
+
+
+
+
+
+
+
+
+
+
#discretize_chimerge! , #discretize_equal_frequency! , #discretize_equal_width!
+
+
+
+
+
+
+
+
+
Methods included from Normalizer
+
#normalize_log! , #normalize_min_max! , #normalize_zscore!
+
+
+
+
+
+
+
+
+
Methods inherited from Base
+
#each_class , #each_feature , #each_sample , #get_classes , #get_data , #get_feature_ranks , #get_feature_scores , #get_feature_values , #get_features , #get_opt , #get_sample_size , #initialize , #print_feature_ranks , #print_feature_scores , #select_data_by_rank! , #select_data_by_score! , #set_classes , #set_data , #set_feature_score , #set_features , #set_opt
+
+
+
+
+
+
+
+
+
Methods included from FileIO
+
#data_from_csv , #data_from_libsvm , #data_from_random , #data_from_weka , #data_to_csv , #data_to_libsvm , #data_to_weka
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/FileIO.html b/doc/FileIO.html
new file mode 100644
index 0000000..5a131f2
--- /dev/null
+++ b/doc/FileIO.html
@@ -0,0 +1,1472 @@
+
+
+
+
+
+ Module: FileIO
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module: FileIO
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Included in:
+ FSelector::Base
+
+
+
+ Defined in:
+ lib/fselector/fileio.rb
+
+
+
+
+
Overview
+
+
+
+
Note:
+
class labels and features are treated as symbols,
+e.g. length => :length
+
+
+
+
read and write various file formats
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
Instance Method Details
+
+
+
+
+
+ - (Object ) data_from_csv (fname = :stdin)
+
+
+
+
+
+
+
+
+
read from csv
+
+
file should have the format with the first two rows
+specifying features and their data types e.g.
+feat1,feat2,...,featn
+data_type1,data_type2,...,data_typen
+
+
and the remaing rows showing data e.g.
+class_label,feat_value1,feat_value2,...,feat_value3
+...
+
+
allowed data types are:
+INTEGER, REAL, NUMERIC, CONTINUOUS, STRING, NOMINAL, CATEGORICAL
+
+
+
+
+
+
+
+
+
+
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+
+
+ # File 'lib/fselector/fileio.rb', line 146
+
+def data_from_csv ( fname = :stdin )
+ data = { }
+
+ if fname == :stdin
+ ifs = $stdin
+ elsif not File . exists? fname
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " File ' #{ fname } ' does not exist! "
+ else
+ ifs = File . open ( fname )
+ end
+
+ first_row , second_row = true , true
+ feats , types = [ ] , [ ]
+
+ ifs . each_line do | ln |
+ if first_row first_row = false
+ * feats = ln . chomp . split ( / , / ) . to_sym
+ elsif second_row second_row = false
+ * types = ln . chomp . split ( / , / )
+ if types . size == feats . size
+ types . each_with_index do | t , i |
+ set_opt ( feats [ i ] , t . upcase ) end
+ else
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " 1st and 2nd row must have same fields "
+ end
+ else label , * fvs = ln . chomp . split ( / , / )
+ label = label . to_sym
+ data [ label ] = [ ] if not data . has_key? label
+
+ fs = { }
+ fvs . each_with_index do | v , i |
+ next if v . empty? data_type = get_opt ( feats [ i ] )
+ if data_type == ' INTEGER '
+ v = v . to_i
+ elsif [ ' REAL ' , ' NUMERIC ' , ' CONTINUOUS ' ] . include? data_type
+ v = v . to_f
+ elsif [ ' STRING ' , ' NOMINAL ' , ' CATEGORICAL ' ] . include? data_type
+ else
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " please specify correct data type " +
+ " for each feature in the 2nd row "
+ end
+
+ fs [ feats [ i ] ] = v
+ end
+
+ data [ label ] << fs
+ end
+ end
+
+ ifs . close if not ifs == $stdin
+
+ set_data ( data )
+end
+
+
+
+
+
+
+
+
+ - (Object ) data_from_libsvm (fname = :stdin)
+
+
+
+
+
+
read from libsvm
+
+
file has the following format
++1 2:1 4:1 ...
+-1 3:1 4:1 ...
+....
+
+
+
+
+
+
+
+
+
+
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+
+
+ # File 'lib/fselector/fileio.rb', line 67
+
+def data_from_libsvm ( fname = :stdin )
+ data = { }
+
+ if fname == :stdin
+ ifs = $stdin
+ elsif not File . exists? fname
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " File ' #{ fname } ' does not exist! "
+ else
+ ifs = File . open ( fname )
+ end
+
+ ifs . each_line do | ln |
+ label , * features = ln . chomp . split ( / \s+ / )
+ label = label . to_sym
+ data [ label ] = [ ] if not data . has_key? label
+
+ feats = { }
+ features . each do | fv |
+ f , v = fv . split ( / : / )
+ feats [ f . to_sym ] = v . to_f
+ end
+
+ data [ label ] << feats
+ end
+
+ ifs . close if not ifs == $stdin
+
+ set_data ( data )
+end
+
+
+
+
+
+
+
+
+ - (Object ) data_from_random (nsample = 100, nclass = 2, nfeature = 10, ncategory = 2, allow_mv = true)
+
+
+
+
+
+
read from random data (for test)
+
+
+
+
+
+
+
+
+
+
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+
+
+ # File 'lib/fselector/fileio.rb', line 20
+
+def data_from_random ( nsample = 100 , nclass = 2 , nfeature = 10 , ncategory = 2 , allow_mv = true )
+ data = { }
+
+ nsample . times do
+ k = " c #{ rand ( nclass ) } " . to_sym
+
+ data [ k ] = [ ] if not data . has_key? k
+
+ feats = { }
+ fs = ( 1 .. nfeature ) . to_a
+
+ if allow_mv
+ ( rand ( nfeature ) ) . times do
+ v = fs [ rand ( fs . size ) ]
+ fs . delete ( v )
+ end
+ end
+
+ fs . sort . each do | i |
+ f = " f #{ i } " . to_sym
+ if ncategory == 1
+ feats [ f ] = 1
+ elsif ncategory > 1
+ feats [ f ] = rand ( ncategory )
+ else
+ feats [ f ] = rand
+ end
+ end
+
+ data [ k ] << feats
+ end
+
+ set_data ( data )
+end
+
+
+
+
+
+
+
+
+ - (Object ) data_from_weka (fname = :stdin, quote_char = '"')
+
+
+
+
+
+
+
+
Note:
+
it's ok if string containes spaces quoted by quote_char
+
+
+
+
read from WEKA ARFF file
+
+
+
+
+
+
+
+
+
+
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+
+
+ # File 'lib/fselector/fileio.rb', line 257
+
+def data_from_weka ( fname = :stdin , quote_char = ' " ' )
+ data = { }
+
+ if fname == :stdin
+ ifs = $stdin
+ elsif not File . exists? fname
+ abort " [ #{ __FILE__ } @ #{ __LINE__ } ]: " +
+ " File ' #{ fname } ' does not exist! "
+ else
+ ifs = File . open ( fname )
+ end
+
+ features , classes , = [ ] , [ ] , [ ]
+ has_class , has_data = false , false
+
+ ifs . each_line do | ln |
+ next if ln . blank?
+ ln = ln . chomp
+
+ if ln . ( ' % ' )
+ << ln
+ elsif ln =~ / ^@RELATION /i
+ tmp , relation = ln . split_me ( / \s+ / , quote_char )
+ set_opt ( ' @RELATION ' , relation )
+ elsif ln =~ / ^@ATTRIBUTE\s+class\s+{(.+)} /i
+ has_class = true
+ classes = $1 . split_me ( / ,\s* / , quote_char ) . to_sym
+ classes . each { | k | data [ k ] = [ ] }
+ elsif ln =~ / ^@ATTRIBUTE\s+(\S+)\s+{(.+)} /i
+ f = $1 . to_sym
+ features << f
+ set_opt ( f , ' NOMINAL ' )
+ elsif ln =~ / ^@ATTRIBUTE /i
+ tmp , v1 , v2 = ln . split_me ( / \s+ / , quote_char )
+ f = v1 . to_sym
+ features << f
+ set_opt ( f , v2 . upcase ) elsif ln =~ / ^@DATA /i
+ has_data = true
+ elsif has_data and has_class
+ if ln =~ / ^{(.+)}$ / feats = $1 . split_me ( / ,\s* / , quote_char )
+ label = feats . pop . split_me ( / \s+ / , quote_char ) [ 1 ]
+ label = label . to_sym
+
+ fs = { }
+ nonzero_fi = [ ]
+ feats . each do | fi_fv |
+ fi , fv = fi_fv . split_me ( / \s+ / , quote_char )
+ fi = fi . to_i
+ add_feature_weka ( fs , features [ fi ] , fv )
+ nonzero_fi << fi
+ end
+
+ features . each_with_index do | f0 , i |
+ add_feature_weka ( fs , f0 , 0 ) if not nonzero_fi . include? ( i )
+ end
+
+ data [ label ] << fs
+ else feats = ln . split_me ( / ,\s* / , quote_char )
+ label = feats . pop . to_sym
+
+ fs = { }
+ feats . each_with_index do | fv , i |
+ add_feature_weka ( fs , features [ i ] , fv )
+ end
+
+ data [ label ] << fs if label
+ end
+ else
+ next
+ end
+ end
+
+ ifs . close if not ifs == $stdin
+
+ set_data ( data )
+ set_classes ( classes )
+ set_features ( features )
+ set_opt ( ' COMMENTS ' , ) if not . empty?
+end
+
+
+
+
+
+
+
+
+ - (Object ) data_to_csv (fname = :stdout)
+
+
+
+
+
+
write to csv
+
+
file has the format with the first two rows
+specifying features and their data types
+and the remaing rows showing data
+
+
+
+
+
+
+
+
+
+
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+
+
+ # File 'lib/fselector/fileio.rb', line 221
+
+def data_to_csv ( fname = :stdout )
+ if fname == :stdout
+ ofs = $stdout
+ else
+ ofs = File . open ( fname , ' w ' )
+ end
+
+ ofs . puts get_features . join ( ' , ' )
+ ofs . puts get_features . collect { | f |
+ get_opt ( f ) || ' STRING '
+ } . join ( ' , ' )
+
+ each_sample do | k , s |
+ ofs . print " #{ k } "
+ each_feature do | f |
+ if s . has_key? f
+ ofs . print " , #{ s [ f ] } "
+ else
+ ofs . print " , "
+ end
+ end
+ ofs . puts
+ end
+
+ ofs . close if not ofs == $stdout
+end
+
+
+
+
+
+
+
+
+ - (Object ) data_to_libsvm (fname = :stdout)
+
+
+
+
+
+
+
+
+
+
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+
+
+ # File 'lib/fselector/fileio.rb', line 106
+
+def data_to_libsvm ( fname = :stdout )
+ if fname == :stdout
+ ofs = $stdout
+ else
+ ofs = File . open ( fname , ' w ' )
+ end
+
+ each_sample do | k , s |
+ ofs . print " #{ k } "
+ s . keys . sort { | x , y | x . to_s . to_i <=> y . to_s . to_i } . each do | i |
+ ofs . print " #{ i } : #{ s [ i ] } " if not s [ i ] . zero?
+ end
+ ofs . puts
+ end
+
+ ofs . close if not ofs == $stdout
+end
+
+
+
+
+
+
+
+
+ - (Object ) data_to_weka (fname = :stdout, format = nil)
+
+
+
+
+
+
write to WEKA ARFF file
+
+
+
+
+
+
+
+
+
+
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+
+
+ # File 'lib/fselector/fileio.rb', line 361
+
+def data_to_weka ( fname = :stdout , format = nil )
+ if fname == :stdout
+ ofs = $stdout
+ else
+ ofs = File . open ( fname , ' w ' )
+ end
+
+ = get_opt ( ' COMMENTS ' )
+ if
+ ofs . puts . join ( " \n " )
+ ofs . puts
+ end
+
+ relation = get_opt ( ' @RELATION ' )
+ if relation
+ ofs . puts " @RELATION #{ relation } "
+ else
+ ofs . puts " @RELATION data_gen_by_FSelector "
+ end
+
+ ofs . puts
+
+ each_feature do | f |
+ ofs . print " @ATTRIBUTE #{ f } "
+ type = get_opt ( f )
+ if type
+ if type == ' NOMINAL '
+ ofs . puts " { #{ get_feature_values ( f ) . uniq . sort . join ( ' , ' ) } } "
+ else
+ ofs . puts type
+ end
+ else ofs . puts " STRING "
+ end
+ end
+
+ ofs . puts " @ATTRIBUTE class { #{ get_classes . join ( ' , ' ) } } "
+
+ ofs . puts
+
+ ofs . puts " @DATA "
+ each_sample do | k , s |
+ if format == :sparse ofs . print " { "
+ get_features . each_with_index do | f , i |
+ if s . has_key? f
+ ofs . print " #{ i } #{ s [ f ] } , " if not s [ f ] . zero?
+ else ofs . print " #{ i } ?, "
+ end
+ end
+ ofs . print " #{ get_features . size } #{ k } "
+ ofs . puts " } "
+ else
+ each_feature do | f |
+ if s . has_key? f
+ ofs . print " #{ s [ f ] } , "
+ else ofs . print " ?, "
+ end
+ end
+ ofs . puts " #{ k } "
+ end
+ end
+
+ ofs . close if not ofs == $stdout
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/Normalizer.html b/doc/Normalizer.html
new file mode 100644
index 0000000..d117bb4
--- /dev/null
+++ b/doc/Normalizer.html
@@ -0,0 +1,381 @@
+
+
+
+
+
+ Module: Normalizer
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module: Normalizer
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Included in:
+ FSelector::BaseContinuous
+
+
+
+ Defined in:
+ lib/fselector/algo_continuous/normalizer.rb
+
+
+
+
+
Overview
+
+
normalize continuous feature
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
Instance Method Details
+
+
+
+
+
+ - (Object ) normalize_log! (base = 10)
+
+
+
+
+
+
log transformation, requires positive feature values
+
+
+
+
+
+
+
+
+
+
+
+
+
+6
+7
+8
+9
+10
+11
+12
+
+
+ # File 'lib/fselector/algo_continuous/normalizer.rb', line 6
+
+def normalize_log! ( base = 10 )
+ each_sample do | k , s |
+ s . keys . each do | f |
+ s [ f ] = Math . log ( s [ f ] , base ) if s [ f ] > 0.0
+ end
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) normalize_min_max! (min = 0.0, max = 1.0)
+
+
+
+
+
+
scale to [min,max], max > min
+
+
+
+
+
+
+
+
+
+
+
+
+
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
+
+ # File 'lib/fselector/algo_continuous/normalizer.rb', line 16
+
+def normalize_min_max! ( min = 0.0 , max = 1.0 )
+ f2min_max = { }
+
+ each_feature do | f |
+ fvs = get_feature_values ( f )
+ f2min_max [ f ] = [ fvs . min , fvs . max ]
+ end
+
+ each_sample do | k , s |
+ s . keys . each do | f |
+ min_v , max_v = f2min_max [ f ]
+ s [ f ] = min + ( s [ f ] - min_v ) * ( max - min ) / ( max_v - min_v )
+ end
+ end
+end
+
+
+
+
+
+
+
+
+ - (Object ) normalize_zscore!
+
+
+
+
+
+
+
+
+
+
+
+
+
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+
+
+ # File 'lib/fselector/algo_continuous/normalizer.rb', line 36
+
+def normalize_zscore!
+ f2mean_sd = { }
+
+ each_feature do | f |
+ fvs = get_feature_values ( f )
+ f2mean_sd [ f ] = fvs . mean , fvs . sd
+ end
+
+ each_sample do | k , s |
+ s . keys . each do | f |
+ mean , sd = f2mean_sd [ f ]
+ if sd . zero?
+ s [ f ] = 0.0
+ else
+ s [ f ] = ( s [ f ] - mean ) / sd
+ end
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/Rubystats.html b/doc/Rubystats.html
new file mode 100644
index 0000000..03e902d
--- /dev/null
+++ b/doc/Rubystats.html
@@ -0,0 +1,158 @@
+
+
+
+
+
+ Module: Rubystats
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module: Rubystats
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Included in:
+ FSelector::BiNormalSeparation , FSelector::FishersExactTest
+
+
+
+ Defined in:
+ lib/fselector/util.rb
+
+
+
+
+
Overview
+
+
adapted from the Ruby statistics libraries --
+Rubystats
+
+
+for Fisher's exact test (Rubystats::FishersExactTest.calculate())
+used by algo_binary/FishersExactText.rb
+for inverse cumulative normal distribution function (Rubystats::NormalDistribution.get_icdf())
+used by algo_binary/BiNormalSeparation.rb. note the original get_icdf() function is a private
+one, so we have to open it up and that's why the codes here.
+
+
+
+
+
+
+
+
+
Defined Under Namespace
+
+
+
+
+
+ Classes: FishersExactTest , NormalDistribution
+
+
+
+
+
Constant Summary
+
+
+
+ MAX_VALUE =
+
+
+ 1.2e290
+
+ SQRT2PI =
+
+
+ 2.5066282746310005024157652848110452530069867406099
+
+ SQRT2 =
+
+
+ 1.4142135623730950488016887242096980785696718753769
+
+ TWO_PI =
+
+
+ 6.2831853071795864769252867665590057683943387987502
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/Rubystats/FishersExactTest.html b/doc/Rubystats/FishersExactTest.html
new file mode 100644
index 0000000..f89d293
--- /dev/null
+++ b/doc/Rubystats/FishersExactTest.html
@@ -0,0 +1,318 @@
+
+
+
+
+
+ Class: Rubystats::FishersExactTest
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: Rubystats::FishersExactTest
+
+
+
+
+
+
+
+ Inherits:
+
+ Object
+
+
+ Object
+
+ Rubystats::FishersExactTest
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/util.rb
+
+
+
+
+
Overview
+
+
Fisher's exact test calculator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
Constructor Details
+
+
+
+
+ - (FishersExactTest ) initialize
+
+
+
+
+
+
+
+
+
+
+
+
+
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+
+
+ # File 'lib/fselector/util.rb', line 147
+
+def initialize
+ @sn11 = 0.0
+ @sn1_ = 0.0
+ @sn_1 = 0.0
+ @sn = 0.0
+ @sprob = 0.0
+
+ @sleft = 0.0
+ @sright = 0.0
+ @sless = 0.0
+ @slarg = 0.0
+
+ @left = 0.0
+ @right = 0.0
+ @twotail = 0.0
+end
+
+
+
+
+
+
+
+
+
+
Instance Method Details
+
+
+
+
+
+ - (Object ) calculate (n11_, n12_, n21_, n22_)
+
+
+
+
+
+
Fisher's exact test
+
+
+
+
+
+
+
+
+
+
+
+
+
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+
+
+ # File 'lib/fselector/util.rb', line 166
+
+def calculate ( n11_ , n12_ , n21_ , n22_ )
+ n11_ *= - 1 if n11_ < 0
+ n12_ *= - 1 if n12_ < 0
+ n21_ *= - 1 if n21_ < 0
+ n22_ *= - 1 if n22_ < 0
+ n1_ = n11_ + n12_
+ n_1 = n11_ + n21_
+ n = n11_ + n12_ + n21_ + n22_
+ prob = exact ( n11_ , n1_ , n_1 , n )
+ left = @sless
+ right = @slarg
+ twotail = @sleft + @sright
+ twotail = 1 if twotail > 1
+ values_hash = { :left => left , :right => right , :twotail => twotail }
+ return values_hash
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/Rubystats/NormalDistribution.html b/doc/Rubystats/NormalDistribution.html
new file mode 100644
index 0000000..8bc0d79
--- /dev/null
+++ b/doc/Rubystats/NormalDistribution.html
@@ -0,0 +1,461 @@
+
+
+
+
+
+ Class: Rubystats::NormalDistribution
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: Rubystats::NormalDistribution
+
+
+
+
+
+
+
+ Inherits:
+
+ Object
+
+
+ Object
+
+ Rubystats::NormalDistribution
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/util.rb
+
+
+
+
+
Overview
+
+
Normal distribution
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+ - (Object) get_cdf (x)
+
+
+
+
+
+
+
+
+
+
+
+
+ Obtain single CDF value
+Returns the probability that a stochastic variable x is less than X,
+i.e.
+
+
+
+
+
+
+
+
+ - (Object) get_icdf (p)
+
+
+
+
+
+
+
+
+
+
+
+
+ Obtain single inverse CDF value.
+
+
+
+
+
+
+
+
+ - (Object) get_pdf (x)
+
+
+
+
+
+
+
+
+
+
+
+
+ Obtain single PDF value
+Returns the probability that a stochastic variable x has the value X,
+i.e.
+
+
+
+
+
+
+
+
+ - (NormalDistribution) initialize (mu = 0.0, sigma = 1.0)
+
+
+
+
+
+ constructor
+
+
+
+
+
+
+
+
+ Constructs a normal distribution (defaults to zero mean and
+unity variance).
+
+
+
+
+
+
+
+
+
+
Constructor Details
+
+
+
+
+ - (NormalDistribution ) initialize (mu = 0.0, sigma = 1.0)
+
+
+
+
+
+
Constructs a normal distribution (defaults to zero mean and
+unity variance)
+
+
+
+
+
+
+
+
+
+
+
+
+
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+
+
+ # File 'lib/fselector/util.rb', line 321
+
+def initialize ( mu = 0.0 , sigma = 1.0 )
+ @mean = mu
+ if sigma <= 0.0
+ return " error "
+ end
+ @stdev = sigma
+ @variance = sigma ** 2
+ @pdf_denominator = SQRT2PI * Math . sqrt ( @variance )
+ @cdf_denominator = SQRT2 * Math . sqrt ( @variance )
+end
+
+
+
+
+
+
+
+
+
+
Instance Method Details
+
+
+
+
+
+ - (Object ) get_cdf (x)
+
+
+
+
+
+
Obtain single CDF value
+Returns the probability that a stochastic variable x is less than X,
+i.e. P(x<X)
+
+
+
+
+
+
+
+
+
+
+
+
+
+344
+345
+346
+
+
+ # File 'lib/fselector/util.rb', line 344
+
+def get_cdf ( x )
+ complementary_error ( - ( x - @mean ) / @cdf_denominator ) / 2
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_icdf (p)
+
+
+
+
+
+
Obtain single inverse CDF value.
+returns the value X for which P(x<X).
+
+
+
+
+
+
+
+
+
+
+
+
+
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+
+
+ # File 'lib/fselector/util.rb', line 351
+
+def get_icdf ( p )
+ check_range ( p )
+ if p == 0.0
+ return - MAX_VALUE
+ end
+ if p == 1.0
+ return MAX_VALUE
+ end
+ if p == 0.5
+ return @mean
+ end
+
+ mean_save = @mean
+ var_save = @variance
+ pdf_D_save = @pdf_denominator
+ cdf_D_save = @cdf_denominator
+ @mean = 0.0
+ @variance = 1.0
+ @pdf_denominator = Math . sqrt ( TWO_PI )
+ @cdf_denominator = SQRT2
+ x = find_root ( p , 0.0 , - 100.0 , 100.0 )
+ @mean = mean_save
+ @variance = var_save
+ @pdf_denominator = pdf_D_save
+ @cdf_denominator = cdf_D_save
+ return x * Math . sqrt ( @variance ) + @mean
+end
+
+
+
+
+
+
+
+
+ - (Object ) get_pdf (x)
+
+
+
+
+
+
Obtain single PDF value
+Returns the probability that a stochastic variable x has the value X,
+i.e. P(x=X)
+
+
+
+
+
+
+
+
+
+
+
+
+
+336
+337
+338
+
+
+ # File 'lib/fselector/util.rb', line 336
+
+def get_pdf ( x )
+ Math . exp ( - ( ( x - @mean ) ** 2 ) / ( 2 * @variance ) ) / @pdf_denominator
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/String.html b/doc/String.html
new file mode 100644
index 0000000..ac45887
--- /dev/null
+++ b/doc/String.html
@@ -0,0 +1,430 @@
+
+
+
+
+
+ Class: String
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class: String
+
+
+
+
+
+
+
+ Inherits:
+
+ Object
+
+
+ show all
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+ lib/fselector/util.rb
+
+
+
+
+
Overview
+
+
add functions to String class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+ (collapse )
+
+
+
+
+
+
+
+
+
Instance Method Details
+
+
+
+
+
+ - (Boolean ) blank?
+
+
+
+
+
+
+
+
+
+
+91
+92
+93
+
+
+ # File 'lib/fselector/util.rb', line 91
+
+def blank?
+ return self =~ / ^\s*$ /
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+85
+86
+87
+
+
+ # File 'lib/fselector/util.rb', line 85
+
+def ( char = ' # ' )
+ return self =~ / ^ #{ char } /
+end
+
+
+
+
+
+
+
+
+ - (Array <String > ) split_me (delim_regex, quote_char = "'")
+
+
+
+
+
+
Enhanced String.split with escape char, which means
+string included in a pair of escape char is considered as a whole
+even if it matches the split regular expression. this is especially
+useful to parse CSV file that contains comma in a doube-quoted string
+e.g. 'a,"b, c",d'.split_me(/,/, '"') => [a, 'b, c', d]
+
+
+
+
+
+
+
+
+
+
+107
+108
+109
+110
+111
+112
+113
+114
+
+
+ # File 'lib/fselector/util.rb', line 107
+
+def split_me ( delim_regex , quote_char = " ' " )
+ d , q = delim_regex , quote_char
+ if not self . count ( q ) % 2 == 0
+ $stderr . puts " unpaired char of #{ q } found, return nil "
+ return nil
+ end
+ self . split ( / #{ d . source } (?=(?:[^ #{ q } ]* #{ q } [^ #{ q } ]* #{ q } )* [^ #{ q } ]*$) /x )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/_index.html b/doc/_index.html
new file mode 100644
index 0000000..d4f355d
--- /dev/null
+++ b/doc/_index.html
@@ -0,0 +1,499 @@
+
+
+
+
+
+ Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Documentation by YARD 0.7.5
+
+
Alphabetic Index
+
+
File Listing
+
+
+
+
Namespace Listing A-Z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ T
+
+
+
+ TScore
+
+ (FSelector)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/class_list.html b/doc/class_list.html
new file mode 100644
index 0000000..4f9fe84
--- /dev/null
+++ b/doc/class_list.html
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/css/common.css b/doc/css/common.css
new file mode 100644
index 0000000..cf25c45
--- /dev/null
+++ b/doc/css/common.css
@@ -0,0 +1 @@
+/* Override this file with custom rules */
\ No newline at end of file
diff --git a/doc/css/full_list.css b/doc/css/full_list.css
new file mode 100644
index 0000000..3c03296
--- /dev/null
+++ b/doc/css/full_list.css
@@ -0,0 +1,55 @@
+body {
+ margin: 0;
+ font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
+ font-size: 13px;
+ height: 101%;
+ overflow-x: hidden;
+}
+
+h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; }
+.clear { clear: both; }
+#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; }
+#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; }
+#full_list { padding: 0; list-style: none; margin-left: 0; }
+#full_list ul { padding: 0; }
+#full_list li { padding: 5px; padding-left: 12px; margin: 0; font-size: 1.1em; list-style: none; }
+#noresults { padding: 7px 12px; }
+#content.insearch #noresults { margin-left: 7px; }
+ul.collapsed ul, ul.collapsed li { display: none; }
+ul.collapsed.search_uncollapsed { display: block; }
+ul.collapsed.search_uncollapsed li { display: list-item; }
+li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; }
+li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; }
+li { color: #888; cursor: pointer; }
+li.deprecated { text-decoration: line-through; font-style: italic; }
+li.r1 { background: #f0f0f0; }
+li.r2 { background: #fafafa; }
+li:hover { background: #ddd; }
+li small:before { content: "("; }
+li small:after { content: ")"; }
+li small.search_info { display: none; }
+a:link, a:visited { text-decoration: none; color: #05a; }
+li.clicked { background: #05a; color: #ccc; }
+li.clicked a:link, li.clicked a:visited { color: #eee; }
+li.clicked a.toggle { opacity: 0.5; background-position: bottom right; }
+li.collapsed.clicked a.toggle { background-position: top right; }
+#search input { border: 1px solid #bbb; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
+#nav { margin-left: 10px; font-size: 0.9em; display: none; color: #aaa; }
+#nav a:link, #nav a:visited { color: #358; }
+#nav a:hover { background: transparent; color: #5af; }
+
+.frames #content h1 { margin-top: 0; }
+.frames li { white-space: nowrap; cursor: normal; }
+.frames li small { display: block; font-size: 0.8em; }
+.frames li small:before { content: ""; }
+.frames li small:after { content: ""; }
+.frames li small.search_info { display: none; }
+.frames #search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; }
+.frames #content.insearch #search { background-position: center right; }
+.frames #search input { width: 110px; }
+.frames #nav { display: block; }
+
+#full_list.insearch li { display: none; }
+#full_list.insearch li.found { display: list-item; padding-left: 10px; }
+#full_list.insearch li a.toggle { display: none; }
+#full_list.insearch li small.search_info { display: block; }
diff --git a/doc/css/style.css b/doc/css/style.css
new file mode 100644
index 0000000..c8ff2bf
--- /dev/null
+++ b/doc/css/style.css
@@ -0,0 +1,322 @@
+body {
+ padding: 0 20px;
+ font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
+ font-size: 13px;
+}
+body.frames { padding: 0 5px; }
+h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; }
+h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; }
+h1.title { margin-bottom: 10px; }
+h1.alphaindex { margin-top: 0; font-size: 22px; }
+h2 {
+ padding: 0;
+ padding-bottom: 3px;
+ border-bottom: 1px #aaa solid;
+ font-size: 1.4em;
+ margin: 1.8em 0 0.5em;
+}
+h2 small { font-weight: normal; font-size: 0.7em; display: block; float: right; }
+.clear { clear: both; }
+.inline { display: inline; }
+.inline p:first-child { display: inline; }
+.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; }
+.docstring h1 { font-size: 1.2em; }
+.docstring h2 { font-size: 1.1em; }
+.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; }
+.summary_desc .object_link, .docstring .object_link { font-family: monospace; }
+.rdoc-term { padding-right: 25px; font-weight: bold; }
+.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; }
+
+/* style for */
+#filecontents li > p, .docstring li > p { margin: 0px; }
+#filecontents ul, .docstring ul { padding-left: 20px; }
+/* style for */
+#filecontents dl, .docstring dl { border: 1px solid #ccc; }
+#filecontents dt, .docstring dt { background: #ddd; font-weight: bold; padding: 3px 5px; }
+#filecontents dd, .docstring dd { padding: 5px 0px; margin-left: 18px; }
+#filecontents dd > p, .docstring dd > p { margin: 0px; }
+
+.note {
+ color: #222;
+ -moz-border-radius: 3px; -webkit-border-radius: 3px;
+ background: #e3e4e3; border: 1px solid #d5d5d5; padding: 7px 10px;
+ display: block;
+}
+.note.todo { background: #ffffc5; border-color: #ececaa; }
+.note.returns_void { background: #efefef; }
+.note.deprecated { background: #ffe5e5; border-color: #e9dada; }
+.note.private { background: #ffffc5; border-color: #ececaa; }
+.note.title { text-transform: lowercase; padding: 1px 5px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; }
+.summary_signature + .note.title { margin-left: 7px; }
+h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; }
+.note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; }
+.note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; }
+.note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; }
+.note.title.private { background: #d5d5d5; border-color: #c5c5c5; }
+.discussion .note { margin-top: 6px; }
+.discussion .note:first-child { margin-top: 0; }
+
+h3.inherited {
+ font-style: italic;
+ font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
+ font-weight: normal;
+ padding: 0;
+ margin: 0;
+ margin-top: 12px;
+ margin-bottom: 3px;
+ font-size: 13px;
+}
+p.inherited {
+ padding: 0;
+ margin: 0;
+ margin-left: 25px;
+}
+
+#filecontents dl.box, dl.box {
+ border: 0;
+ width: 520px;
+ font-size: 1em;
+}
+#filecontents dl.box dt, dl.box dt {
+ float: left;
+ display: block;
+ width: 100px;
+ margin: 0;
+ text-align: right;
+ font-weight: bold;
+ background: transparent;
+ border: 1px solid #aaa;
+ border-width: 1px 0px 0px 1px;
+ padding: 6px 0;
+ padding-right: 10px;
+}
+#filecontents dl.box dd, dl.box dd {
+ float: left;
+ display: block;
+ width: 380px;
+ margin: 0;
+ padding: 6px 0;
+ padding-right: 20px;
+ border: 1px solid #aaa;
+ border-width: 1px 1px 0 0;
+}
+#filecontents dl.box .last, dl.box .last {
+ border-bottom: 1px solid #aaa;
+}
+#filecontents dl.box .r1, dl.box .r1 { background: #eee; }
+
+ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; }
+#files { padding-left: 15px; font-size: 1.1em; }
+
+#files { padding: 0; }
+#files li { list-style: none; display: inline; padding: 7px 12px; line-height: 35px; }
+
+dl.constants { margin-left: 40px; }
+dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; }
+dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; }
+
+.summary_desc { margin-left: 32px; display: block; font-family: sans-serif; }
+.summary_desc tt { font-size: 0.9em; }
+dl.constants .note { padding: 2px 6px; padding-right: 12px; margin-top: 6px; }
+dl.constants .docstring { margin-left: 32px; font-size: 0.9em; font-weight: normal; }
+dl.constants .tags { padding-left: 32px; font-size: 0.9em; line-height: 0.8em; }
+dl.constants .discussion *:first-child { margin-top: 0; }
+dl.constants .discussion *:last-child { margin-bottom: 0; }
+
+.method_details { border-top: 1px dotted #aaa; margin-top: 15px; padding-top: 0; }
+.method_details.first { border: 0; }
+p.signature {
+ font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace;
+ padding: 6px 10px; margin-top: 18px;
+ background: #e5e8ff; border: 1px solid #d8d8e5; -moz-border-radius: 3px; -webkit-border-radius: 3px;
+}
+p.signature tt { font-family: Monaco, Consolas, Courier, monospace; }
+p.signature .overload { display: block; }
+p.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; }
+p.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; }
+p.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; }
+
+.tags h3 { font-size: 1em; margin-bottom: 0; }
+.tags ul { margin-top: 5px; padding-left: 30px; list-style: square; }
+.tags ul li { margin-bottom: 3px; }
+.tags ul .name { font-family: monospace; font-weight: bold; }
+.tags ul .note { padding: 3px 6px; }
+.tags { margin-bottom: 12px; }
+
+.tags .examples h3 { margin-bottom: 10px; }
+.tags .examples h4 { padding: 0; margin: 0; margin-left: 15px; font-weight: bold; font-size: 0.9em; }
+
+.tags .overload .overload_item { list-style: none; margin-bottom: 25px; }
+.tags .overload .overload_item .signature {
+ padding: 2px 8px;
+ background: #e5e8ff; border: 1px solid #d8d8e5; -moz-border-radius: 3px; -webkit-border-radius: 3px;
+}
+.tags .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; }
+.tags .overload .docstring { margin-top: 15px; }
+
+.defines { display: none; }
+
+#method_missing_details .notice.this { position: relative; top: -8px; color: #888; padding: 0; margin: 0; }
+
+.showSource { font-size: 0.9em; }
+.showSource a:link, .showSource a:visited { text-decoration: none; color: #666; }
+
+#content a:link, #content a:visited { text-decoration: none; color: #05a; }
+#content a:hover { background: #ffffa5; }
+div.docstring, p.docstring { margin-right: 6em; }
+
+ul.summary {
+ list-style: none;
+ font-family: monospace;
+ font-size: 1em;
+ line-height: 1.5em;
+}
+ul.summary a:link, ul.summary a:visited {
+ text-decoration: none; font-size: 1.1em;
+}
+ul.summary li { margin-bottom: 5px; }
+.summary .summary_signature {
+ padding: 1px 10px;
+ background: #eaeaff; border: 1px solid #dfdfe5;
+ -moz-border-radius: 3px; -webkit-border-radius: 3px;
+}
+.summary_signature:hover { background: #eeeeff; cursor: pointer; }
+ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;}
+ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; }
+#content .summary_signature:hover a:link,
+#content .summary_signature:hover a:visited {
+ background: transparent;
+ color: #48f;
+}
+
+p.inherited a { font-family: monospace; font-size: 0.9em; }
+p.inherited { word-spacing: 5px; font-size: 1.2em; }
+
+p.children { font-size: 1.2em; }
+p.children a { font-size: 0.9em; }
+p.children strong { font-size: 0.8em; }
+p.children strong.modules { padding-left: 5px; }
+
+ul.fullTree { display: none; padding-left: 0; list-style: none; margin-left: 0; margin-bottom: 10px; }
+ul.fullTree ul { margin-left: 0; padding-left: 0; list-style: none; }
+ul.fullTree li { text-align: center; padding-top: 18px; padding-bottom: 12px; background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHtJREFUeNqMzrEJAkEURdGzuhgZbSoYWcAWoBVsB4JgZAGmphsZCZYzTQgWNCYrDN9RvMmHx+X916SUBFbo8CzD1idXrLErw1mQttgXtyrOcQ/Ny5p4Qh+2XqLYYazsPWNTiuMkRxa4vcV+evuNAUOLIx5+c2hyzv7hNQC67Q+/HHmlEwAAAABJRU5ErkJggg==) no-repeat top center; }
+ul.fullTree li:first-child { padding-top: 0; background: transparent; }
+ul.fullTree li:last-child { padding-bottom: 0; }
+.showAll ul.fullTree { display: block; }
+.showAll .inheritName { display: none; }
+
+#search { position: absolute; right: 14px; top: 0px; }
+#search a:link, #search a:visited {
+ display: block; float: left; margin-right: 4px;
+ padding: 8px 10px; text-decoration: none; color: #05a;
+ border: 1px solid #d8d8e5;
+ -moz-border-radius-bottomleft: 3px; -moz-border-radius-bottomright: 3px;
+ -webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-right-radius: 3px;
+ background: #eaf0ff;
+ -webkit-box-shadow: -1px 1px 3px #ddd;
+}
+#search a:hover { background: #f5faff; color: #06b; }
+#search a.active {
+ background: #568; padding-bottom: 20px; color: #fff; border: 1px solid #457;
+ -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px;
+ -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px;
+}
+#search a.inactive { color: #999; }
+.frames #search { display: none; }
+.inheritanceTree, .toggleDefines { float: right; }
+
+#menu { font-size: 1.3em; color: #bbb; top: -5px; position: relative; }
+#menu .title, #menu a { font-size: 0.7em; }
+#menu .title a { font-size: 1em; }
+#menu .title { color: #555; }
+#menu a:link, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; }
+#menu a:hover { color: #05a; }
+#menu .noframes { display: none; }
+.frames #menu .noframes { display: inline; float: right; }
+
+#footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; }
+#footer a:link, #footer a:visited { color: #444; text-decoration: none; border-bottom: 1px dotted #bbd; }
+#footer a:hover { color: #05a; }
+
+#listing ul.alpha { font-size: 1.1em; }
+#listing ul.alpha { margin: 0; padding: 0; padding-bottom: 10px; list-style: none; }
+#listing ul.alpha li.letter { font-size: 1.4em; padding-bottom: 10px; }
+#listing ul.alpha ul { margin: 0; padding-left: 15px; }
+#listing ul small { color: #666; font-size: 0.7em; }
+
+li.r1 { background: #f0f0f0; }
+li.r2 { background: #fafafa; }
+
+#search_frame {
+ z-index: 9999;
+ background: #fff;
+ display: none;
+ position: absolute;
+ top: 36px;
+ right: 18px;
+ width: 500px;
+ height: 80%;
+ overflow-y: scroll;
+ border: 1px solid #999;
+ border-collapse: collapse;
+ -webkit-box-shadow: -7px 5px 25px #aaa;
+ -moz-box-shadow: -7px 5px 25px #aaa;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+}
+
+#content ul.summary li.deprecated .summary_signature a:link,
+#content ul.summary li.deprecated .summary_signature a:visited { text-decoration: line-through; font-style: italic; }
+
+#toc {
+ padding: 20px; padding-right: 30px; border: 1px solid #ddd; float: right; background: #fff; margin-left: 20px; margin-bottom: 20px;
+ max-width: 300px;
+ -webkit-box-shadow: -2px 2px 6px #bbb;
+ -moz-box-shadow: -2px 2px 6px #bbb;
+ z-index: 5000;
+ position: relative;
+}
+#toc.nofloat { float: none; max-width: none; border: none; padding: 0; margin: 20px 0; -webkit-box-shadow: none; -moz-box-shadow: none; }
+#toc.nofloat.hidden { padding: 0; background: 0; margin-bottom: 5px; }
+#toc .title { margin: 0; }
+#toc ol { padding-left: 1.8em; }
+#toc li { font-size: 1.1em; line-height: 1.7em; }
+#toc > ol > li { font-size: 1.1em; font-weight: bold; }
+#toc ol > ol { font-size: 0.9em; }
+#toc ol ol > ol { padding-left: 2.3em; }
+#toc ol + li { margin-top: 0.3em; }
+#toc.hidden { padding: 10px; background: #f6f6f6; -webkit-box-shadow: none; -moz-box-shadow: none; }
+#filecontents h1 + #toc.nofloat { margin-top: 0; }
+
+/* syntax highlighting */
+.source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; }
+#filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; }
+#filecontents pre.code, .docstring pre.code { display: block; }
+.source_code .lines { padding-right: 12px; color: #555; text-align: right; }
+#filecontents pre.code, .docstring pre.code,
+.tags pre.example { padding: 5px 12px; margin-top: 4px; border: 1px solid #eef; background: #f5f5ff; }
+pre.code { color: #000; }
+pre.code .info.file { color: #555; }
+pre.code .val { color: #036A07; }
+pre.code .tstring_content,
+pre.code .heredoc_beg, pre.code .heredoc_end,
+pre.code .qwords_beg, pre.code .qwords_end,
+pre.code .tstring, pre.code .dstring { color: #036A07; }
+pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s,
+pre.code .rubyid_to_sym, pre.code .rubyid_to_f,
+pre.code .dot + pre.code .id,
+pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; }
+pre.code .comment { color: #0066FF; }
+pre.code .const, pre.code .constant { color: #585CF6; }
+pre.code .symbol { color: #C5060B; }
+pre.code .kw,
+pre.code .label,
+pre.code .rubyid_require,
+pre.code .rubyid_extend,
+pre.code .rubyid_include { color: #0000FF; }
+pre.code .ivar { color: #318495; }
+pre.code .gvar,
+pre.code .rubyid_backref,
+pre.code .rubyid_nth_ref { color: #6D79DE; }
+pre.code .regexp, .dregexp { color: #036A07; }
+pre.code a { border-bottom: 1px dotted #bbf; }
diff --git a/doc/file.LICENSE.html b/doc/file.LICENSE.html
new file mode 100644
index 0000000..09a9fc4
--- /dev/null
+++ b/doc/file.LICENSE.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+ File: LICENSE
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Copyright (c) 2011-2012 Tiejun Cheng
+
+
Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+
The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/file.README.html b/doc/file.README.html
new file mode 100644
index 0000000..2e86b3a
--- /dev/null
+++ b/doc/file.README.html
@@ -0,0 +1,264 @@
+
+
+
+
+
+ File: README
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FSelector: a Ruby package for feature selection and ranking
+
+
Git : https://github.com/need47/fselector
+Author : Tiejun Cheng
+Email : need47@gmail.com
+Copyright : 2011-2012
+License : MIT License
+Latest Version : 0.1.0
+Release Date : March 1st 2012
+
+
Synopsis
+
+
FSelector is an open-access Ruby package that aims to integrate as many
+feature selection/ranking algorithms as possible. It enables the
+user to perform feature selection by either a single algorithm or by an
+ensemble of algorithms. Below is a summary of FSelector's features.
+
+
Feature List
+
+
1. available algorithms
+
+
algorithm alias feature type
+-------------------------------------------------------
+Accuracy Acc discrete
+AccuracyBalanced Acc2 discrete
+BiNormalSeparation BNS discrete
+ChiSquaredTest CHI discrete
+CorrelationCoefficient CC discrete
+DocumentFrequency DF discrete
+F1Measure F1 discrete
+FishersExactTest FET discrete
+GiniIndex GI discrete
+GMean GM discrete
+GSSCoefficient GSS discrete
+InformationGain IG discrete
+MatthewsCorrelationCoefficient MCC, PHI discrete
+McNemarsTest MNT discrete
+OddsRatio OR discrete
+OddsRatioNumerator ORN discrete
+PhiCoefficient Phi discrete
+Power Power discrete
+Precision Precision discrete
+ProbabilityRatio PR discrete
+Random Random discrete
+Recall Recall discrete
+Relief_d Relief_d discrete
+ReliefF_d ReliefF_d discrete
+Sensitivity SN, Recall discrete
+Specificity SP discrete
+PMetric PM continuous
+Relief_c Relief_c continuous
+ReliefF_c ReliefF_c continuous
+TScore TS continuous
+
+
+
2. feature selection approaches
+
+
+by a single algorithm
+by multiple algorithms in a tandem manner
+by multiple algorithms in a consensus manner
+
+
+
3. availabe normalization and discretization algorithms for continuous feature
+
+
algorithm note
+--------------------------------------------------------------------
+log normalization by logarithmic transformation
+min_max normalization by scaling into [min, max]
+zscore normalization by converting into zscore
+equal_width discretization by equal width among intervals
+equal_frequency discretization by equal frequency among intervals
+ChiMerge discretization by ChiMerge method
+
+
+
4. supported input/output file types
+
+
+csv
+libsvm
+weka ARFF
+random (for test purpose)
+
+
+
Installing
+
+
To install FSelector, use the following command:
+
+
$ gem install fselector
+
+
+
Usage
+
+
1. feature selection by a single algorithm
+
+
require ' fselector '
+
+r1 = FSelector :: InformationGain . new
+
+r1 . data_from_random ( 100 , 2 , 10 , 3 , true )
+
+puts " # features (before): " + r1 . get_features . size . to_s
+
+r1 . select_data_by_score! ( ' >0.01 ' )
+
+puts " # features (after): " + r1 . get_features . size . to_s
+
+r2 = FSelector :: ChiSquaredTest . new ( :yates , r1 . get_data )
+
+puts " # features (before): " + r2 . get_features . size . to_s
+
+r2 . select_data_by_rank! ( ' <=3 ' )
+
+puts " # features (after): " + r2 . get_features . size . to_s
+
+r2 . data_to_weka ( :stdout , :sparse )
+
+
+
2. feature selection by an ensemble of algorithms
+
+
require ' fselector '
+
+r1 = FSelector :: InformationGain . new
+r2 = FSelector :: ChiSquaredTest . new
+
+re = FSelector :: Ensemble . new ( r1 , r2 )
+
+re . data_from_random ( 100 , 2 , 10 , 3 , true )
+
+puts ' # features before feature selection: ' + re . get_features . size . to_s
+
+re . ensemble_by_rank ( re . method ( :by_min ) )
+
+re . select_data_by_rank! ( ' <=3 ' )
+
+puts ' # features before feature selection: ' + re . get_features . size . to_s
+
+
+
3. normalization and discretization before feature selection
+
+
In addition to the algorithms designed for continous feature, one
+ can apply those deisgned for discrete feature after (optionally
+ normalization and) discretization
+
+
require ' fselector '
+
+r1 = FSelector :: BaseContinuous . new
+
+r1 . data_from_csv ( File . expand_path ( File . dirname ( __FILE__ ) ) + ' /iris.csv ' )
+
+
+r1 . discretize_chimerge! ( 4.60 )
+
+r2 = FSelector :: ReliefF_d . new ( r1 . get_sample_size , 10 , r1 . get_data )
+
+r2 . print_feature_ranks
+
+
+
Copyright
+
+
FSelector © 2011-2012 by Tiejun Cheng .
+FSelector is licensed under the MIT license. Please see the LICENSE for
+more information.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/file.VERSION.html b/doc/file.VERSION.html
new file mode 100644
index 0000000..d79de7c
--- /dev/null
+++ b/doc/file.VERSION.html
@@ -0,0 +1,67 @@
+
+
+
+
+
+ File: VERSION
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/file_list.html b/doc/file_list.html
new file mode 100644
index 0000000..b552e56
--- /dev/null
+++ b/doc/file_list.html
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/frames.html b/doc/frames.html
new file mode 100644
index 0000000..ff4a68c
--- /dev/null
+++ b/doc/frames.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+ Documentation by YARD 0.7.5
+
+
+
+
+
+
diff --git a/doc/index.html b/doc/index.html
new file mode 100644
index 0000000..2e86b3a
--- /dev/null
+++ b/doc/index.html
@@ -0,0 +1,264 @@
+
+
+
+
+
+ File: README
+
+ — Documentation by YARD 0.7.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FSelector: a Ruby package for feature selection and ranking
+
+
Git : https://github.com/need47/fselector
+Author : Tiejun Cheng
+Email : need47@gmail.com
+Copyright : 2011-2012
+License : MIT License
+Latest Version : 0.1.0
+Release Date : March 1st 2012
+
+
Synopsis
+
+
FSelector is an open-access Ruby package that aims to integrate as many
+feature selection/ranking algorithms as possible. It enables the
+user to perform feature selection by either a single algorithm or by an
+ensemble of algorithms. Below is a summary of FSelector's features.
+
+
Feature List
+
+
1. available algorithms
+
+
algorithm alias feature type
+-------------------------------------------------------
+Accuracy Acc discrete
+AccuracyBalanced Acc2 discrete
+BiNormalSeparation BNS discrete
+ChiSquaredTest CHI discrete
+CorrelationCoefficient CC discrete
+DocumentFrequency DF discrete
+F1Measure F1 discrete
+FishersExactTest FET discrete
+GiniIndex GI discrete
+GMean GM discrete
+GSSCoefficient GSS discrete
+InformationGain IG discrete
+MatthewsCorrelationCoefficient MCC, PHI discrete
+McNemarsTest MNT discrete
+OddsRatio OR discrete
+OddsRatioNumerator ORN discrete
+PhiCoefficient Phi discrete
+Power Power discrete
+Precision Precision discrete
+ProbabilityRatio PR discrete
+Random Random discrete
+Recall Recall discrete
+Relief_d Relief_d discrete
+ReliefF_d ReliefF_d discrete
+Sensitivity SN, Recall discrete
+Specificity SP discrete
+PMetric PM continuous
+Relief_c Relief_c continuous
+ReliefF_c ReliefF_c continuous
+TScore TS continuous
+
+
+
2. feature selection approaches
+
+
+by a single algorithm
+by multiple algorithms in a tandem manner
+by multiple algorithms in a consensus manner
+
+
+
3. availabe normalization and discretization algorithms for continuous feature
+
+
algorithm note
+--------------------------------------------------------------------
+log normalization by logarithmic transformation
+min_max normalization by scaling into [min, max]
+zscore normalization by converting into zscore
+equal_width discretization by equal width among intervals
+equal_frequency discretization by equal frequency among intervals
+ChiMerge discretization by ChiMerge method
+
+
+
4. supported input/output file types
+
+
+csv
+libsvm
+weka ARFF
+random (for test purpose)
+
+
+
Installing
+
+
To install FSelector, use the following command:
+
+
$ gem install fselector
+
+
+
Usage
+
+
1. feature selection by a single algorithm
+
+
require ' fselector '
+
+r1 = FSelector :: InformationGain . new
+
+r1 . data_from_random ( 100 , 2 , 10 , 3 , true )
+
+puts " # features (before): " + r1 . get_features . size . to_s
+
+r1 . select_data_by_score! ( ' >0.01 ' )
+
+puts " # features (after): " + r1 . get_features . size . to_s
+
+r2 = FSelector :: ChiSquaredTest . new ( :yates , r1 . get_data )
+
+puts " # features (before): " + r2 . get_features . size . to_s
+
+r2 . select_data_by_rank! ( ' <=3 ' )
+
+puts " # features (after): " + r2 . get_features . size . to_s
+
+r2 . data_to_weka ( :stdout , :sparse )
+
+
+
2. feature selection by an ensemble of algorithms
+
+
require ' fselector '
+
+r1 = FSelector :: InformationGain . new
+r2 = FSelector :: ChiSquaredTest . new
+
+re = FSelector :: Ensemble . new ( r1 , r2 )
+
+re . data_from_random ( 100 , 2 , 10 , 3 , true )
+
+puts ' # features before feature selection: ' + re . get_features . size . to_s
+
+re . ensemble_by_rank ( re . method ( :by_min ) )
+
+re . select_data_by_rank! ( ' <=3 ' )
+
+puts ' # features before feature selection: ' + re . get_features . size . to_s
+
+
+
3. normalization and discretization before feature selection
+
+
In addition to the algorithms designed for continous feature, one
+ can apply those deisgned for discrete feature after (optionally
+ normalization and) discretization
+
+
require ' fselector '
+
+r1 = FSelector :: BaseContinuous . new
+
+r1 . data_from_csv ( File . expand_path ( File . dirname ( __FILE__ ) ) + ' /iris.csv ' )
+
+
+r1 . discretize_chimerge! ( 4.60 )
+
+r2 = FSelector :: ReliefF_d . new ( r1 . get_sample_size , 10 , r1 . get_data )
+
+r2 . print_feature_ranks
+
+
+
Copyright
+
+
FSelector © 2011-2012 by Tiejun Cheng .
+FSelector is licensed under the MIT license. Please see the LICENSE for
+more information.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/js/app.js b/doc/js/app.js
new file mode 100644
index 0000000..1b4e04b
--- /dev/null
+++ b/doc/js/app.js
@@ -0,0 +1,205 @@
+function createSourceLinks() {
+ $('.method_details_list .source_code').
+ before("[View source ] ");
+ $('.toggleSource').toggle(function() {
+ $(this).parent().nextAll('.source_code').slideDown(100);
+ $(this).text("Hide source");
+ },
+ function() {
+ $(this).parent().nextAll('.source_code').slideUp(100);
+ $(this).text("View source");
+ });
+}
+
+function createDefineLinks() {
+ var tHeight = 0;
+ $('.defines').after(" more... ");
+ $('.toggleDefines').toggle(function() {
+ tHeight = $(this).parent().prev().height();
+ $(this).prev().show();
+ $(this).parent().prev().height($(this).parent().height());
+ $(this).text("(less)");
+ },
+ function() {
+ $(this).prev().hide();
+ $(this).parent().prev().height(tHeight);
+ $(this).text("more...");
+ });
+}
+
+function createFullTreeLinks() {
+ var tHeight = 0;
+ $('.inheritanceTree').toggle(function() {
+ tHeight = $(this).parent().prev().height();
+ $(this).parent().toggleClass('showAll');
+ $(this).text("(hide)");
+ $(this).parent().prev().height($(this).parent().height());
+ },
+ function() {
+ $(this).parent().toggleClass('showAll');
+ $(this).parent().prev().height(tHeight);
+ $(this).text("show all");
+ });
+}
+
+function fixBoxInfoHeights() {
+ $('dl.box dd.r1, dl.box dd.r2').each(function() {
+ $(this).prev().height($(this).height());
+ });
+}
+
+function searchFrameLinks() {
+ $('#method_list_link').click(function() {
+ toggleSearchFrame(this, relpath + 'method_list.html');
+ });
+
+ $('#class_list_link').click(function() {
+ toggleSearchFrame(this, relpath + 'class_list.html');
+ });
+
+ $('#file_list_link').click(function() {
+ toggleSearchFrame(this, relpath + 'file_list.html');
+ });
+}
+
+function toggleSearchFrame(id, link) {
+ var frame = $('#search_frame');
+ $('#search a').removeClass('active').addClass('inactive');
+ if (frame.attr('src') == link && frame.css('display') != "none") {
+ frame.slideUp(100);
+ $('#search a').removeClass('active inactive');
+ }
+ else {
+ $(id).addClass('active').removeClass('inactive');
+ frame.attr('src', link).slideDown(100);
+ }
+}
+
+function linkSummaries() {
+ $('.summary_signature').click(function() {
+ document.location = $(this).find('a').attr('href');
+ });
+}
+
+function framesInit() {
+ if (window.top.frames.main) {
+ document.body.className = 'frames';
+ $('#menu .noframes a').attr('href', document.location);
+ $('html head title', window.parent.document).text($('html head title').text());
+ }
+}
+
+function keyboardShortcuts() {
+ if (window.top.frames.main) return;
+ $(document).keypress(function(evt) {
+ if (evt.altKey || evt.ctrlKey || evt.metaKey || evt.shiftKey) return;
+ if (typeof evt.target !== "undefined" &&
+ (evt.target.nodeName == "INPUT" ||
+ evt.target.nodeName == "TEXTAREA")) return;
+ switch (evt.charCode) {
+ case 67: case 99: $('#class_list_link').click(); break; // 'c'
+ case 77: case 109: $('#method_list_link').click(); break; // 'm'
+ case 70: case 102: $('#file_list_link').click(); break; // 'f'
+ default: break;
+ }
+ });
+}
+
+function summaryToggle() {
+ $('.summary_toggle').click(function() {
+ localStorage.summaryCollapsed = $(this).text();
+ $(this).text($(this).text() == "collapse" ? "expand" : "collapse");
+ var next = $(this).parent().parent().nextAll('ul.summary').first();
+ if (next.hasClass('compact')) {
+ next.toggle();
+ next.nextAll('ul.summary').first().toggle();
+ }
+ else if (next.hasClass('summary')) {
+ var list = $('');
+ list.html(next.html());
+ list.find('.summary_desc, .note').remove();
+ list.find('a').each(function() {
+ $(this).html($(this).find('strong').html());
+ $(this).parent().html($(this)[0].outerHTML);
+ });
+ next.before(list);
+ next.toggle();
+ }
+ return false;
+ });
+ if (localStorage) {
+ if (localStorage.summaryCollapsed == "collapse") $('.summary_toggle').click();
+ else localStorage.summaryCollapsed = "expand";
+ }
+}
+
+function fixOutsideWorldLinks() {
+ $('a').each(function() {
+ if (window.location.host != this.host) this.target = '_parent';
+ });
+}
+
+function generateTOC() {
+ if ($('#filecontents').length === 0) return;
+ var _toc = $(' ');
+ var show = false;
+ var toc = _toc;
+ var counter = 0;
+ var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
+ var i;
+ if ($('#filecontents h1').length > 1) tags.unshift('h1');
+ for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
+ var lastTag = parseInt(tags[0][1], 10);
+ $(tags.join(', ')).each(function() {
+ if (this.id == "filecontents") return;
+ show = true;
+ var thisTag = parseInt(this.tagName[1], 10);
+ if (this.id.length === 0) {
+ var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_');
+ if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; }
+ this.id = proposedId;
+ }
+ if (thisTag > lastTag) {
+ for (i = 0; i < thisTag - lastTag; i++) {
+ var tmp = $(' '); toc.append(tmp); toc = tmp;
+ }
+ }
+ if (thisTag < lastTag) {
+ for (i = 0; i < lastTag - thisTag; i++) toc = toc.parent();
+ }
+ toc.append(' ' + $(this).text() + ' ');
+ lastTag = thisTag;
+ });
+ if (!show) return;
+ html = '';
+ $('#content').prepend(html);
+ $('#toc').append(_toc);
+ $('#toc .hide_toc').toggle(function() {
+ $('#toc .top').slideUp('fast');
+ $('#toc').toggleClass('hidden');
+ $('#toc .title small').toggle();
+ }, function() {
+ $('#toc .top').slideDown('fast');
+ $('#toc').toggleClass('hidden');
+ $('#toc .title small').toggle();
+ });
+ $('#toc .float_toc').toggle(function() {
+ $(this).text('float');
+ $('#toc').toggleClass('nofloat');
+ }, function() {
+ $(this).text('left');
+ $('#toc').toggleClass('nofloat');
+ });
+}
+
+$(framesInit);
+$(createSourceLinks);
+$(createDefineLinks);
+$(createFullTreeLinks);
+$(fixBoxInfoHeights);
+$(searchFrameLinks);
+$(linkSummaries);
+$(keyboardShortcuts);
+$(summaryToggle);
+$(fixOutsideWorldLinks);
+$(generateTOC);
\ No newline at end of file
diff --git a/doc/js/full_list.js b/doc/js/full_list.js
new file mode 100644
index 0000000..9ffaa6d
--- /dev/null
+++ b/doc/js/full_list.js
@@ -0,0 +1,173 @@
+var inSearch = null;
+var searchIndex = 0;
+var searchCache = [];
+var searchString = '';
+var regexSearchString = '';
+var caseSensitiveMatch = false;
+var ignoreKeyCodeMin = 8;
+var ignoreKeyCodeMax = 46;
+var commandKey = 91;
+
+RegExp.escape = function(text) {
+ return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+}
+
+function fullListSearch() {
+ // generate cache
+ searchCache = [];
+ $('#full_list li').each(function() {
+ var link = $(this).find('.object_link a');
+ var fullName = link.attr('title').split(' ')[0];
+ searchCache.push({name:link.text(), fullName:fullName, node:$(this), link:link});
+ });
+
+ $('#search input').keyup(function() {
+ if ((event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax)
+ || event.keyCode == commandKey)
+ return;
+ searchString = this.value;
+ caseSensitiveMatch = searchString.match(/[A-Z]/) != null;
+ regexSearchString = RegExp.escape(searchString);
+ if (caseSensitiveMatch) {
+ regexSearchString += "|" +
+ $.map(searchString.split(''), function(e) { return RegExp.escape(e); }).
+ join('.+?');
+ }
+ if (searchString === "") {
+ clearTimeout(inSearch);
+ inSearch = null;
+ $('ul .search_uncollapsed').removeClass('search_uncollapsed');
+ $('#full_list, #content').removeClass('insearch');
+ $('#full_list li').removeClass('found').each(function() {
+
+ var link = $(this).find('.object_link a');
+ link.text(link.text());
+ });
+ if (clicked) {
+ clicked.parents('ul').each(function() {
+ $(this).removeClass('collapsed').prev().removeClass('collapsed');
+ });
+ }
+ highlight();
+ }
+ else {
+ if (inSearch) clearTimeout(inSearch);
+ searchIndex = 0;
+ lastRowClass = '';
+ $('#full_list, #content').addClass('insearch');
+ $('#noresults').text('');
+ searchItem();
+ }
+ });
+
+ $('#search input').focus();
+ $('#full_list').after("
");
+}
+
+var lastRowClass = '';
+function searchItem() {
+ for (var i = 0; i < searchCache.length / 50; i++) {
+ var item = searchCache[searchIndex];
+ var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name);
+ var matchString = regexSearchString;
+ var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i");
+ if (searchName.match(matchRegexp) == null) {
+ item.node.removeClass('found');
+ }
+ else {
+ item.node.css('padding-left', '10px').addClass('found');
+ item.node.parents().addClass('search_uncollapsed');
+ item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1');
+ lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2';
+ item.link.html(item.name.replace(matchRegexp, "$& "));
+ }
+
+ if (searchCache.length === searchIndex + 1) {
+ searchDone();
+ return;
+ }
+ else {
+ searchIndex++;
+ }
+ }
+ inSearch = setTimeout('searchItem()', 0);
+}
+
+function searchDone() {
+ highlight(true);
+ if ($('#full_list li:visible').size() === 0) {
+ $('#noresults').text('No results were found.').hide().fadeIn();
+ }
+ else {
+ $('#noresults').text('');
+ }
+ $('#content').removeClass('insearch');
+ clearTimeout(inSearch);
+ inSearch = null;
+}
+
+clicked = null;
+function linkList() {
+ $('#full_list li, #full_list li a:last').click(function(evt) {
+ if ($(this).hasClass('toggle')) return true;
+ if (this.tagName.toLowerCase() == "li") {
+ var toggle = $(this).children('a.toggle');
+ if (toggle.size() > 0 && evt.pageX < toggle.offset().left) {
+ toggle.click();
+ return false;
+ }
+ }
+ if (clicked) clicked.removeClass('clicked');
+ var win = window.top.frames.main ? window.top.frames.main : window.parent;
+ if (this.tagName.toLowerCase() == "a") {
+ clicked = $(this).parent('li').addClass('clicked');
+ win.location = this.href;
+ }
+ else {
+ clicked = $(this).addClass('clicked');
+ win.location = $(this).find('a:last').attr('href');
+ }
+ return false;
+ });
+}
+
+function collapse() {
+ if (!$('#full_list').hasClass('class')) return;
+ $('#full_list.class a.toggle').click(function() {
+ $(this).parent().toggleClass('collapsed').next().toggleClass('collapsed');
+ highlight();
+ return false;
+ });
+ $('#full_list.class ul').each(function() {
+ $(this).addClass('collapsed').prev().addClass('collapsed');
+ });
+ $('#full_list.class').children().removeClass('collapsed');
+ highlight();
+}
+
+function highlight(no_padding) {
+ var n = 1;
+ $('#full_list li:visible').each(function() {
+ var next = n == 1 ? 2 : 1;
+ $(this).removeClass("r" + next).addClass("r" + n);
+ if (!no_padding && $('#full_list').hasClass('class')) {
+ $(this).css('padding-left', (10 + $(this).parents('ul').size() * 15) + 'px');
+ }
+ n = next;
+ });
+}
+
+function escapeShortcut() {
+ $(document).keydown(function(evt) {
+ if (evt.which == 27) {
+ $('#search_frame', window.top.document).slideUp(100);
+ $('#search a', window.top.document).removeClass('active inactive');
+ $(window.top).focus();
+ }
+ });
+}
+
+$(escapeShortcut);
+$(fullListSearch);
+$(linkList);
+$(collapse);
diff --git a/doc/js/jquery.js b/doc/js/jquery.js
new file mode 100644
index 0000000..f78f96a
--- /dev/null
+++ b/doc/js/jquery.js
@@ -0,0 +1,16 @@
+/*!
+ * jQuery JavaScript Library v1.5.2
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Mar 31 15:28:23 2011 -0400
+ */
+(function(a,b){function ci(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cf(a){if(!b_[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";b_[a]=c}return b_[a]}function ce(a,b){var c={};d.each(cd.concat.apply([],cd.slice(0,b)),function(){c[this]=a});return c}function b$(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bZ(){try{return new a.XMLHttpRequest}catch(b){}}function bY(){d(a).unload(function(){for(var a in bW)bW[a](0,1)})}function bS(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g=0===c})}function P(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function H(a,b){return(a&&a!=="*"?a+".":"")+b.replace(t,"`").replace(u,"&")}function G(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,p=[],q=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function E(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function y(){return!0}function x(){return!1}function i(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function h(a,c,e){if(e===b&&a.nodeType===1){e=a.getAttribute("data-"+c);if(typeof e==="string"){try{e=e==="true"?!0:e==="false"?!1:e==="null"?null:d.isNaN(e)?g.test(e)?d.parseJSON(e):e:parseFloat(e)}catch(f){}d.data(a,c,e)}else e=b}return e}var c=a.document,d=function(){function G(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(G,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x,y,z=Object.prototype.toString,A=Object.prototype.hasOwnProperty,B=Array.prototype.push,C=Array.prototype.slice,D=String.prototype.trim,E=Array.prototype.indexOf,F={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return C.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?B.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),x.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(C.apply(this,arguments),"slice",C.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:B,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;x.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=d._Deferred();if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",y,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",y),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&G()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):F[z.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!A.call(a,"constructor")&&!A.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||A.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1?f.call(arguments,0):c,--g||h.resolveWith(h,f.call(b,0))}}var b=arguments,c=0,e=b.length,g=e,h=e<=1&&a&&d.isFunction(a.promise)?a:d.Deferred();if(e>1){for(;ca ";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0,reliableMarginRight:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e)}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML=" ";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(a.style.width="1px",a.style.marginRight="0",d.support.reliableMarginRight=(parseInt(c.defaultView.getComputedStyle(a,null).marginRight,10)||0)===0),b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function");return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}}();var g=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!i(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,j=g?b[d.expando]:d.expando;if(!h[j])return;if(c){var k=e?h[j][f]:h[j];if(k){delete k[c];if(!i(k))return}}if(e){delete h[j][f];if(!i(h[j]))return}var l=h[j][f];d.support.deleteExpando||h!=a?delete h[j]:h[j]=null,l?(h[j]={},g||(h[j].toJSON=d.noop),h[j][f]=l):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var f=this[0].attributes,g;for(var i=0,j=f.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var j=i?f:0,k=i?f+1:h.length;j=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=m.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&n.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var k=a.getAttributeNode("tabIndex");return k&&k.specified?k.value:o.test(a.nodeName)||p.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var l=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return l===null?b:l}h&&(a[c]=e);return a[c]}});var r=/\.(.*)$/,s=/^(?:textarea|input|select)$/i,t=/\./g,u=/ /g,v=/[^\w\s.|`]/g,w=function(a){return a.replace(v,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=x;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(a){return typeof d!=="undefined"&&d.event.triggered!==a.type?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=x);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),w).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(r,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=a.type,l[m]())}catch(p){}k&&(l["on"+m]=k),d.event.triggered=b}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},D=function D(a){var c=a.target,e,f;if(s.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=C(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:D,beforedeactivate:D,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&D.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&D.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",C(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in B)d.event.add(this,c+".specialChange",B[c]);return s.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return s.test(this.nodeName)}},B=d.event.special.change.filters,B.focus=B.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function f(a){var c=d.event.fix(a);c.type=b,c.originalEvent={},d.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var e=0;d.event.special[b]={setup:function(){e++===0&&c.addEventListener(a,f,!0)},teardown:function(){--e===0&&c.removeEventListener(a,f,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return"text"===c&&(b===c||b===null)},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c ",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML=" ",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="
";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=N.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(P(c[0])||P(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=M.call(arguments);I.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!O[a]?d.unique(f):f,(this.length>1||K.test(e))&&J.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var R=/ jQuery\d+="(?:\d+|null)"/g,S=/^\s+/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,U=/<([\w:]+)/,V=/",""],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]};Z.optgroup=Z.option,Z.tbody=Z.tfoot=Z.colgroup=Z.caption=Z.thead,Z.th=Z.td,d.support.htmlSerialize||(Z._default=[1,"div","
"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(R,""):null;if(typeof a!=="string"||X.test(a)||!d.support.leadingWhitespace&&S.test(a)||Z[(U.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(T,"<$1>$2>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){ba(a,e),f=bb(a),g=bb(e);for(h=0;f[h];++h)ba(f[h],g[h])}if(b){_(a,e);if(c){f=bb(a),g=bb(e);for(h=0;f[h];++h)_(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||W.test(i)){if(typeof i==="string"){i=i.replace(T,"<$1>$2>");var j=(U.exec(i)||["",""])[1].toLowerCase(),k=Z[j]||Z._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=V.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&S.test(i)&&m.insertBefore(b.createTextNode(S.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bd=/alpha\([^)]*\)/i,be=/opacity=([^)]*)/,bf=/-([a-z])/ig,bg=/([A-Z]|^ms)/g,bh=/^-?\d+(?:px)?$/i,bi=/^-?\d/,bj={position:"absolute",visibility:"hidden",display:"block"},bk=["Left","Right"],bl=["Top","Bottom"],bm,bn,bo,bp=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bm(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bm)return bm(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bf,bp)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bq(a,b,e):d.swap(a,bj,function(){f=bq(a,b,e)});if(f<=0){f=bm(a,b,b),f==="0px"&&bo&&(f=bo(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bh.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return be.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bd.test(f)?f.replace(bd,e):c.filter+" "+e}}),d(function(){d.support.reliableMarginRight||(d.cssHooks.marginRight={get:function(a,b){var c;d.swap(a,{display:"inline-block"},function(){b?c=bm(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bn=function(a,c,e){var f,g,h;e=e.replace(bg,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bo=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bh.test(d)&&bi.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bm=bn||bo,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var br=/%20/g,bs=/\[\]$/,bt=/\r?\n/g,bu=/#.*$/,bv=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bw=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bx=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,by=/^(?:GET|HEAD)$/,bz=/^\/\//,bA=/\?/,bB=/
+
+
+
+
+
+
+
+
+
+
+