decent 괜찮은

ex) It's not a great job, but the pay is decent.

He's very decent to me.

They are in decent clothes.

I just want to live a decent life.

'me myself and i > english' 카테고리의 다른 글

time and time again  (0) 2018.07.04
as if=as though  (0) 2018.07.04
[영어]  (0) 2018.06.25
[영어] elapse  (0) 2018.06.19
[영어]  (0) 2018.06.14

library(caret)


createDataPartition()


: 층화 균등 추출에 사용되는 함수이다. 계층 별로 비율을 동일하게, 랜덤하게 뽑아준다.





   1) createDataPartition(y, times = 1, p = 0.5, list = TRUE, groups = min(5, length(y)))


      - y : 대상 vector


      - p : 선택할 데이터 확률


   2) 사용예


      - df <- data.frame(replicate(10,sample(1:3, 20,rep=TRUE)))


      - createDataPartition(y = df$X1, p = 0.7, list = FALSE, groups = min(2, length(df$X1)))





[출처] R 표본 샘플링 - 홀드아웃 holdout 방법|작성자 나리

https://blog.naver.com/nyaminyam/221246413590



[출처] sample, createDataPartition 사용법|작성자 이해할때까지

https://blog.naver.com/wujuchoi/221058021095

'programing > R studio' 카테고리의 다른 글

기하분포 - dgeom  (0) 2018.07.02
ggplot2 - scale_x_discrete, scale_y_discrete - x, y값 순서 정렬  (0) 2018.06.29
dcast()  (0) 2018.06.26
정규화란?  (0) 2018.06.25
선형회귀 lm(), predict(), abline(), coef()  (0) 2018.06.24
> library(reshape2)
> 
> fm<-melt(id=1:4, french_fries)
> head(fm)
  time treatment subject rep variable value
1    1         1       3   1   potato   2.9
2    1         1       3   2   potato  14.0
3    1         1      10   1   potato  11.0
4    1         1      10   2   potato   9.9
5    1         1      15   1   potato   1.2
6    1         1      15   2   potato   8.8
> 
> # dcast() melt  상태로 돌려주는 !
> # ...  => 나열 되지 않은 나머지 모든 변수
> x<-dcast(fm, time+treatment+subject+rep~variable)
> head(x)
  time treatment subject rep potato buttery grassy rancid painty
1    1         1       3   1    2.9     0.0    0.0    0.0    5.5
2    1         1       3   2   14.0     0.0    0.0    1.1    0.0
3    1         1      10   1   11.0     6.4    0.0    0.0    0.0
4    1         1      10   2    9.9     5.9    2.9    2.2    0.0
5    1         1      15   1    1.2     0.1    0.0    1.1    5.1
6    1         1      15   2    8.8     3.0    3.6    1.5    2.3
> 
> x<-dcast(fm, time+treatment+subject+rep~...)
> head(x)
  time treatment subject rep potato buttery grassy rancid painty
1    1         1       3   1    2.9     0.0    0.0    0.0    5.5
2    1         1       3   2   14.0     0.0    0.0    1.1    0.0
3    1         1      10   1   11.0     6.4    0.0    0.0    0.0
4    1         1      10   2    9.9     5.9    2.9    2.2    0.0
5    1         1      15   1    1.2     0.1    0.0    1.1    5.1
6    1         1      15   2    8.8     3.0    3.6    1.5    2.3
> 
> 
> head(fm)
  time treatment subject rep variable value
1    1         1       3   1   potato   2.9
2    1         1       3   2   potato  14.0
3    1         1      10   1   potato  11.0
4    1         1      10   2   potato   9.9
5    1         1      15   1   potato   1.2
6    1         1      15   2   potato   8.8
> dcast(fm, time~variable) # 1행만 id 지정; 72 행의 
Aggregation function missing: defaulting to length
   time potato buttery grassy rancid painty
1     1     72      72     72     72     72
2     2     72      72     72     72     72
3     3     72      72     72     72     72
4     4     72      72     72     72     72
5     5     72      72     72     72     72
6     6     72      72     72     72     72
7     7     72      72     72     72     72
8     8     72      72     72     72     72
9     9     60      60     60     60     60
10   10     60      60     60     60     60
> 
> 
> nrow(filter(fm, time==1 & variable == "potato"))
[1] 72

 

library(reshape2)


fm<-melt(id=1:4, french_fries)

head(fm)


# dcast()는 melt 전 상태로 돌려주는 듯!

# ...  => 나열 되지 않은 나머지 모든 변수

x<-dcast(fm, time+treatment+subject+rep~variable)

head(x)


x<-dcast(fm, time+treatment+subject+rep~...)

head(x)



head(fm)

dcast(fm, time~variable) # 1행만 id 지정; 72는 행의 수



nrow(filter(fm, time==1 & variable == "potato"))



beast 짐승; 싫은 사람/것; (특정한) 것

ex) The maths exam was a real beast.

His new guitar is a very expensive beast.

This beast of a gadget will be worth my wait.


niche market 틈새시장


It could've been better.

그저 그랬어요

It could've been realistic.

더 현실적일 수 있었는데(그렇지 않았음)

It could've been worse.

더 나쁠 수도 있었는데(그렇지 않았음)



meh 시시한, 지루한


footage 장면, (자료)화면


slick 매끄러운, 잔소리, 번지르르하다, 능수능란한, 미끄러운


show off 자랑하다


insistence 주장


hamper 방해하다; 빨래 바구니


oil slick 기름띠

