Class: Num4GLMRegAnaLib::LogitRegAnaLib
- Inherits:
-
Object
- Object
- Num4GLMRegAnaLib::LogitRegAnaLib
- Defined in:
- lib/num4glmregana.rb
Overview
(2項)ロジスティック回帰分析
Instance Method Summary collapse
-
#get_aic(regcoe, xij) ⇒ Object
AIC.
-
#initialize ⇒ LogitRegAnaLib
constructor
A new instance of LogitRegAnaLib.
-
#non_line_reg_ana(yi, xij) ⇒ Hash
(2項)ロジスティック回帰分析.
Constructor Details
#initialize ⇒ LogitRegAnaLib
Returns a new instance of LogitRegAnaLib.
15 16 17 |
# File 'lib/num4glmregana.rb', line 15 def initialize @multana = LogitRegAna.getInstance() end |
Instance Method Details
#get_aic(regcoe, xij) ⇒ Object
AIC
111 112 113 114 115 116 |
# File 'lib/num4glmregana.rb', line 111 def get_aic(regcoe, xij) o = HashMap.new o["intercept"] = regcoe[:intercept] o["slope"] = regcoe[:slope].to_java(Java::double) @multana.getAIC(o, xij.to_java(Java::double[])) end |
#non_line_reg_ana(yi, xij) ⇒ Hash
(2項)ロジスティック回帰分析
61 62 63 64 65 66 67 68 |
# File 'lib/num4glmregana.rb', line 61 def non_line_reg_ana(yi, xij) multRet = @multana.nonLineRegAna(yi.to_java(Java::double), xij.to_java(Java::double[])) retRb = { "intercept": multRet.getIntercept(), # 定数項 "slope": multRet.getSlope().to_a, # 回帰係数 } return retRb end |