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


Python Feature.FeatureSpace类代码示例

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


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

示例1: test_Period_Psi

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,代码行数:7,代码来源:test_library.py

示例2: test_PairSlopeTrend

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,代码行数:7,代码来源:test_library.py

示例3: test_MedianBRP

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,代码行数:7,代码来源:test_library.py

示例4: test_Meanvariance

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,代码行数:7,代码来源:test_library.py

示例5: test_MedianAbsDev

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,代码行数:7,代码来源:test_library.py

示例6: test_Eta_e

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,代码行数:7,代码来源:test_library.py

示例7: test_Eta_e

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,代码行数:7,代码来源:test_library.py

示例8: test_Con

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,代码行数:7,代码来源:test_library.py

示例9: test_CAR

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,代码行数:7,代码来源:test_library.py

示例10: test_Beyond1Std

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,代码行数:7,代码来源:test_library.py

示例11: test_PercentDifferenceFluxPercentile

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,代码行数:7,代码来源:test_library.py

示例12: test_Period_Psi

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,代码行数:7,代码来源:test_library.py

示例13: test_FluxPercentile

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,代码行数:11,代码来源:test_library.py

示例14: test_Stetson

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,代码行数:10,代码来源:test_library.py

示例15: calculate_features

def calculate_features(lc_fn, feature_list):
    lc = ReadLC_MACHO(lc_fn)
    [data, mjd, error] = lc.ReadLC()
    preprocessed_data = Preprocess_LC(data, mjd, error)
    
    fs = FeatureSpace(featureList=feature_list,
                        Automean=[0,0],
                        #Beyond1Std=[np.array(error)],
                        CAR_sigma=[mjd, error],
                        Eta_e=mjd,
                        LinearTrend=mjd,
                        MaxSlope=mjd,
                        PeriodLS=mjd,
                        Psi_CS=mjd
                        )
    values = fs.calculateFeature(data)
    value_dict = values.result(method='dict')
    A, PH, scaledPH = calculate_periodic_features(mjd, data)
    
    for i in range(len(A)):
        for j in range(len(A[i])):
            value_dict['freq'+str(i+1)+'_harmonics_amplitude_'+str(j)] = A[i][j]
            value_dict['freq'+str(i+1)+'_harmonics_rel_phase_'+str(j)] = scaledPH[i][j]
    return value_dict
开发者ID:bksim,项目名称:OutlierDetection,代码行数:24,代码来源:calculate_features.py


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