{"id":796,"date":"2025-01-11T12:37:31","date_gmt":"2025-01-11T04:37:31","guid":{"rendered":"http:\/\/www.rfnirs.com\/?p=796"},"modified":"2025-01-12T10:39:39","modified_gmt":"2025-01-12T02:39:39","slug":"%e3%80%90%e4%b8%93%e9%a2%98%e3%80%91%e4%b8%b4%e5%ba%8a%e7%a0%94%e7%a9%b6%e6%a0%b7%e6%9c%ac%e9%87%8f%e8%ae%a1%e7%ae%97%ef%bc%88matlab%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.rfnirs.com\/index.php\/2025\/01\/11\/%e3%80%90%e4%b8%93%e9%a2%98%e3%80%91%e4%b8%b4%e5%ba%8a%e7%a0%94%e7%a9%b6%e6%a0%b7%e6%9c%ac%e9%87%8f%e8%ae%a1%e7%ae%97%ef%bc%88matlab%ef%bc%89\/","title":{"rendered":"\u3010\u4e13\u9898\u3011\u4e34\u5e8a\u7814\u7a76\u6837\u672c\u91cf\u8ba1\u7b97\uff08Matlab\uff09"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"796\" class=\"elementor elementor-796\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4344d6f e-flex e-con-boxed e-con e-parent\" data-id=\"4344d6f\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-fb91ae4 elementor-widget elementor-widget-heading\" data-id=\"fb91ae4\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.21.0 - 30-04-2024 *\/\n.elementor-heading-title{padding:0;margin:0;line-height:1}.elementor-widget-heading .elementor-heading-title[class*=elementor-size-]>a{color:inherit;font-size:inherit;line-height:inherit}.elementor-widget-heading .elementor-heading-title.elementor-size-small{font-size:15px}.elementor-widget-heading .elementor-heading-title.elementor-size-medium{font-size:19px}.elementor-widget-heading .elementor-heading-title.elementor-size-large{font-size:29px}.elementor-widget-heading .elementor-heading-title.elementor-size-xl{font-size:39px}.elementor-widget-heading .elementor-heading-title.elementor-size-xxl{font-size:59px}<\/style><h2 class=\"elementor-heading-title elementor-size-default\">\u4e8c\u3001\u5e73\u884c\u8bbe\u8ba1\u7684\u591a\u72ec\u7acb\u6837\u672c\u5747\u6570\u6bd4\u8f83<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dfdaf0c elementor-widget elementor-widget-text-editor\" data-id=\"dfdaf0c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.21.0 - 30-04-2024 *\/\n.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#69727d;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#69727d;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}<\/style>\t\t\t\t<p>function n = calculate_sample_size(alpha, beta, sigma, mu,dropout_rate)<\/p>\n<p>&nbsp; &nbsp; % alpha: \u663e\u8457\u6027\u6c34\u5e73 (\u4f8b\u5982 0.05)<\/p>\n<p>&nbsp; &nbsp; % beta: \u68c0\u9a8c\u7684\u4e8c\u7c7b\u9519\u8bef\u6982\u7387 (\u4f8b\u5982 0.1, \u8868\u793a\u529f\u6548\u4e3a 90%)<\/p>\n<p>&nbsp; &nbsp; % sigma: \u603b\u4f53\u6807\u51c6\u5dee<\/p>\n<p>&nbsp; &nbsp; % mu: \u5404\u7ec4\u7684\u5747\u503c (\u5411\u91cf\uff0c\u4f8b\u5982 [8.35, 12, 13.15])<\/p>\n<p>&nbsp; &nbsp; %\u6d4b\u8bd5<\/p>\n<p>%&nbsp; &nbsp; &nbsp;alpha=0.05;<\/p>\n<p>%&nbsp; &nbsp; &nbsp;beta=0.1;<\/p>\n<p>%&nbsp; &nbsp; &nbsp;sigma=3.2;<\/p>\n<p>%&nbsp; &nbsp; &nbsp;mu=[8.35, 12.00, 13.15]<\/p>\n<p>%&nbsp; &nbsp; &nbsp;dropout_rate=0.1<\/p>\n<p>&nbsp; &nbsp; %\u53c2\u8003\u6587\u732e\uff1a\u9093\u4f1f.\u4e34\u5e8a\u8bd5\u9a8c\u8bbe\u8ba1\u4e0e\u7edf\u8ba1\u5206\u6790[M].\u4eba\u6c11\u536b\u751f\u51fa\u7248\u793e,2012.<\/p>\n<p>lambda_data=[11.68 7.85 14.88 10.51&nbsp;<\/p>\n<p>13.89 9.64 17.43 12.66&nbsp;<\/p>\n<p>15.46 10.91 19.25 14.18&nbsp;<\/p>\n<p>16.75 11.94 20.74 15.41&nbsp;<\/p>\n<p>17.87 12.83 22.03 16.47&nbsp;<\/p>\n<p>18.88 13.63 23.19 17.42&nbsp;<\/p>\n<p>19.79 14.36 24.24 18.29&nbsp;<\/p>\n<p>20.64 15.03 25.22 19.09&nbsp;<\/p>\n<p>21.43 15.65 26.13 19.83&nbsp;<\/p>\n<p>22.18 16.25 26.99 20.54&nbsp;<\/p>\n<p>22.89 16.81 27.80 21.20&nbsp;<\/p>\n<p>23.57 17.34 28.58 21.84&nbsp;<\/p>\n<p>24.22 17.85 29.32 22.44&nbsp;<\/p>\n<p>24.84 18.34 30.04 23.03&nbsp;<\/p>\n<p>25.44 18.82 30.73 23.59&nbsp;<\/p>\n<p>26.02 19.27 31.39 24.13&nbsp;<\/p>\n<p>26.58 19.71 32.04 24.65&nbsp;<\/p>\n<p>27.12 20.14 32.66 25.16&nbsp;<\/p>\n<p>27.65 20.56 33.27 25.66&nbsp;<\/p>\n<p>];<\/p>\n<p>&nbsp; &nbsp; k = length(mu);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;% \u7ec4\u6570<\/p>\n<p>&nbsp; &nbsp; mu_bar = mean(mu);&nbsp; &nbsp; &nbsp; &nbsp; % \u7ec4\u5747\u503c\u7684\u7b97\u672f\u5e73\u5747\u503c<\/p>\n<p>&nbsp; &nbsp; df = k &#8211; 1;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;% \u81ea\u7531\u5ea6<\/p>\n<p>&nbsp; &nbsp; % Step 1: \u8ba1\u7b97\u6548\u5e94\u91cf Delta<\/p>\n<p>&nbsp; &nbsp; Delta = (1 \/ sigma^2) * sum((mu &#8211; mu_bar).^2);<\/p>\n<p>% Step 2: \u67e5\u627e Lambda<\/p>\n<p>if beta == 0.2 &amp;&amp; alpha == 0.01;<\/p>\n<p>&nbsp; &nbsp; lambda = lambda_data(df, 1);&nbsp; % \u5bf9\u5e94 beta=0.2, alpha=0.01 \u7684\u975e\u4e2d\u5fc3\u53c2\u6570<\/p>\n<p>elseif beta == 0.2 &amp;&amp; alpha == 0.05;<\/p>\n<p>&nbsp; &nbsp; lambda = lambda_data(df, 2);&nbsp; % \u5bf9\u5e94 beta=0.2, alpha=0.05 \u7684\u975e\u4e2d\u5fc3\u53c2\u6570<\/p>\n<p>elseif beta == 0.1 &amp;&amp; alpha == 0.01;<\/p>\n<p>&nbsp; &nbsp; lambda = lambda_data(df, 3);&nbsp; % \u5bf9\u5e94 beta=0.1, alpha=0.01 \u7684\u975e\u4e2d\u5fc3\u53c2\u6570<\/p>\n<p>elseif beta == 0.1 &amp;&amp; alpha == 0.05;<\/p>\n<p>&nbsp; &nbsp; lambda = lambda_data(df, 4);&nbsp; % \u5bf9\u5e94 beta=0.1, alpha=0.05 \u7684\u975e\u4e2d\u5fc3\u53c2\u6570<\/p>\n<p>else<\/p>\n<p>&nbsp; &nbsp; error(&#8216;\u65e0\u6cd5\u627e\u5230\u5bf9\u5e94\u7684 lambda \u503c\uff0c\u8bf7\u68c0\u67e5 alpha \u548c beta \u7684\u8f93\u5165\u662f\u5426\u6b63\u786e&#8217;);<\/p>\n<p>end<\/p>\n<p>&nbsp; &nbsp; % Step 3: \u6837\u672c\u91cf\u8ba1\u7b97<\/p>\n<p>&nbsp; &nbsp; n = lambda \/ Delta;<\/p>\n<p>&nbsp; &nbsp; modyfy_n=ceil(n*(1+dropout_rate));<\/p>\n<p>&nbsp; &nbsp; % \u8f93\u51fa\u7ed3\u679c<\/p>\n<p>&nbsp; &nbsp; disp([&#8216;\u03bb \u503c\u4e3a\uff1a&#8217;, num2str(lambda)]);<\/p>\n<p>&nbsp; &nbsp; disp([&#8216;\u7ec4\u5747\u503c\u7684\u7b97\u672f\u5e73\u5747\u503c\u4e3a\uff1a&#8217;, num2str(mu_bar)]);<\/p>\n<p>&nbsp; &nbsp; disp([&#8216;\u6bcf\u7ec4\u7684\u6837\u672c\u91cf\u4e3a\uff1a&#8217;, num2str(ceil(n))]);<\/p>\n<p>&nbsp; &nbsp; disp([&#8216;\u8131\u843d\u7387\u4e3a\uff1a&#8217;, num2str(dropout_rate)]);<\/p>\n<p>&nbsp; &nbsp; disp([&#8216;\u8003\u8651\u8131\u843d\u7387\u6837\u672c\u91cf\u4e3a\uff1a&#8217;, num2str(modyfy_n)]);<\/p>\n<p>end<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u4e8c\u3001\u5e73\u884c\u8bbe\u8ba1\u7684\u591a\u72ec\u7acb\u6837\u672c\u5747\u6570\u6bd4\u8f83 function n = calculate_sample_size(alp [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"","ocean_second_sidebar":"","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"","ocean_custom_header_template":"","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"","ocean_menu_typo_font_family":"","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[6,9],"tags":[],"class_list":["post-796","post","type-post","status-publish","format-standard","hentry","category-fnirs","category-9","entry"],"_links":{"self":[{"href":"http:\/\/www.rfnirs.com\/index.php\/wp-json\/wp\/v2\/posts\/796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.rfnirs.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.rfnirs.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.rfnirs.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.rfnirs.com\/index.php\/wp-json\/wp\/v2\/comments?post=796"}],"version-history":[{"count":7,"href":"http:\/\/www.rfnirs.com\/index.php\/wp-json\/wp\/v2\/posts\/796\/revisions"}],"predecessor-version":[{"id":803,"href":"http:\/\/www.rfnirs.com\/index.php\/wp-json\/wp\/v2\/posts\/796\/revisions\/803"}],"wp:attachment":[{"href":"http:\/\/www.rfnirs.com\/index.php\/wp-json\/wp\/v2\/media?parent=796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.rfnirs.com\/index.php\/wp-json\/wp\/v2\/categories?post=796"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.rfnirs.com\/index.php\/wp-json\/wp\/v2\/tags?post=796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}