修改地表覆盖类型流程
parent
e42eedea0c
commit
b2a76e2380
|
@ -56,8 +56,9 @@ logger = logging.getLogger("mylog")
|
||||||
FILTER_SIZE = int(cf.get('filter_size'))
|
FILTER_SIZE = int(cf.get('filter_size'))
|
||||||
file =fileHandle(DEBUG)
|
file =fileHandle(DEBUG)
|
||||||
MAX_TRAN_NUM = int(cf.get('max_tran__num_per_class'))
|
MAX_TRAN_NUM = int(cf.get('max_tran__num_per_class'))
|
||||||
env_str = os.path.split(os.path.realpath(__file__))[0]
|
# env_str = os.path.split(os.path.realpath(__file__))[0]
|
||||||
os.environ['PROJ_LIB'] = env_str
|
env_str = os.path.dirname(os.path.abspath(sys.argv[0]))
|
||||||
|
os.environ['PROJ_LIB'] = os.getcwd()
|
||||||
class LandCoverMain:
|
class LandCoverMain:
|
||||||
"""
|
"""
|
||||||
算法主函数
|
算法主函数
|
||||||
|
@ -165,6 +166,7 @@ class LandCoverMain:
|
||||||
"""
|
"""
|
||||||
预处理
|
预处理
|
||||||
"""
|
"""
|
||||||
|
|
||||||
para_names_geo = ['sim_ori']
|
para_names_geo = ['sim_ori']
|
||||||
# for key in self.__processing_paras.keys():
|
# for key in self.__processing_paras.keys():
|
||||||
# if "FeatureMap" in key:
|
# if "FeatureMap" in key:
|
||||||
|
@ -544,13 +546,13 @@ class LandCoverMain:
|
||||||
kernel = 'rbf'
|
kernel = 'rbf'
|
||||||
|
|
||||||
# RF
|
# RF
|
||||||
clf = ml.trainRF(X_train, Y_train)
|
# clf = ml.trainRF(X_train, Y_train)
|
||||||
logger.info("RF train successful")
|
# logger.info("RF train successful")
|
||||||
|
|
||||||
# # SVM
|
# # SVM
|
||||||
# clf = ml.trainSVM(X_train, Y_train, cost, kernel)
|
clf = ml.trainSVM(X_train, Y_train, cost, kernel)
|
||||||
# logger.info("SVM train successful")
|
logger.info("SVM train successful")
|
||||||
# logger.info('progress bar: 60%')
|
logger.info('progress bar: 60%')
|
||||||
|
|
||||||
# 生成测试集
|
# 生成测试集
|
||||||
# X_test_path_list = ml.gene_test_set(self.__feature_tif_dir, optimal_feature)
|
# X_test_path_list = ml.gene_test_set(self.__feature_tif_dir, optimal_feature)
|
||||||
|
|
Loading…
Reference in New Issue