'me myself and i > english' 카테고리의 다른 글

as if=as though  (0) 2018.07.04
decent 괜찮은  (0) 2018.06.29
[영어] elapse  (0) 2018.06.19
[영어]  (0) 2018.06.14
[영어]  (0) 2018.06.14

Pare de se queixar comigo.  

저한테 투정 좀 그만 부리세요.


턱 

queixo

'me myself and i > portuguese' 카테고리의 다른 글

[포르투갈어]  (1) 2018.07.16
queiso = that is = 즉  (0) 2018.06.29
[포르투갈어] denunciar, impedier  (0) 2018.06.22
[포르투갈어]  (0) 2018.06.22
[포르투갈어] 시제  (0) 2018.06.19

데이터의 범위를 일치시키거나 분포를 유사하게 만들어 주는 등의 작업

> summary(cars)

     speed           dist      

 Min.   : 4.0   Min.   :  2.00 

 1st Qu.:12.0   1st Qu.: 26.00 

 Median :15.0   Median : 36.00 

 Mean   :15.4   Mean   : 42.98 

 3rd Qu.:19.0   3rd Qu.: 56.00 

 Max.   :25.0   Max.   :120.00 

> str(cars)

'data.frame':      50 obs. of  2 variables:

 $ speed: num  4 4 7 7 8 9 10 10 10 11 ...

 $ dist : num  2 10 4 22 16 10 18 26 34 17 ...

> head(cars)

  speed dist

1     4    2

2     4   10

3     7    4

4     7   22

5     8   16

6     9   10

> lm(speed~dist, cars)

 

Call:

lm(formula = speed ~ dist, data = cars)

 

Coefficients:

(Intercept)         dist 

     8.2839       0.1656 

 

>

> m<-lm(dist~speed, cars)

> summary(m)

 

Call:

lm(formula = dist ~ speed, data = cars)

 

Residuals:

    Min      1Q  Median      3Q     Max

-29.069  -9.525  -2.272   9.215  43.201

 

Coefficients:

            Estimate Std. Error t value Pr(>|t|)   

(Intercept) -17.5791     6.7584  -2.601   0.0123 * 

speed         3.9324     0.4155   9.464 1.49e-12 ***

---

Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

 

Residual standard error: 15.38 on 48 degrees of freedom

Multiple R-squared:  0.6511,    Adjusted R-squared:  0.6438

F-statistic: 89.57 on 1 and 48 DF,  p-value: 1.49e-12

 

>

> # Intercept = 절편

> # coefficients(회귀식의 계수) 종속변수 = 독립변수*계수 + 절편

> # dist=speed*3.932-17.579

> # 계수가 양수이므로 양의 상관관계를 지님

>

>

>

> # 추정해보기(신뢰구간)

>

> predict(m, data.frame(speed=3), interval="confidence")

        fit       lwr      upr

1 -5.781869 -17.02659 5.462853

>

> # fit = 예측값

> # lwr, upr = 신뢰구간

> # speed 3 , dist 평균값은 -17.03~5.46 사이에 있음

>

>

> plot(cars)

> abline(coef(m)) #coef 회선의 계수

> coef(m)

(Intercept)       speed

 -17.579095    3.932409

>

>

> [출처] [R프로그래밍] RStudio 선형 회귀 (1) 단순 선형 회귀|작성자 아트 

http://chloe-ynlee.me/221302458526

 




####################################################

cars

summary(cars)

str(cars)

head(cars)

lm(speed~dist, cars)


m<-lm(dist~speed, cars)

summary(m)


# Intercept = 절편

# coefficients(회귀식의 계수) 종속변수 = 독립변수*계수 + 절편

# dist=speed*3.932-17.579

# 계수가 양수이므로 양의 상관관계를 지님




# 추정해보기(신뢰구간)


predict(m, data.frame(speed=3), interval="confidence")


# fit = 예측값

# lwr, upr = 신뢰구간

# speed가 3일 때, dist의 평균값은 -17.03~5.46 사이에 있음



plot(cars)

abline(coef(m)) #coef는 회선의 계수

coef(m)



[출처] [R프로그래밍] RStudio 선형 회귀 (1) 단순 선형 회귀|작성자 아트


####################################################











denunciar 신고하다, 고발하다, 기소하다


impedier 방해하다, 탄핵하다

'me myself and i > portuguese' 카테고리의 다른 글

queiso = that is = 즉  (0) 2018.06.29
[포르투갈어] queixo VS queixar  (0) 2018.06.25
[포르투갈어]  (0) 2018.06.22
[포르투갈어] 시제  (0) 2018.06.19
[포르투갈어]  (0) 2018.06.19

Se fizesse corpo mole, teria aceitado a oferta do Vasco.


If I were a soft-spoken, I would have accepted Vasco's offer.


fizesse : 접속법 반과거

teria : 과거미래




ex) O médico dele recomendou-lhe que fizesse repouso absoluto.


repouso 휴식, 안심

absoluto 절대의, 완전한, 무조건적

'me myself and i > portuguese' 카테고리의 다른 글

[포르투갈어] queixo VS queixar  (0) 2018.06.25
[포르투갈어] denunciar, impedier  (0) 2018.06.22
[포르투갈어] 시제  (0) 2018.06.19
[포르투갈어]  (0) 2018.06.19
[포르투갈어] 반과거 예문  (0) 2018.06.19

par(mar=c(1,1,1,1))


워드클라우드 전에 적어주면 됨

+ Recent posts