-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathtmp.Rmd
44 lines (39 loc) · 906 Bytes
/
tmp.Rmd
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
37
38
39
40
41
42
43
# 数据报告 testing
```{r}
library(DataExplorer)
create_report(train_data_1)
```
直接用成绩pca一下。
不行!
# stacking testing
```{r}
library(here)
here('data') %>%
list.files('jiaxiang_prediction_xgboostbaseline_tweedie.csv') %>%
as_tibble() %>%
mutate(data = map(value,~fread(here('data',.)))) %>%
unnest() %>%
# filter(id == 6.5)
spread(value,predicition) %>%
arrange(id) %>%
select(-id) %>%
prcomp_irlba(
x = .
,n = 1
,center = F
,scale. = F
) %>%
predict() %>%
as_tibble() %>%
bind_cols(
test_data_1 %>%
select(id)
) %>%
transmute(id,predicition=PC1) %>%
write_excel_csv(
file.path(
'data'
,paste(today() %>% str_remove_all('-') %>% str_sub(3,-1),'jiaxiang_prediction_xgboostbaseline_tweedie.csv',sep='_')
)
)
```