예제 #1
0
파일: main.py 프로젝트: thak123/ML2016
def run():
	clf= Classifier('breast-cancer-wisconsin.data.txt')
	clf.clf_fit_transform()
	
	clf.default_accuracy_lr()
	
	clf.weight_coefficent_lr()
	clf.SBS_lf()
	# it takes long time to run the Random forest Code ...uncomment to check the result
	# clf.feature_selection_rf()
	clf.PCA()
	clf.pipe_kf_validation()
	clf.clf_learning_curve()
	clf.clf_validation_curve()
	clf.clf_roc_curve()
	
	clf.train()
	clf.l1l2()
	
	
	dest = os.path.join('classifier', 'pkl_objects')
	if not os.path.exists(dest):
		os.makedirs(dest)
	pickle.dump(clf,	open(os.path.join(dest, 'classifier.pkl'), 'wb'),	protocol=2)