⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 init_read.m

📁 Variable Reduction Testbench通过对变量进行相关性分析来实现减少变量的目的。
💻 M
字号:
function [SimpleCorr_T, R2_T, KIF_T] = init_read

% -------------------------------------------------------------------------
% this code is part of the 'Reduction Testbench' suite
% developed by A. Manganaro, R. Todeschini, A. Ballabio, D. Mauri
% 2006 - Milano Chemometrics and QSAR Research Group
% -------------------------------------------------------------------------
%
%
% [SimpleCorr_T, R2_T, KIF_T] = init_read
%
% init_read reads from the init file the values of the threshold used in
% the Simple Pairwise Correlation and R2 methods. If not found, sets the
% values to predefined defaults and creates the init file.
%
% Output:
% SimpleCorr_T = Simple Pairwise Correlation threshold
% R2_T = R2 threshold
% KIF_T = KIF threshold


echo off;

try
    
    % Try to open and read init file
    fid = fopen('reduction.ini','r');
    cur_vars = fscanf(fid,'%f',3);

    SimpleCorr_T = cur_vars(1);
    R2_T = cur_vars(2);
    KIF_T = cur_vars(3);

    fclose(fid);

catch

    % Error - sets variable to default values
    SimpleCorr_T = 0.95;
    R2_T = 10;
    KIF_T = 0.5;

    % Create a new init file
    fid = fopen('reduction.ini','w');
    fprintf(fid,'%1.3f %1.3f %1.3f',[SimpleCorr_T R2_T, KIF_T]);
    fclose(fid);
    
end

echo on;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -