| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- #위도#경도#비정형데이터#크롤링
- 웹크롤링
- #K-means #Clustering
- 셀레니움
- 위도경도
- #비정형 데이터 #네이버 #지도 #크롤링
- 웹매크로 #세잔느
- 파이썬 셀레니움
- 파이썬
- 코딩
- 카카오APi
- #크롤링 #웹문서
- 구글 지오코드
- 숫자빼고 중복되는 코드동작법
- #비정형#카카오api#api#크롤링
- Today
- Total
목록All (143)
지방이의 Data Science Lab
1 total_x.groupby(['회사명']).filter(lambda x:x.shape[0]>4) = 회사명의 중복 아이디 갯수 세었을때 5개넘는 것만 가져와.
헤더에 대한 문의가 많길래 올립니다. 위 값을 그대로 넣어주시면 됩니다. 제 코드를 참조하실 분들은 headers = header 라고 제가 비워둔 부분에 쓰시면 됩니다.
tictoc이라는 패키지를 이용하면 된다. 1 2 3 4 5 6 7 8 devtools::install_github("jabiru/tictoc") library(tic) tic("LR(f) Modelling") mod_fit = train(target ~ ., data=data, method="glm", family="binomial") pred_target = predict(mod_fit, newdata=test1,type='prob') toc()
일반적으로 사용하는 caret에서 성능평가가 아닌, 즉, caret에 포함되지 않은 모델을 만들때 유용하다. train/test set을 각각 5세트로 만들어서 confusion matrix를 직접만들어서 성능을 평가해야하는 경우 사용할 수 있다. 나의 경우 베이지안 네트워크 모델을 사용하기 위해 사용했다. 1 2 3 4 5 6 7 8 9 10 11 12 library(forecast) flds=createFolds(data$target,k=5,list=T,returnTrain = F) c=c(); f=c() for(i in 1: 5){ want_assign = data[-flds[[i]],] name = paste0('train', i, sep='', collapse = ',') c = c(c, ass..
geom_path: Each group consists of only one observation. Do you need to adjust the group aesthetic? 위와 같은 에러 코드가 나는이유: 엄청 간단한 그룹도 없는 가장 basic한 라인그래프인데 왜 안그려질까? 할때는 group=1이라는 값을 지정해주지 않아서 그런것이다. library(ggplot2) ggplot(data, aes(x=X1, y=상관계수, group=1)) + geom_line(colour='#68C8CB')+ theme_bw()+xlab("")
data[(data$group %in% 'c'),] 밑줄 부분은 인덱스로 반환된다 True혹은 False로 생겼고, 코드가 실행되면 데이터형식안에 true에 해당하는 인덱스만 추출한 특정 데이터 즉, data라는 데이터프레임 속 group c만 보고싶을때 사용. data = subset(data, !(data$시작 %in% 20193025)) 20193025는 누가봐도 없는날짜. err를 drop하고 보고 싶을때 사용.
["NA" to NA] 1 data = mutate_all(data, funs(replace(., .=='NA', NA))) [Mean Imputation] 1 data$AGE[data$USERID=="홍길동"] = mean(mean(data$AGE[!is.na(data$AGE)])) [이상치] #1. 0보다 작을 수 없는 경우인데 0보다 작게 나온 데이터 이상치 삭제 1 2 idx = which(S_table$Sales.M.2015
https://www.r-graph-gallery.com/316-possible-inputs-for-the-dygraphs-library.html An introduction to interactive time series with R and dygraphs This post is an introduction to the dygraphs package for interactive time series visualization with R. It shows how to deal with various input formats, and what are the main chart types offered. www.r-graph-gallery.com 위 사이트에 좋은 시각화 방법이 많다. 내가 공부하다 찾은 좋..