Class: Num4GLMRegAnaLib::PoissonRegAnaLib
- Inherits:
-
Object
- Object
- Num4GLMRegAnaLib::PoissonRegAnaLib
- Defined in:
- lib/num4glmregana.rb
Overview
ポアソン回帰分析
Instance Method Summary collapse
-
#get_aic(regcoe, xij) ⇒ Object
AIC.
-
#initialize ⇒ PoissonRegAnaLib
constructor
A new instance of PoissonRegAnaLib.
-
#non_line_reg_ana(yi, xij) ⇒ Hash
ポアソン回帰分析.
Constructor Details
#initialize ⇒ PoissonRegAnaLib
Returns a new instance of PoissonRegAnaLib.
120 121 122 |
# File 'lib/num4glmregana.rb', line 120 def initialize @multana = PoissonRegAna.getInstance() end |
Instance Method Details
#get_aic(regcoe, xij) ⇒ Object
AIC
172 173 174 175 176 177 |
# File 'lib/num4glmregana.rb', line 172 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
ポアソン回帰分析
144 145 146 147 148 149 150 151 |
# File 'lib/num4glmregana.rb', line 144 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 |