] Champion Program
본문 바로가기

전체 글

[비주얼 스튜디오 코드(Visual Studio Code)에서 Brower에 html파일 실행하기 ctrl+F1 더보기
문자열을 정수로 인코딩하기(python) from sklearn.preprocessing import LabelEncoder #Need to encode my classes #Ligand = 0, not_ligand = 1 encoder = LabelEncoder() encoder.fit(dataframe['Type']) enc_y = encoder.transform(dataframe['Type']) 더보기
numpy배열을 csv로 저장하기 np_fps.astype(int)numpy.savetxt("np_fps.csv", np_fps, delimiter=" ") 더보기
(paper2)predic-positive 개수구하기 using R Pec = read.csv("E:\\AOP\\trained_models\\PEC(input).csv",stringsAsFactors = F)Pec_smile_list = Pec[,4] #pec의 smiles를 담는 리스트 list = list.files(path="F:\\Seperated", pattern = NULL) #디렉토리안의 toxcast 데이터 리스트.p = 2 #index of PEC_Prection -->ligand인 물질 찾기 위해. pecdata = read.csv("E:\\AOP\\trained_models\\pecdata_encoded_model.csv") for (i in list) { cn = i #열이름 cn = sub(pattern="(input).csv", replaceme.. 더보기
파이썬 문자열 바꾸기(reaplace) 문자열 바꾸기(replace)>>> a = "Life is too short" >>> a.replace("Life", "Your leg") 'Your leg is too short' replace(바뀌게 될 문자열, 바꿀 문자열)처럼 사용해서 문자열 내의 특정한 값을 다른 값으로 치환해 준다 info_list = [Total_Chemicals, Ligand, Non_ligand, 0 ] dataframe2[input_name.replace("(input).csv","")] = info_list #chemcial_name으로 열을 추가해서 정보를 넣는다. # 열의 개수가 기존과 같아야함 dataframe2.to_csv("E:/Chemical_Evaluation_Toxcast/table_result1.csv.. 더보기
dataframe 열 목록을 리스트로 반환하기. dataframe.columns 더보기
worst case를 알고리즘 성능 비교 척도로 쓰는 이유 https://m.blog.naver.com/PostView.nhn?blogId=skout123&logNo=50136253509&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F 더보기
tensorflow cpu버전쓰는법 from os import environenviron['CUDA_VISIBLE_DEVICES'] = '-1' with tf.device('/cpu:0'): #cpu를 사용한다. "/cpu:0": The CPU of your machine."/device:GPU:0": The GPU of your machine, if you have one."/device:GPU:1": The second GPU of your machine, etc. 더보기