org.mklab.tool.matrix
クラス Cov

java.lang.Object
  上位を拡張 org.mklab.tool.matrix.Cov

public class Cov
extends Object

分散を求めるクラスです。

Covariance

バージョン:
$Revision: 1.18 $
作成者:
koga
関連項目:
Corrcoef

コンストラクタの概要
Cov()
           
 
メソッドの概要
static NumericalScalar<?> cov(Matrix x)
          ベクトル x の成分の分散を求めます。
static NumericalScalar<?> cov(Matrix x, Matrix y)
          cov([x y])を返します。
static Matrix covColumnWise(Matrix x)
          もしx が行毎データが並ぶ行列なら、分散行列を返します。
static Matrix covColumnWise(Matrix x, Matrix y)
           
static Matrix covRowWise(Matrix x)
          もし x が、列毎にデータ並ぶ行列なら、分散行列を返します。
static Matrix covRowWise(Matrix x, Matrix y)
           
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Cov

public Cov()
メソッドの詳細

cov

public static NumericalScalar<?> cov(Matrix x)
ベクトル x の成分の分散を求めます。

パラメータ:
x - データ
戻り値:
自己分散 (Covariance)

cov

public static NumericalScalar<?> cov(Matrix x,
                                     Matrix y)
cov([x y])を返します。

パラメータ:
x - データ1
y - データ2
戻り値:
共分散 (Covariance)

covColumnWise

public static Matrix covColumnWise(Matrix x)
もしx が行毎データが並ぶ行列なら、分散行列を返します。

diag_vec(cov_col(x)) は、各列の分散が並ぶベクトルであり、 sqrt(diag_vec(cov_col(x))) は、標準偏差です。

パラメータ:
x - データ
戻り値:
自己分散 (Covariance)

covColumnWise

public static Matrix covColumnWise(Matrix x,
                                   Matrix y)
パラメータ:
x - データ1
y - データ2
戻り値:
共分散 (Covariance)

covRowWise

public static Matrix covRowWise(Matrix x)
もし x が、列毎にデータ並ぶ行列なら、分散行列を返します。

diag_vec(cov_row(x)) は、各行の分散が並ぶベクトルであり、 sqrt(diag_vec(cov_row(x))) は、標準偏差です。

パラメータ:
x - データ
戻り値:
自己分散 (Covariance)

covRowWise

public static Matrix covRowWise(Matrix x,
                                Matrix y)
パラメータ:
x - データ1
y - データ2
戻り値:
共分散 (Covariance)