User Tools

Site Tools


estimated_standard_deviation:rout02

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
estimated_standard_deviation:rout02 [2026/03/10 05:44] hkimscilestimated_standard_deviation:rout02 [2026/03/17 22:51] (current) hkimscil
Line 1: Line 1:
 <WRAP group> <WRAP group>
-<WRAP column 60%>+<WRAP column 55%> 
 +<code> 
 +> rm(list=ls()) 
 +>  
 +> rnorm2 <- function(n,mean,sd){  
 ++     mean+sd*scale(rnorm(n))  
 ++ } 
 +>  
 +> # set.seed(191) 
 +> nx <- 1000 
 +> mx <- 50 
 +> sdx <- mx * 0.1 
 +> sdx  # 5 
 +[1] 5 
 +> x <- rnorm2(nx, mx, sdx) 
 +> # x <- rnorm2(1000, 50, 5) 와 동일 
 +>  
 +> mean(x) 
 +[1] 50 
 +> sd(x) 
 +[1] 5 
 +> length(x) 
 +[1] 1000 
 +> hist(x) 
 +>  
 +</code> 
 +</WRAP> 
 +<WRAP column 35%> 
 +</WRAP> 
 +<WRAP group> 
 +<WRAP column 55%>
 <code> <code>
 > # the above no gradient > # the above no gradient
Line 55: Line 85:
  
 <WRAP group> <WRAP group>
-<WRAP column 60%>+<WRAP column 55%>
 <code> <code>
 > zx <- (x-mean(x))/sd(x) > zx <- (x-mean(x))/sd(x)
Line 91: Line 121:
  
 <WRAP group> <WRAP group>
-<WRAP column 60%>+<WRAP column 55%>
 <code> <code>
 > # Train the model with scaled features > # Train the model with scaled features
Line 107: Line 137:
  
 <WRAP group> <WRAP group>
-<WRAP column 60%>+<WRAP column 55%>
 <code> <code>
 > msrs <- c() > msrs <- c()
Line 114: Line 144:
 > nlen <- 75 > nlen <- 75
 > for (epoch in 1:nlen) { > for (epoch in 1:nlen) {
-+     residual <- residuals(zx, v)++     residual <- residuals(zx, v)
 +     msr.x <- msr(zx, v) +     msr.x <- msr(zx, v)
 +     msrs <- append(msrs, msr.x) +     msrs <- append(msrs, msr.x)
Line 156: Line 186:
  
 <WRAP group> <WRAP group>
-<WRAP column 60%>+<WRAP column 55%>
 <code> <code>
 > # scaled > # scaled
estimated_standard_deviation/rout02.1773121482.txt.gz · Last modified: by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki