zoukankan      html  css  js  c++  java
  • matlab kriging模型

    kriging工具箱:https://orbit.dtu.dk/en/publications/dace-a-matlab-kriging-toolbox

    x=rand(1,100)*5;
    y=rand(1,100)*5;
    z=x./(y+1)+0.01*rand(1,100);
    data=[x',y',z'];
    scatter(x,y,25,z);
    colorbar;
    
    %模型参数设置
    theta = [5 5]; lob = [1e-1 1e-1]; upb = [20 20];
    %变异函数模型为高斯模型
    [dmodel, perf] = dacefit(data(:,1:2), data(:,3), @regpoly0, @corrgauss, theta, lob, upb);
    %创建一个40*40的网格,范围为0-5
    X = gridsamp([0 0;5 5], 40);
    %格网点的预测值返回在矩阵YX中,预测点的均方根误差返回在矩阵MSE中
    [YX,MSE] = predictor(X, dmodel);
    X1 = reshape(X(:,1),40,40); X2 = reshape(X(:,2),40,40);
    YX = reshape(YX, size(X1));         %size(X1)=40*40
    mesh(X1, X2, YX);         %绘制预测表面
    

    theta是初始值,lob和upb是参数范围,计算结果存在dmodel.theta中。

    >> dmodel.theta
    ans =
       0.903390452322443   4.718047509652705
    

    当对模型不确定或者变量波动剧烈时,所给范围宜较宽。

    若初始值选取不合理,则可能造成曲面波动。

    如以下情况:

  • 相关阅读:
    GRIDVIEW导出到EXCEL
    .NET GRIDVIEW导出EXCEL
    C#自动列宽
    vue 路由跳转及传值和取值
    vue 部署windows nginx服务上
    vue多个代理配置vue.config
    mock常用规则
    git基础篇-常见错误
    git基础篇-使用教程
    win10 gitserver搭建
  • 原文地址:https://www.cnblogs.com/dingdangsunny/p/15658914.html
Copyright © 2011-2022 走看看