hmmlearn.hmm API中文 |
您所在的位置:网站首页 › 期权品种有哪些 › hmmlearn.hmm API中文 |
decode(X, lengths=None, algorithm=None) 找出最可能与X对应的状态序列 参数数据类型意义Xarray-like, shape (n_samples, n_features)个体样本的特征矩阵lengthsarray-like of integers, shape (n_sequences, ), optionalX中个体序列的长度,其总和应为n_samplesalgorithmstring解码器算法,必须是“viterbi” or “map”,如果没有指定则用decoder 返回数据类型意义logprobfloat所生成状态序列的对数概率state_sequencearray, shape (n_samples, )依据algorithm加密器获得的X中每个样本的标签fit(X, lengths=None) 估算模型参数 进入EM算法之前执行的初始化步骤。如果你想获得参数集的子集以避免这一步,可以通过init_params传递关键字参数给评估构造器。 参数数据类型意义Xarray-like, shape (n_samples, n_features)个体样本的特征矩阵lengthsarray-like of integers, shape (n_sequences, )X中个体序列的长度。其总和是n_samples 返回数据类型意义selfobjectselfget_stationary_distribution() 计算状态的平稳分布 predict(X, lengths=None) 找出与X最一致的状态序列 参数数据类型意义Xarray-like, shape (n_samples, n_features)个体样本的特征矩阵lengthsarray-like of integers, shape (n_sequences, )X中个体序列的长度。其总和是n_samples 返回数据类型意义state_sequencearray, shape (n_samples, )X中每个样本的标签predict_proba(X, lengths=None) 计算模型中每个状态的后验概率 参数数据类型意义Xarray-like, shape (n_samples, n_features)个体样本的特征矩阵lengthsarray-like of integers, shape (n_sequences, )X中个体序列的长度。其总和是n_samples 返回数据类型意义posteriorsarray, shape (n_samples, n_components)X中每个样本的状态成员概率sample(n_samples=1, random_state=None) 从模型中生成随机样本 参数数据类型意义n_samplesint生成样本的数量random_stateRandomState or an int seed一个随机数生成器示例。如果是None,使用对象的random_state 返回数据类型意义Xarray, shape (n_samples, n_features)特征矩阵state_sequencearray, shape (n_samples, )此模型生成的状态系列score(X, lengths=None) 计算模型下的对数概率 参数数据类型意义Xarray-like, shape (n_samples, n_features)单个样本的特征矩阵lengthsarray-like of integers, shape (n_sequences, ), optionalX中单序列的长度,其和应该是n_samples 返回数据类型意义logprobfloat特X的对数似然score_samples(X, lengths=None) 计算模型下的对数似然,并计算后验概率 参数数据类型意义Xarray-like, shape (n_samples, n_features)单个样本的特征矩阵lengthsarray-like of integers, shape (n_sequences, ), optionalX中单序列的长度,其和应该是n_samples 返回数据类型意义logprobfloat特X的对数似然posteriorsarray, shape (n_samples, n_components)X中每个样本的状态成员概率 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |