-
Notifications
You must be signed in to change notification settings - Fork 7
/
emsemble.py
36 lines (30 loc) · 976 Bytes
/
emsemble.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: emsemble
Description :
Author : Administrator
date: 2018/5/10 0010
-------------------------------------------------
Change Activity:
2018/5/10 0010:
-------------------------------------------------
"""
__author__ = 'Administrator'
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 11 22:45:13 2016
@author: zhenghuangcheng
"""
import pandas as pd
xgb0480 = pd.read_csv("output/xgb_bytecup1010_1_0.48.csv")
svm0479 = pd.read_csv('output/svm_bytecup1011_1.csv')
xgb04799 = pd.read_csv('output/xgb_bytecup1010_3_0.4799.csv')
qid=xgb0480.qid
uid = xgb0480.uid
label = 0.4*xgb0480.label+0.25*svm0479.label+0.35*xgb04799.label
test_result = pd.DataFrame(columns=["qid","uid","label"])
test_result.qid = qid
test_result.uid = uid
test_result.label = label
test_result.to_csv('output/ensembel_1011_1.csv',index=None,encoding='utf-8')