Commit 4e403466 authored by mythezone's avatar mythezone
Browse files

add experiment

parent 252d9216
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
# -*- encoding: utf-8 -*-
'''
@File    :   transis_TDC_to_DTLP.py
@Time    :   2021/09/27 20:55:51
@Author  :   Muyao ZHONG 
@Version :   1.0
@Contact :   zmy125616515@hotmail.com
@License :   (C)Copyright 2019-2020
@Title   :   transis_TDC dataset into DTLP txt data
'''

import pandas as pd 
import numpy as np 
def read_txt(filepath):
    with open(filepath,'r') as f:
        data=pd.read_csv(f,sep='\t')
    return data

def data_pre(data,filename):
    new_data=data[['X1','X2','Y']]
    max_min_scale=lambda x:x/x.max()
    new_data[['Y']]=(new_data[["Y"]]>10000).astype('int')
    # new_data[["Y"]]=new_data[["Y"]]>0.5
    # new_data['Y']=new_data["Y"].astype('int')
    new_data.to_csv(filename,sep=' ',index=None,columns=None)
    return new_data


if __name__ == '__main__':
    data=read_txt("./data/bindingdb_kd.tab")
    data=data_pre(data,"./data/bindingdb_kd.txt")
    
 No newline at end of file

data/bindingdb_kd.txt

0 → 100644
+0 −0

File added.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+66315 −0

File added.

File size exceeds preview limit.

+1.12 GiB

File added.

No diff preview for this file type.

+33.8 MiB

File added.

No diff preview for this file type.

Loading