kpca_py

所属分类:其他
开发工具:Python
文件大小:7KB
下载次数:68
上传日期:2013-04-08 22:30:41
上 传 者woyaowan1234
说明:  python实现的PCA,即Python script for kernel PCA with and without CUDA,效率非常好
(python implementation of the PCA, Python the script for kernel the PCA with and without CUDA, the efficiency is very good)

文件列表:
kpca.py (7047, 2011-10-11)
gpukpca.py (7310, 2011-10-05)

{\rtf1\ansi\ansicpg1252\deff0\deflang1031\deflangfe1031{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}{\f1\fnil Consolas;}} {\colortbl ;\red0\green0\blue255;\red0\green0\blue0;\red255\green255\blue150;\red232\green242\blue254;\red0\green170\blue0;} {\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\nowidctlpar\lang2057\b\f0\fs20 kpca.py gpukpca.py\par \par \b0 These scripts requires the Python packages numpy, scipy and osgeo/gdal and assumes that the GDAL binaries are correctly installed, see\par \fs24\par \pard\fs20{\field{\*\fldinst{HYPERLINK "http://trac.osgeo.org/gdal/wiki/GdalOgrInPython"}}{\fldrslt{\ul\cf1 http://trac.osgeo.org/gdal/wiki/GdalOgrInPython}}}\f0\fs24\par \par \fs20 gpukPCA.py also requires a CUDA-enabled graphics processor, the CUDA 3.2 toolkit and Derek Anderson's PyCUBLAS package (included in a slightly modified form). You may have to modify the ctypes wrapper in line 138 to match the name of your CUBLAS library, e.g. on a ***b Windows:\par \par \cf2\highlight3\f1 libcublas\highlight4 = ctypes.windll.LoadLibrary(\cf5\i 'cublas***_32_16.\ul dll\ulnone '\cf2\i0 )\cf0\highlight0\f0\par \par For example, on Windows you can use the Pythonxy distribution including the GDAL plugin. \par \par Usage: \par \par python kpca.py [-p pos \endash d dims \endash k kernel \endash s samples \endash n numeivs] inflemame\par \par or \par \par python gpukpca.py [-p pos \endash d dims \endash k kernel \endash s samples \endash n numeivs] inflemame\par \par where \i infilename \i0 is a fully qualified file name (i.e., including path. Bandpositions \i pos \i0 and spatial dimensions \i dims \i0 are quoted lists, e.g.,\par \par \pard\nowidctlpar\fi-360\li720\tx720 -\tab p \'b4[0,1,2]\'b4 - d \'b4[0,399,0,399]\'b4\par \pard\nowidctlpar\par Image formats can be any of\fs24\par \fs20\par ENVI Standard e.g. image1\fs24\par \fs20 image1.hdr \fs24\par \par \fs20 PCI Geomatics e.g. image1.pix\fs24\par \par \fs20 ERDAS IMAGINE e.g. image1.img\fs24\par \par \fs20 ARCVIEW Raster e.g. image1.bil\fs24\par \lang1031\fs20 image1.hdr\fs24\par \par \fs20 TIFF/GeoTIFF e.g. image1.tif\fs24\par \par \lang2057\fs20 The output file is given the basename \i infile_kpca\i0 with the same extension as \i infile\i0 .\par \fs24\par \fs20 The georeferencing information from the input image is transferred to the output image. Note: If the input images are not 'north up', i.e., rotation 0.0, the actual rotation is lost in the output file (bug in GDAL?).\par \par \fs24\par }

近期下载者

相关文件


收藏者