当前位置: 首页>>代码示例>>Python>>正文


Python LoadMatrix.load_cubes方法代码示例

本文整理汇总了Python中tools.load.LoadMatrix.load_cubes方法的典型用法代码示例。如果您正苦于以下问题:Python LoadMatrix.load_cubes方法的具体用法?Python LoadMatrix.load_cubes怎么用?Python LoadMatrix.load_cubes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tools.load.LoadMatrix的用法示例。


在下文中一共展示了LoadMatrix.load_cubes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: distribution_histogram

# 需要导入模块: from tools.load import LoadMatrix [as 别名]
# 或者: from tools.load.LoadMatrix import load_cubes [as 别名]
# In this example the Histogram algorithm object computes a histogram over all
# 16bit unsigned integers in the features.

from tools.load import LoadMatrix
from sg import sg
lm=LoadMatrix()
traindna=lm.load_dna('../data/fm_train_dna.dat')
cubedna=lm.load_cubes('../data/fm_train_cube.dat')
parameter_list=[[traindna,cubedna,3,0,'n'],[traindna,cubedna,4,0,'n']]

def distribution_histogram(fm_train=traindna,fm_cube=cubedna,order=3,
			    gap=0,reverse='n'):

#	sg('new_distribution', 'HISTOGRAM')
	sg('add_preproc', 'SORTWORDSTRING')

	sg('set_features', 'TRAIN', fm_train, 'DNA')
	sg('convert', 'TRAIN', 'STRING', 'CHAR', 'STRING', 'WORD', order, order-1, gap, reverse)
	sg('attach_preproc', 'TRAIN')
#	sg('train_distribution')
#	histo=sg('get_histogram')

#	num_examples=11
#	num_param=sg('get_histogram_num_model_parameters')
#	for i in xrange(num_examples):
#		for j in xrange(num_param):
#			sg('get_log_derivative %d %d' % (j, i))

#	sg('get_log_likelihood')
#	return sg('get_log_likelihood_sample')
开发者ID:behollis,项目名称:muViewBranch,代码行数:32,代码来源:distribution_histogram.py

示例2: LoadMatrix

# 需要导入模块: from tools.load import LoadMatrix [as 别名]
# 或者: from tools.load.LoadMatrix import load_cubes [as 别名]
# In this example the Histogram algorithm object computes a histogram over all
# 16bit unsigned integers in the features.

from tools.load import LoadMatrix
from sg import sg

lm = LoadMatrix()
traindna = lm.load_dna("../data/fm_train_dna.dat")
cubedna = lm.load_cubes("../data/fm_train_cube.dat")
parameter_list = [[traindna, cubedna, 3, 0, "n"], [traindna, cubedna, 4, 0, "n"]]


def distribution_histogram(fm_train=traindna, fm_cube=cubedna, order=3, gap=0, reverse="n"):

    # 	sg('new_distribution', 'HISTOGRAM')
    sg("add_preproc", "SORTWORDSTRING")

    sg("set_features", "TRAIN", fm_train, "DNA")
    sg("convert", "TRAIN", "STRING", "CHAR", "STRING", "WORD", order, order - 1, gap, reverse)
    sg("attach_preproc", "TRAIN")


# 	sg('train_distribution')
# 	histo=sg('get_histogram')

# 	num_examples=11
# 	num_param=sg('get_histogram_num_model_parameters')
# 	for i in xrange(num_examples):
# 		for j in xrange(num_param):
# 			sg('get_log_derivative %d %d' % (j, i))
开发者ID:Anshul-Bansal,项目名称:gsoc,代码行数:32,代码来源:distribution_histogram.py


注:本文中的tools.load.LoadMatrix.load_cubes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。