本文整理汇总了Python中Feature.FeatureSpace.result方法的典型用法代码示例。如果您正苦于以下问题:Python FeatureSpace.result方法的具体用法?Python FeatureSpace.result怎么用?Python FeatureSpace.result使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feature.FeatureSpace
的用法示例。
在下文中一共展示了FeatureSpace.result方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_CAR
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例2: test_Eta_e
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例3: test_Period_Psi
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例4: test_Period_Psi
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例5: test_MedianBRP
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例6: test_Con
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例7: test_Beyond1Std
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例8: test_PercentDifferenceFluxPercentile
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例9: test_MedianAbsDev
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例10: test_PairSlopeTrend
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例11: test_Meanvariance
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例12: test_Eta_e
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例13: test_Stetson
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例14: main
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)
示例15: test_FluxPercentile
# 需要导入模块: from Feature import FeatureSpace [as 别名]
# 或者: from Feature.FeatureSpace import result [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)