-
一种部分变量优化的R软件optim函数求解方法
-
2017-5-15 17:34
-
分以下三个步骤进行。 1,定义包含五个变量的函数: TestF 1 =function(x, j, m,T,Tnew){ #select parameter by order of magnitude ... xnew=Tnew ynew =Tnew new - predict(svmr, t(xnew)) MseCross=mean(abs(ynew-new))^0.5 return(MseCross) } 2,给 j,m,t(ST) , ...
-
个人分类: 统计机器学习及R编程|4015 次阅读|没有评论
-
编写KNN分类的R语言代码
-
2015-12-29 09:17
-
KNNperfor -function( trainX, trainy, testX, testy ,k ) { ##build KNN classification model ## example of euclidean distances. M=length( trainX ) Xt= rbind(trainX, testX) Dtest=as.matrix( dist( Xt , method = euclidean ) ) Tsort= sort( ...
-
个人分类: 统计机器学习及R编程|3977 次阅读|没有评论
本页有 5 篇博文因作者的隐私设置或未通过审核而隐藏