Displaying 3 results from an estimated 3 matches for "sum_x".
Did you mean:
sum_
2011 Dec 12
0
Rsolnp package: warning messages
...imizes the objective. therefore the
original minus sign is not used
obj=function(x){
all1=sum(mat%*%x)
Hp=0
for (j in 1:BR){
p_b=mat[j,]%*%x/all1
Hp=Hp+p_b*log(p_b)*br[j]
}
return(Hp)
}
# the equality constraint function:
equal1=function(x){
all2=sum(mat%*%x)
sum_pterm=sum(mat[1:N,]%*%x/all2)
sum_x=sum(x)
return(c(sum_pterm,sum_x))
}
# the right hand side for the constraint
eqB=c(1,budget)
# the inequality function
inequal1=function(x){
all3=sum(mat%*%x)
p_b=mat[1:BR,]%*%x/all3
return(as.vector(p_b))
}
#the lower limit for inequalities
ineqLB=rep(0.00001,BR)
#the upper limit for the ine...
2008 Mar 10
0
build.mim() from the minet package
...ion build.mim() from the minet package:
> build.mim(myData, estimator="empirical")
and I have two questions.
1.) The estimator "empirical" computes the entropy of the empirical
probability distribution. This probably means it is using this
definition of the entropy: H = sum_x sum_y p(x,y)* log( p(x,y)/
(p(x)*p(x)) ). Is this correct?
2.) Which is basis is used for the log?
Thanks a lot for your in advance.
Bettina Keller
2005 Apr 18
4
longer object length, is not a multiple of shorter object length in: kappa * gcounts
Hi,
I was using a density estimation function as follows:
> est <- KernSmooth::bkde(x3, bandwidth=10)
When setting bandwidth less than 5, I got the error "longer object
length, is not a multiple of shorter object length in: kappa * gcounts ".
I wonder if there is anybody who can explain the error for me?
Thanks!
Hui