X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=CreaPhase.git;a=blobdiff_plain;f=octave_packages%2Fnan-2.5.5%2Fload_fisheriris.m;fp=octave_packages%2Fnan-2.5.5%2Fload_fisheriris.m;h=2b967ee2313d7fdf4394ff7a1386cba3860b6967;hp=0000000000000000000000000000000000000000;hb=f5f7a74bd8a4900f0b797da6783be80e11a68d86;hpb=1705066eceaaea976f010f669ce8e972f3734b05 diff --git a/octave_packages/nan-2.5.5/load_fisheriris.m b/octave_packages/nan-2.5.5/load_fisheriris.m new file mode 100644 index 0000000..2b967ee --- /dev/null +++ b/octave_packages/nan-2.5.5/load_fisheriris.m @@ -0,0 +1,44 @@ +% LOAD_FISHERIRIS +% loads famous iris data set from Fisher, 1936 [1]. +% +% References: +% [1] Fisher,R.A. "The use of multiple measurements in taxonomic problems" +% Annual Eugenics, 7, Part II, 179-188 (1936); also in "Contributions to Mathematical Statistics" (John Wiley, NY, 1950). +% [2] Duda,R.O., & Hart,P.E. (1973) Pattern Classification and Scene Analysis. +% (Q327.D83) John Wiley & Sons. ISBN 0-471-22361-1. See page 218. + +% $Id$ +% Copyright (C) 2009,2010 by Alois Schloegl +% This function is part of the NaN-toolbox +% http://pub.ist.ac.at/~schloegl/matlab/NaN/ + +% This program is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License +% as published by the Free Software Foundation; either version 3 +% of the License, or (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + + +if exist('OCTAVE_VERSION','builtin') + if ~exist('iris.data','file') + if strncmp(computer,'PCWIN',5) + fprintf(1,'Download http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data and save in local directory %s\nPress any key to continue ...\n',pwd); + else + unix('wget http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data'); + end; + end; + tmp = fopen('iris.data'); species=fread(tmp,[1,inf],'uint8=>char'); fclose(tmp); + [meas,tmp,species]=str2double(species,','); + meas = meas(:,1:4); + species = species(:,5); +else + load fisheriris; +end; \ No newline at end of file