diff --git a/+mml/+datasets/loadCargill.m b/+mml/+datasets/loadCargill.m index 1b9c0bf..33e1b13 100644 --- a/+mml/+datasets/loadCargill.m +++ b/+mml/+datasets/loadCargill.m @@ -16,22 +16,25 @@ % >> data = mml.datasets.loadShootout(false); % >> data % data = -% フィールドをもつ struct: -% calibrate_1: [1×1 struct] -% calibrate_2: [1×1 struct] -% calibrate_Y: [1×1 struct] -% validate_1: [1×1 struct] -% validate_2: [1×1 struct] -% validate_Y: [1×1 struct] -% test_1: [1×1 struct] -% test_2: [1×1 struct] -% test_Y: [1×1 struct] +% ソスtソスBソス[ソスソスソスhソスソスソスソスソスソス struct: +% calibrate_1: [1ソス~1 struct] +% calibrate_2: [1ソス~1 struct] +% calibrate_Y: [1ソス~1 struct] +% validate_1: [1ソス~1 struct] +% validate_2: [1ソス~1 struct] +% validate_Y: [1ソス~1 struct] +% test_1: [1ソス~1 struct] +% test_2: [1ソス~1 struct] +% test_Y: [1ソス~1 struct] warning('off', 'all');% turn off warnings. if ~exist('returnXy', 'var'), returnXy=true; end -dataPath='+mml\+datasets\corn.mat'; +pathnames = split(mfilename('fullpath'),'/'); +dirname = join(pathnames(1:(end-1)),'/'); +dataPath = [dirname{1} '/corn.mat']; + if exist(dataPath) ~= 2 url='http://www.eigenvector.com/data/Corn/corn.mat'; [A, cURL_out] = system(['curl ' url ' > ' dataPath]); diff --git a/+mml/+datasets/loadShootout.m b/+mml/+datasets/loadShootout.m index ee1c055..cf5bcdc 100644 --- a/+mml/+datasets/loadShootout.m +++ b/+mml/+datasets/loadShootout.m @@ -16,16 +16,16 @@ % >> data = mml.datasets.loadShootout(false); % >> data % data = -% フィールドをもつ struct: -% calibrate_1: [1×1 struct] -% calibrate_2: [1×1 struct] -% calibrate_Y: [1×1 struct] -% validate_1: [1×1 struct] -% validate_2: [1×1 struct] -% validate_Y: [1×1 struct] -% test_1: [1×1 struct] -% test_2: [1×1 struct] -% test_Y: [1×1 struct] +% ソスtソスBソス[ソスソスソスhソスソスソスソスソスソス struct: +% calibrate_1: [1ソス~1 struct] +% calibrate_2: [1ソス~1 struct] +% calibrate_Y: [1ソス~1 struct] +% validate_1: [1ソス~1 struct] +% validate_2: [1ソス~1 struct] +% validate_Y: [1ソス~1 struct] +% test_1: [1ソス~1 struct] +% test_2: [1ソス~1 struct] +% test_Y: [1ソス~1 struct] warning('off', 'all');% turn off warnings. @@ -43,12 +43,12 @@ end try - load('+mml\+datasets\nir_shootout_2002.mat'); + load('+mml/+datasets/nir_shootout_2002.mat'); catch warning('There is no nir_shootout_2002.mat file, so now downloading the file from eigenvector site.'); url='http://www.eigenvector.com/data/tablets/nir_shootout_2002.mat'; - [A, cURL_out] = system(['curl ' url '> +mml/+datasets/nir_shootout_2002.mat']); - load('+mml\+datasets\nir_shootout_2002.mat'); + [A, cURL_out] = system(['curl ' url ' > +mml/+datasets/nir_shootout_2002.mat']); + load('+mml/+datasets/nir_shootout_2002.mat'); end