?About the author: A Matlab simulation developer who loves scientific research. He cultivates his mind and improves his technology simultaneously. For cooperation on MATLAB projects, please send a private message.
Personal homepage: Matlab Research Studio
Personal credo: Investigate things to gain knowledge.
For more complete Matlab code and simulation customization content, click
Intelligent optimization algorithm Neural network prediction Radar communication Wireless sensor Power system
Signal processing Image processing Path planning Cellular automaton Drone
Content introduction
In statistics, interval forecasting is a commonly used method for estimating the range of future observations. It can help us better understand data uncertainty and provide decision-makers with more reliable information. The bootstrap method is a common interval prediction technique that estimates the distribution of observations by simulating resampling. This article will introduce the principles and applications of the Bootstrap method, and discuss its advantages and disadvantages.
The principle of the Bootstrap method is very simple. It constructs multiple new data sets by extracting samples from the original data set with replacement. Then, each new data set is statistically analyzed and the statistics of interest, such as the mean, median, or regression coefficient, are recorded. By repeating this process, we can obtain the distribution of a series of statistics. Finally, by calculating the quantiles of these distributions, we can obtain interval predictions for the observations.
One of the advantages of the Bootstrap method is that it does not rely on distributional assumptions about the data. This makes it very useful for non-parametric statistical problems, as it allows inference to be made without assuming the distribution of the data. In addition, the Bootstrap method can also handle small sample problems because it expands the sample size by simulating resampling. This allows us to more accurately estimate the distribution of future observations.
However, the Bootstrap approach also has some disadvantages. First, it requires a lot of computing resources and time, especially when dealing with large data sets. Each resampling requires the statistics to be recalculated, which can be very computationally expensive. Secondly, the Bootstrap method is very sensitive to extreme values and outliers. Since resampling is based on the original data set, the Bootstrap method may produce inaccurate results if there are outliers in the data. Therefore, when using the Bootstrap method, we should pay special attention to the quality and accuracy of the data.
In practical applications, the Bootstrap method has a wide range of application fields. For example, in the financial field, we can use the Bootstrap method to estimate the confidence interval of stock returns to help investors formulate risk management strategies. In medical research, the Bootstrap method can be used to estimate interval predictions of drug efficacy and side effects. In addition, in the field of marketing, the Bootstrap method can be used to estimate the confidence interval of product sales to help companies make market predictions and decisions.
All in all, the Bootstrap method is a powerful interval prediction technique that can help us better understand the uncertainty of the data. It has the advantages of not relying on data distribution assumptions and handling small sample problems, but it also requires attention to computational cost and sensitivity to outliers. In practical applications, we can choose appropriate statistics and resampling methods based on specific problems to obtain accurate and reliable interval prediction results. By properly applying the Bootstrap method, we can provide decision-makers with more reliable information and thereby make more informed decisions.
Part of the code
function [F,Pre,Recall,TP,FP,FN,numo]=cell_measures(I,G) % if max(max(I))>0 TP=0;FP=0;FN=0; [xg,yg]=size(G); G(1,:)=0;G(xg,:)=0;G(:,1)=0;G(:,yg)=0; G=bwareaopen(G,15,4); I=bwareaopen(I,15,4); [L1,~]=bwlabel(I,4); S=regionprops(L1,'Centroid'); Centroids=cat(1,S.Centroid); [numfp,~]=size(Centroids); xs=Centroids(:,1);ys=Centroids(:,2); [L,num]=bwlabel(G,8); numo=num; R1=logical(zeros(size(G))); for i=1:num R=logical(zeros(size(G))); R(find(L==i))=1; % figure,imshow(R),hold on,plot(xs,ys,'r.','MarkerSize',25); bwg=bwboundaries(R,4,'noholes'); [in,on]=inpolygon(xs,ys,bwg{1}(:,2),bwg{1}(:,1)); if numel(xs(in))>1 % TP=TP+1; FP=FP + numel(xs(in))-1; numfp=numfp-numel(xs(in))-1; elseif numel(xs(in))==1 % TP=TP+1; numfp=numfp-1; end if numel(xs(on))>0 % FP=FP + numel(xs(on)); numfp=numfp-numel(xs(on)); end if numel(xs(in))==0 FN=FN + 1; end end FP=FP + numfp; Pre=TP/(TP + FP); Recall=TP/(TP + FN); F=Pre*Recall*2/(Pre + Recall); % end
Running results
References
[1] Wu Qingping, Lin Suxian, Huang Fei. Non-parametric bootstrap method and its MATLAB implementation [J]. Journal of Lishui University, 2012, 34(2):5.DOI:10.3969/j.issn.1008-6749.2012.02.002.
[2] Wu Xinhong, Guo Guangyang. Bootstrapping in dara analysis: a matlab approach[J]. Master of Management Science Class, Department of Business Administration, University of Nanhua, 2003.