Parametric model

  • In Statistics 
    • Parametric model == Parametric family == Finite-dimentional model 维度有限
    • A particular class of statistical models 
    • A parametric model -> a family of probability distribution (on some space) that has a finite number of parameters 
    • Examples 
      1. Exponential distributions 
      2. Poisson distribution
      3. Weibull distribution
      4. Normal distribution
      5.  Linear regression

  • Machine Learning -> to learn/find an unknown function 
    1. choose the appropriate form for the function
    2. find the best parameter(s) by traning & testing on dataset
    3. Parametric models
    • Linear Regression 
    • Logistic Regeression 
    • Perceptron
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Sure, here is the MATLAB code that implements the parametric bootstrap: ```matlab % Load forearm data load forearm % Define function that fits linear regression model and returns coefficient estimates fit_lm = @(x, y) [ones(size(x)), x] \ y; % Define number of bootstrap samples B = 1000; % Define empty arrays to store bootstrap estimates beta0_boot = zeros(B, 1); beta1_boot = zeros(B, 1); % Compute original coefficient estimates beta_orig = fit_lm(forearm(:, 1), forearm(:, 2)); % Compute standard deviation of residuals resid_std = std(forearm(:, 2) - beta_orig(1) - beta_orig(2) * forearm(:, 1)); % Perform bootstrap for i = 1:B % Generate bootstrap sample y_boot = beta_orig(1) + beta_orig(2) * forearm(:, 1) + randn(size(forearm(:, 1))) * resid_std; % Fit linear regression model to bootstrap sample beta_boot = fit_lm(forearm(:, 1), y_boot); % Store bootstrap estimates beta0_boot(i) = beta_boot(1); beta1_boot(i) = beta_boot(2); end % Compute bootstrap standard errors and bias beta0_se = std(beta0_boot); beta1_se = std(beta1_boot); beta0_bias = mean(beta0_boot) - beta_orig(1); beta1_bias = mean(beta1_boot) - beta_orig(2); % Display results disp(['Bootstrap standard error of intercept: ', num2str(beta0_se)]); disp(['Bootstrap standard error of slope: ', num2str(beta1_se)]); disp(['Bootstrap bias of intercept: ', num2str(beta0_bias)]); disp(['Bootstrap bias of slope: ', num2str(beta1_bias)]); ``` This code fits a linear regression model to the forearm data using the `fit_lm` function, which simply calls the backslash operator to perform the least squares optimization. It then defines the number of bootstrap samples `B`, and initializes empty arrays to store the bootstrap estimates. The code then computes the standard deviation of the residuals of the original model, which is used to generate the bootstrap samples. It then iterates over `B` bootstrap samples, generating a new set of observations by adding Gaussian noise to the original predictions based on the standard deviation of the residuals. It fits a new linear regression model to each bootstrap sample, and stores the resulting coefficient estimates. Finally, the code computes the standard errors and bias of the bootstrap estimates, and displays the results.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值