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


Python FeatureSpace.calculateFeature方法代码示例

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


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

示例1: test_Period_Psi

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_Period_Psi(fake_lc):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = fake_lc()

	a = FeatureSpace(featureList=['PeriodLS', 'Period_fit','Psi_CS','Psi_eta'], PeriodLS = mjd, Psi_CS= mjd)
	a=a.calculateFeature(fake_lc[0])

	assert(a.result(method='array') >= 0.043 and a.result(method='array') <= 0.046)
开发者ID:rahuldave,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例2: test_Meanvariance

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_Meanvariance(uniform_lc):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = white_noise()

	a = FeatureSpace(featureList=['Meanvariance'])
	a=a.calculateFeature(uniform_lc)

	assert(a.result(method='array') >= 0.575 and a.result(method='array') <= 0.580)
开发者ID:chrinide,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例3: test_MedianBRP

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_MedianBRP(fake_lc):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = fake_lc()

	a = FeatureSpace(featureList=['MedianBRP'] , MaxSlope=mjd)
	a=a.calculateFeature(fake_lc[0])

	assert(a.result(method='array') >= 0.043 and a.result(method='array') <= 0.046)
开发者ID:rahuldave,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例4: test_PairSlopeTrend

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_PairSlopeTrend(white_noise):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = white_noise()

	a = FeatureSpace(featureList=['PairSlopeTrend'])
	a=a.calculateFeature(white_noise)

	assert(a.result(method='array') >= -0.25 and a.result(method='array') <= 0.25)
开发者ID:chrinide,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例5: test_PercentDifferenceFluxPercentile

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_PercentDifferenceFluxPercentile(fake_lc):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = fake_lc()

	a = FeatureSpace(featureList=['PercentDifferenceFluxPercentile'])
	a=a.calculateFeature(fake_lc[0])

	assert(a.result(method='array') >= 0.043 and a.result(method='array') <= 0.046)
开发者ID:rahuldave,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例6: test_Eta_e

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_Eta_e(white_noise):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = white_noise()

	a = FeatureSpace(featureList=['Eta_e'])
	a=a.calculateFeature(white_noise)

	assert(a.result(method='array') >= 1.9 and a.result(method='array') <= 2.1)
开发者ID:chrinide,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例7: test_Beyond1Std

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_Beyond1Std(white_noise):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = white_noise()

	a = FeatureSpace(featureList=['Beyond1Std'])
	a=a.calculateFeature(white_noise)

	assert(a.result(method='array') >= 0.30 and a.result(method='array') <= 0.40)
开发者ID:chrinide,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例8: test_Con

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_Con(white_noise):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = white_noise()

	a = FeatureSpace(featureList=['Con'] , Con=1)
	a=a.calculateFeature(white_noise)

	assert(a.result(method='array') >= 0.04 and a.result(method='array') <= 0.05)
开发者ID:chrinide,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例9: test_Eta_e

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_Eta_e(fake_lc):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = fake_lc()

	a = FeatureSpace(featureList=['Eta_e'] )
	a=a.calculateFeature(fake_lc[0])

	assert(a.result(method='array') >= 0.043 and a.result(method='array') <= 0.046)
开发者ID:rahuldave,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例10: test_CAR

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_CAR(fake_lc):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = fake_lc()

	a = FeatureSpace(featureList=['CAR_sigma', 'CAR_tau', 'CAR_tmean'] , CAR_sigma=[mjd, error])
	a=a.calculateFeature(fake_lc[0])

	assert(a.result(method='array') >= 0.043 and a.result(method='array') <= 0.046)
开发者ID:rahuldave,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例11: test_Period_Psi

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_Period_Psi(periodic_lc):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = white_noise()

	a = FeatureSpace(featureList=['PeriodLS', 'Period_fit','Psi_CS','Psi_eta'])
	a=a.calculateFeature(periodic_lc)
	# print a.result(method='array'), len(periodic_lc[0])
	assert(a.result(method='array')[0] >= 19 and a.result(method='array')[0] <= 21)
开发者ID:chrinide,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例12: test_MedianAbsDev

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_MedianAbsDev(white_noise):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = white_noise()

	a = FeatureSpace(featureList=['MedianAbsDev'])
	a=a.calculateFeature(white_noise)

	assert(a.result(method='array') >= 0.630 and a.result(method='array') <= 0.700)
开发者ID:chrinide,项目名称:time-series-feats,代码行数:9,代码来源:test_library.py

示例13: test_Stetson

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_Stetson(white_noise):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = white_noise()

	a = FeatureSpace(featureList=['SlottedA_length','StetsonK', 'StetsonK_AC', 'StetsonJ', 'StetsonL'])
	a=a.calculateFeature(white_noise)

	assert(a.result(method='array')[1] >= 0.790 and a.result(method='array')[1] <= 0.85)
	assert(a.result(method='array')[2] >= 0.20 and a.result(method='array')[2] <= 0.45)
	assert(a.result(method='array')[3] >= -0.1 and a.result(method='array')[3] <= 0.1)
	assert(a.result(method='array')[4] >= -0.1 and a.result(method='array')[4] <= 0.1)
开发者ID:chrinide,项目名称:time-series-feats,代码行数:12,代码来源:test_library.py

示例14: test_FluxPercentile

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def test_FluxPercentile(white_noise):
	# data, mjd, error, second_data, aligned_data, aligned_second_data, aligned_mjd = white_noise()

	a = FeatureSpace(featureList=['FluxPercentileRatioMid20','FluxPercentileRatioMid35','FluxPercentileRatioMid50','FluxPercentileRatioMid65','FluxPercentileRatioMid80'] )
	a=a.calculateFeature(white_noise)

	assert(a.result(method='array')[0] >= 0.145 and a.result(method='array')[0] <= 0.160)
	assert(a.result(method='array')[1] >= 0.260 and a.result(method='array')[1] <= 0.290)
	assert(a.result(method='array')[2] >= 0.350 and a.result(method='array')[2] <= 0.450)
	assert(a.result(method='array')[3] >= 0.540 and a.result(method='array')[3] <= 0.580)
	assert(a.result(method='array')[4] >= 0.760 and a.result(method='array')[4] <= 0.800)
开发者ID:chrinide,项目名称:time-series-feats,代码行数:13,代码来源:test_library.py

示例15: main

# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import calculateFeature [as 别名]
def main(argv):
	path = argv + '/'

	count = 0
	check = False

	for filename in os.listdir(path):
	
		[mag, time, error] =  R.ReadLC_Catalina(path+filename)

		a = FeatureSpace(Data=['magnitude', 'time', 'error'], featureList=None)
		lc = np.array([mag,time,error])

		try:
			a=a.calculateFeature(lc)
			idx = filename.split('.')[0]
			count = count + 1
			

			if count == 1:
					
				df = pd.DataFrame(np.asarray(a.result(method='array')).reshape((1,len(a.result(method='array')))), columns = a.result(method='features'), index =[idx])
			
			else:
				
				df2 = pd.DataFrame(np.asarray(a.result(method='array')).reshape((1,len(a.result(method='array')))), columns = a.result(method='features'), index =[idx])
				df = pd.concat([df, df2])
			
			check = True	
				
		except:
			pass

	if check:
		file_name = path.split('/')[4] + '.csv'
		#df.to_csv('/n/home10/inun/Extract_features/'+file_name)
		df.to_csv('/n/regal/TSC/Catalina_features/'+file_name)
开发者ID:isadoranun,项目名称:time-series-feats,代码行数:39,代码来源:extractF_Catalina.py


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