【名稱】: W2C标准asp入门教程 【作者】: --- 【大小】:1.36MB 【格式】:PDF 【語言】:簡體中文 【內容簡介】: 在我们的 ASP 教程中,您将学到 ASP 的相关知识,以及如何在服务器端执行脚本。 您会发现,ASP 是一种生成动态交互性网页的强有力工具。 开始学习 ASP ! ASP 参考手册 在 W3School,我们为您提供完整的 ASP 参考手册,其中包括内建对象和组件,以及它们的属性和方法。 ASP 参考手册 ASP 实例 通过实例来学习!因为 ASP 脚本只能在服务器端执行,所以你无法在浏览器中查看 ASP 代码,你能看到的仅仅是由 ASP 输出的纯粹的 HTML 代码。在 W3School,每个实例均可显示出以往被隐藏的 ASP 代码。这样,您就可以更容易地理解它们的工作原理。 .............. 【下載載點】: http://www.400gb.com/file/67154533
转载Xu Cui的SVM练习实例:http://www.alivelearn.net/svm-support-vector-machine-with-libsvm/ 代码在下面,拷贝复制到.m文件中运行即可。 cuixu_test_svm1 Linear Nonlinear example (radial basis) Nonlinear, circle Nonlinear, two circles Nonlinear, quadrant 3-class example % SVM with libsvm % Xu Cui, 2009/10/07 %% two classes, linear % data setup: our data contains two classes, each N samples. Thedata is 2D N = 500; l = ; % label d = ; % data % plot original data for visual inspection figure('color','w'); pos = find(l==1); plot(d(pos,1),d(pos,2),'r.'); pos = find(l==-1); hold on; plot(d(pos, 1),d(pos, 2),'b.'); axis equal % SVM with linear kernel (-t 0). We want to find the bestparameter value C % using 2-fold cross validation (meaning use 1/2 data to train,the other % 1/2 to test). Please note the parameter -g (gamma) is uselessfor linear % kernel bestcv = 0; for log2c = -1.1:3.1, for log2g = -4.1:1.1, cmd = ; cv = svmtrain(l, d,cmd); if (cv = bestcv), bestcv = cv; bestc =2^log2c; bestg = 2^log2g; fprintf('%g %g %g(best c=%g, g=%g, rate=%g)\n', log2c, log2g, cv, bestc, bestg, bestcv); end end end % After finding the best parameter value for C, we train theentire data % again using this parameter value cmd = ; tic;model = svmtrain(l, d, cmd);toc % now plot support vectors hold on; sv = full(model.SVs); plot(sv(:,1),sv(:,2),'ko'); % now plot decision area =meshgrid( , ); dd = ; tic; =svmpredict(zeros(size(dd,1),1), dd, model);toc pos = find(predicted_label==1); hold on; redcolor = ; bluecolor = ; h1 =plot(dd(pos,1),dd(pos,2),'s','color',redcolor,'MarkerSize',5,'MarkerEdgeColor',redcolor,'MarkerFaceColor',redcolor); pos = find(predicted_label==-1); hold on; h2 =plot(dd(pos,1),dd(pos,2),'s','color',bluecolor,'MarkerSize',5,'MarkerEdgeColor',bluecolor,'MarkerFaceColor',bluecolor); uistack(h1, 'bottom'); uistack(h2, 'bottom'); %% two classes, non-linear, radial basis function:exp(-gamma*|u-v|^2) % data setup: our data contains two classes, each N samples. Thedata is 2D N = 500; d = (rand(2*N,2)-0.5)*6; l = -1*ones(size(d,1),1); % here are 3 examples, uncomment one of them pos = find((d(:,1).^2 + d(:,2).^2)1); % one circle in themiddle %pos = find(((d(:,1)+1).^2 + d(:,2).^2)1 | ((d(:,1)-2).^2 +d(:,2).^2)1); %two circles %pos = find(d(:,1)0 d(:,2)0 | d(:,1)0 d(:,2)0); % quadrant l(pos) = 1; % normalization, but we don't do it here % d = (d-repmat(min(d, ,1)-min(d, ; cv = svmtrain(l, d,cmd); if (cv = bestcv), bestcv = cv; bestc =2^log2c; bestg = 2^log2g; fprintf('%g %g %g (bestc=%g, g=%g, rate=%g)\n', log2c, log2g, cv, bestc, bestg, bestcv); end end end % After finding the best parameter value for C, we train theentire data % again using this parameter value cmd = ; tic;model = svmtrain(l, d, cmd);toc % now plot support vectors hold on; sv = full(model.SVs); plot(sv(:,1),sv(:,2),'ko'); % now plot decision area =meshgrid( , ); dd = ; tic; =svmpredict(zeros(size(dd,1),1), dd, model);toc pos = find(predicted_label==1); hold on; redcolor = ; bluecolor = ; h1 =plot(dd(pos,1),dd(pos,2),'s','color',redcolor,'MarkerSize',5,'MarkerEdgeColor',redcolor,'MarkerFaceColor',redcolor); pos = find(predicted_label==-1); hold on; h2 =plot(dd(pos,1),dd(pos,2),'s','color',bluecolor,'MarkerSize',5,'MarkerEdgeColor',bluecolor,'MarkerFaceColor',bluecolor); uistack(h1, 'bottom'); uistack(h2, 'bottom'); %% three classes, linear % data setup: our data contains two classes, each N samples. Thedata is 2D N = 500; l = ; % label d = ; % data d(2*N+1:end,:) = ; % data % plot original data for visual inspection figure('color','w'); pos = find(l==1); plot(d(pos,1),d(pos,2),'r.'); pos = find(l==-1); hold on; plot(d(pos, 1),d(pos, 2),'b.'); pos = find(l==-3); hold on; plot(d(pos, 1),d(pos, 2),'k.'); axis equal % SVM with linear kernel (-t 0). We want to find the bestparameter value C % using 2-fold cross validation (meaning use 1/2 data to train,the other % 1/2 to test). Please note the parameter -g (gamma) is uselessfor linear % kernel bestcv = 0; for log2c = -1.1:3.1, for log2g = -4.1:1.1, cmd = ; cv = svmtrain(l, d,cmd); if (cv = bestcv), bestcv = cv; bestc =2^log2c; bestg = 2^log2g; fprintf('%g %g %g(best c=%g, g=%g, rate=%g)\n', log2c, log2g, cv, bestc, bestg, bestcv); end end end % After finding the best parameter value for C, we train theentire data % again using this parameter value cmd = ; tic;model = svmtrain(l, d, cmd);toc % now plot support vectors hold on; sv = full(model.SVs); plot(sv(:,1),sv(:,2),'ko'); % now plot decision area =meshgrid( , ); dd = ; tic; =svmpredict(zeros(size(dd,1),1), dd, model);toc pos = find(predicted_label==1); hold on; redcolor = ; bluecolor = ; blackcolor = ; h1 =plot(dd(pos,1),dd(pos,2),'s','color',redcolor,'MarkerSize',5,'MarkerEdgeColor',redcolor,'MarkerFaceColor',redcolor); pos = find(predicted_label==-1); hold on; h2 = plot(dd(pos,1),dd(pos,2),'s','color',bluecolor,'MarkerSize',5,'MarkerEdgeColor',bluecolor,'MarkerFaceColor',bluecolor); hold on; pos = find(predicted_label==-3); h3 =plot(dd(pos,1),dd(pos,2),'s','color',blackcolor,'MarkerSize',5,'MarkerEdgeColor',blackcolor,'MarkerFaceColor',blackcolor); uistack(h1, 'bottom'); uistack(h2, 'bottom'); uistack(h3, 'bottom'); %% Test libsvm's performance result = for dim = l = ; % label d = ; % data tic;model =svmtrain(l,d,'-t 0');x = toc; tic; = svmpredict(l, d, model);y = toc; result = ]; end end disp(result) %% % calculate w and b w = model.SVs' * model.sv_coef; b = -model.rho; if model.Label(1) == -1 w = -w; b = -b; end disp(w) disp(b) % plot the boundary line % x = ; % y = (-b - w(1)*x ) / w(2); % hold on; % plot(x,y) pause(1) return
Five Major Advantages for Seed Production in China Jiping Jiang August 18, 2006 I made my China trip visit from June 18 to 28, 2006. During this trip, I had a meeting with Mr. Mengyu Zhang, who is the general manager of the vegetable section in China national seed group Corporation (CNSGC). The meeting was hold in Nanjing. We discussed many issues related to seed production in China. I also talked to many other professional seed production managers. Also, as an employee of Seminis, I have involved in seed production in China since 1996. I have met many professional people in seed industry in China, Besides Mr. Zhang, they were the CEO of China National Seed Group Corporation, Wei He, and many provincial and local managers in the seed business. I have visited many production sites in China, Which included Hebei, Tianjin, Liaoning, Gansu, and Shanxi. Therefore, I believe that I know the seed production business in China quite well. I think there are five major advantages for seed production in China. China is a big country. It has all weather types, including tropical and subtropical ones. It is good for seed production in 4 seasons year around. So it can ensure a continual seed production at any time of the year. Very favorable weather type for seed production in Northwest region, especially in Jiuquan area, Gansu Province. The vast Northwest region has a weather type with abundant sunlight, few rains, and low humidity during growing season, which is very favorable for the production of high seed quality. Abundant labor source. China has more than 1.3 billion people and more than half of them are farmers. Therefore, it is quite easy to find the farmers for the high labor-consuming job in China. This is an important factor, especially in the hybrid seed production section. Cheaper labor and land, but hard work and experienced people. The cost for the labor is quite low in China, especially in rural northwest area. It is about 1/10 cost compared to the same job in USA. The land is also cheaper in these areas comparing to USA. But the farmers are the people with the hard-working characteristics. They are experienced farmers with necessary skill to manage a good crop. Government supports the business. From Chinese central government to local governments, all level’s policy is favorable to the seed business, especially for the seed production for foreign seed companies. It provides priority for seed production in critical resource management, which includes water, fertilizers and pesticides. Based on these advantages, I strongly suggest that we should consider to make our hybrid tomato seed production in China. Or at least, we should shift some of our current production in other countries to China. 备注:这是我 2006 年到中国出差,回美国后给公司提交的一份报告。括弧中的中文是我的翻译。 在原始报告中没有中文。 顺便说一下,我本来跟公司请假,回国参加外甥女的婚礼, 结果公司让我以公事的身份回国,来回费用全部由公司负责,其交换条件就是在中国期间了解一下中国种子生产的一些相关情况。 自从我提交这份报告后,公司就将原来在南美洲智利生产的一部分计划转移到中国。 现在每年在中国的生产订量越来越大。
新参赛博文: 姜罗罗的参赛博文:生态复杂系统中 石头-剪刀-布博弈的实例 姜罗罗 汪秉宏 1996 年,美国加利福尼亚大学的行为遗传学家 B. Sinervo 和 C. M. Lively 首次发现真实生态系统中的石头 - 剪刀 - 布博弈 。生活在美国加利福尼亚的雄性侧边斑点蜥蜴 (side-blotched lizard) 的喉部呈现出黄、橙、蓝三种不同的颜色,如图 1( 左图 ) ,并且喉部不同颜色的雄性侧边斑点蜥蜴表现出不同的行为。黄喉雄性侧边斑点蜥蜴较为柔弱,行踪诡秘,在与其他亚种蜥蜴争夺配偶的竞争中扮演偷情者的角色;橙喉雄性侧边斑点蜥蜴较为生猛好斗,占据较大的领地,拥有为数众多的雌性配偶,奉行一夫多妻制;蓝喉雄性侧边斑点蜥蜴的武力介于其他两个亚种蜥蜴之间,同伴间相互合作捍卫自己的领地和雌性配偶,奉行一夫一妻制。图 1( 右图 ) 展示了三个亚种蜥蜴活动范围统计:橙喉雄性侧边斑点蜥蜴的活动范围最大,蓝喉雄性侧边斑点蜥蜴次之,黄喉雄性侧边斑点蜥蜴的活动范围最小。 图 1 、 (左图)生活在美国加州的雄性斑点蜥蜴,依据其喉咙部位的颜色依次可分为三个亚种(从左到右):橙喉、蓝喉、黄喉雄性斑点蜥蜴。(右图)三个亚种蜥蜴的活动范围统计图。摘自文献 。 三亚种雄性侧边斑点蜥蜴竞争雌性配偶的策略相互循环制约,形成石头 - 剪刀 - 布博弈。在这个循环博弈中,如图 2( 左图 ) ,橙喉雄性侧边斑点蜥蜴武力争夺蓝喉雄性侧边斑点蜥蜴的雌性配偶(石头抑制剪刀);蓝喉雄性侧边斑点蜥蜴武力捍卫自己的雌性配偶不受黄喉雄性侧边斑点蜥蜴袭扰(剪刀抑制布);由于橙喉雄性侧边斑点蜥蜴领地太大,顾此失彼,黄喉雄性侧边斑点蜥蜴得以偷偷摸摸地溜到没有设防的领地,找到雌蜥蜴成功交配 ( 布抑制石头 ) 。这种雄性个体间繁殖策略的石头 - 剪刀 - 布博弈直接导致了各亚种的种群数量呈现周期振荡,如图 2( 右图 ) 。 B. Sinervo 等人发现,各亚种的种群数量在 1990-1995 六年间呈现周期振荡:当蓝喉雄性侧边斑点蜥蜴的数量占据优势时,橙喉雄性侧边斑点蜥蜴的数量增加,从而抑制蓝喉雄性侧边斑点蜥蜴继续占据优势;随后橙喉雄性侧边斑点蜥蜴占据优势,黄喉雄性侧边斑点蜥蜴的数量增加,从而抑制橙喉雄性侧边斑点蜥蜴继续占据优势;紧接着黄喉雄性侧边斑点蜥蜴优势,蓝喉雄性侧边斑点蜥蜴数量增加,抑制黄喉雄性侧边斑点蜥蜴继续占据优势。如此往复,三亚种雄性蜥蜴互相制约,轮流居于优势地位,从而使蜥蜴总体数量上不会繁殖过快。因此,这种石头 - 剪刀 - 布博弈的繁殖策略被认为是生态系统维持稳定的一个重要途径。此外,蓝喉雄性侧边斑点蜥蜴个体间合作以及利他性也备受关注。当两只蓝喉雄性侧边斑点蜥蜴正在保护其领地不受橙喉雄性蜥蜴的侵犯时,其中一只蓝喉雄性蜥蜴将会忘我地上前迎战入侵者。它的这种利他行为可能会使其丧失与雌性蜥蜴成功交配的机会。蓝喉雄性侧边斑点蜥蜴的这种利他行为与动物将基因继续传递给下一代的生存本能大相径庭。 B. Sinervo 等人深入分析了 1990-2003 年观测到的侧边斑点蜥蜴数据后指出,尽管利他主义行为可能会损害某一只参加战斗的蓝喉雄性蜥蜴自身的繁殖机会,但是它却成全了其他蓝喉雄性蜥蜴与雌性交配,从而保护了它们的基因在下一代个体中能够继续存在 。 图 2 、(左图)三个亚种雄性斑点蜥蜴的繁殖策略相互循环抑制。(右图)依据 1990-1995 六年间各亚种的种群数量做出的各亚种比率振荡图。摘自文献 。 无独有偶, B. Sinervo 等人还发现雄性欧洲普通蜥蜴 (Lacerta vivipara) 在求偶时也会采取类似于石头 - 剪刀 - 布博弈的繁殖策略 。雄性欧洲普通蜥蜴依据腹部颜色的不同可分为橙色、黄色、白色三种。橙色腹部的雄性蜥蜴是暴力征服者,它会侵入别的蜥蜴的领地,并强行与那里的雌性蜥蜴交配;黄色腹部的雄性蜥蜴则是欺骗者,它会趁机潜入橙色腹部雄性蜥蜴空出来的领地与没有防备的雌性交配;白色腹部的雄性蜥蜴则是合作者,它会紧紧守护它的配偶,并与其它白色腹部蜥蜴合作共同阻止黄色腹部雄性蜥蜴侵入。这样就形成了 征服 - 合作 - 背叛 相互循环制约的繁殖策略:征服者 ( 橙色腹部雄性蜥蜴 ) 能战胜合作者 ( 白色腹部雄性蜥蜴 ) ,合作者又能战胜欺骗者 ( 黄色腹部雄性蜥蜴 ) ,欺骗者又能战胜征服者。 石头 - 剪刀 - 布博弈能够非常简洁的描述生态体系中个体间的相互作用,可以帮助我们理解生态群落 (biological communities) 是如何建立的。为了理解生态群落中的物种多样性,很多因素被引入石头 - 剪刀 - 布博弈,如长程捕食、病毒传播等等。然而,生态体系的另一个重要特征――群落结构,却知之甚少。这种群落结构的简单形式是一些规则的空间斑图如螺旋波、靶波等 ,我们对这一类自组织结构有了较好的理解。一方面,这些群落结构在宏观上可以用复杂网络加以描述,如生态食物链网络。另一方面,其微观机制则可以通过动力学加以描述。因此,通过演化博弈理论和复杂网络理论研究生态群落结构的形成以及其对物种多样性的影响将是被关注的热点课题。 参考文献: B. Sinervo and C. M. Livel, The rock-paper-scissors game and the evolution of alternative male strategies, Nature 380 , 240 (1996). B. Sinervo, A. Chaine, J. Clobert, R. Calsbeek, L. Hazard, L. Lancaster, A. G. McAdam, S. Alonzo, G. Corrigan and M. E. Hochberg, Self-recognition, color signals, and cycles of greenbeard mutualism and altruism, Proc. Natl Acad. Sci. USA 103 , 7372 (2006). B. Sinervo, B. Heulin, Y. Surget-Groba, J. Clobert, D. B. Miles, k A. Corl, A. Chaine, and A. Davis, Models of density-dependent genic selection and a new rock-paper-scissors social system, Am. Nat. 170 , 663 (2007). B. Kerr, M. A. Riley, M. W. Feldman, and B. J. M. Bohannan, Local dispersal promotes biodiversity in a real-life game of rock-paper-scissors, Nature 418 , 171 (2002). T. Reichenbach, M. Mobilia , E. Frey, Mobility promotes and jeopardizes biodiversity in rock-paper-scissors games, Nature 448 , 1046 (2007). L.-L. Jiang , T. Zhou, M. Perc, X. Huang and B.-H.Wang, Emergence of target waves in paced populations of cyclically competing species, New J. Phys. 11 , 103001 (2009). 姜罗罗的参赛博文:生态复杂系统中 石头-剪刀-布博弈的实例