Class: Num4GLMRegAnaLib::ProBitRegAnaLib
- Inherits:
-
Object
- Object
- Num4GLMRegAnaLib::ProBitRegAnaLib
- Defined in:
- lib/num4glmregana.rb
Overview
プロビット回帰分析
Instance Method Summary collapse
-
#get_aic(regcoe, xij) ⇒ Object
AIC.
-
#initialize ⇒ ProBitRegAnaLib
constructor
A new instance of ProBitRegAnaLib.
-
#non_line_reg_ana(yi, xij) ⇒ Hash
プロビット回帰分析.
Constructor Details
#initialize ⇒ ProBitRegAnaLib
Returns a new instance of ProBitRegAnaLib.
181 182 183 |
# File 'lib/num4glmregana.rb', line 181 def initialize @multana = ProBitRegAna.getInstance() end |
Instance Method Details
#get_aic(regcoe, xij) ⇒ Object
AIC
277 278 279 280 281 282 |
# File 'lib/num4glmregana.rb', line 277 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
プロビット回帰分析
227 228 229 230 231 232 233 234 |
# File 'lib/num4glmregana.rb', line 227 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 |