Introduction to Sparse Matrices in Scilab

Total Page:16

File Type:pdf, Size:1020Kb

Introduction to Sparse Matrices in Scilab Introduction to Sparse Matrices In Scilab Michael Baudin November 2011 R´esum´e The goal of this document is to present the management of sparse matrices in Scilab. We present the basic features of Scilab, which can create sparse matrices and can convert from and to dense matrices. We show how to solve sparse linear equations in Scilab, by using sparse LU decomposition and iterative methods. We present the sparse Cho- lesky decomposition. We present the functions from the UMFPACK and TAUCS modules. We briefly present the internal sparse API. We introduce to the Arnoldi package. We present the Matrix Market tool- box, which reads and writes sparse matrix files. We analyze how to solve the Poisson Partial Differential Equation with sparse matrices. We present the Imsls toolbox, a set of iterative solvers for sparse linear systems of equations. Table des mati`eres 1 Introduction4 1.1 Note on this document......................4 1.2 Overview.............................4 2 Basic features5 2.1 Creating sparse matrices.....................5 2.2 Storage format..........................8 2.3 Sparse arithmetic.........................9 1 3 Solving sparse linear equations9 3.1 Sparse LU decomposition.....................9 3.2 Sparse backslash......................... 12 3.3 Iterative methods for sparse linear equations.......... 13 4 Cholesky factorizations 14 4.1 The chfact and chsolve functions............... 15 4.2 The spchol function....................... 16 4.3 Conclusion............................. 18 5 Functions from the UMFPACK module 18 6 The UMFPACK package 19 7 The TAUCS package 21 8 The API 22 9 The ARnoldi PACKage 25 10 The Matrix Market module 26 11 Solving Poisson PDE with Sparse Matrices 29 11.1 Introduction............................ 29 11.2 The sparse matrix......................... 31 11.3 The Poisson Solver........................ 32 11.4 The benchmark.......................... 34 11.5 Conclusion............................. 37 12 The Imsls toolbox 37 Bibliography 39 2 Copyright c 2008-2011 - Consortium Scilab - Digiteo - Michael Baudin This file must be used under the terms of the Creative Commons Attribution- ShareAlike 3.0 Unported License : http://creativecommons.org/licenses/by-sa/3.0 3 1 Introduction In numerical analysis, a sparse matrix is a matrix populated primarily with zeros[13]. Huge sparse matrices often appear in science or engineering when solving partial differential equations. Scilab provides several features to manage sparse matrices and perform usual linear algebra operations on them. These operations includes all the basic linear algebra including addition, dot product, transpose and the matrix vector product. For these basic operations, we do not make any difference in a script managing a dense matrix and a script managing a sparse matrix. 1.1 Note on this document This document is an open-source project. The LATEX sources are available on the Scilab Forge : http://forge.scilab.org/index.php/p/docscisparse/ The LATEX sources are provided under the terms of the Creative Commons Attribution-ShareAlike 3.0 Unported License : http://creativecommons.org/licenses/by-sa/3.0 The Scilab scripts are provided on the Forge, inside the project, under the scripts sub-directory. The scripts are available under the CeCiLL licence : http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt 1.2 Overview In this section, we make an overview of the features provided by Scilab for sparse matrices. The current set of tools available in Scilab for sparse matrices are the following : { management of sparse matrices of arbitrary size, { basic algebra on sparse matrices, including, sum, dot product, trans- pose, matrix-matrix product, { sparse LU decomposition and resolution of linear equations from this decomposition based on the Sparse package written by Kenneth S. Kun- dert and Alberto Sangiovanni-Vincentelli, 4 { sparse Cholesky decomposition and resolution of linear equations from this decomposition, based on a sparse Cholesky factorization package developed by Esmond Ng and Barry Peyton at ORNL and a multiple minimun-degree ordering package by Joseph Liu at University of Wa- terloo, { iterative methods of linear systems of equations, including Precondi- tionned Conjugate Gradient (pcg), Generalized Minimum Residual me- thod (gmres), Quasi Minimal Residual method with preconditionning (qmr), { sparse LU decomposition and resolution of linear equations from this decomposition based on the UMFPACK library, { sparse Cholesky decomposition and resolution of linear equations from this decomposition based on the TAUCS library, { sparse eigenvalue computations, based on the Arpack library, using the Implicitly Restarted Arnoldi Method. Scilab manages several file formats read and write sparse matrices. { Scilab is able to read matrices in the Harwell-Boeing format, thanks to the ReadHBSparse function of the Umfpack module. { The Matrix Market external module (available in ATOMS) provides functions to read and write matrices in the Matrix Market format. 2 Basic features In this section, we present the basic sparse matrix features. In the first part, we review how to create a sparse matrix. Then we analyze how a sparse matrix is stored internally. 2.1 Creating sparse matrices The figure1 present several functions to create sparse matrices. In the following session, we use the sprand function to create a 100×1000 sparse matrix with density 0.001. The density parameter makes so that the number of non-zero entries in the sparse matrix is approximately equal to 100 · 1000 · 0:001 = 100. Then we use the size function to compute the size of the matrix. Finally, we compute the number of non-zero entries with the nnz function. -->A=sprand(100,1000,0.001); 5 sp2adj converts sparse matrix into adjacency form speye sparse identity matrix spones sparse matrix sprand sparse random matrix spzeros sparse zero matrix full sparse to full matrix conversion sparse sparse matrix definition mtlb sparse convert sparse matrix nnz number of non zero entries in a matrix spcompack converts a compressed adjacency representation spget retrieves entries of sparse matrix Figure 1 { Basic features for sparse matrices. -->size (A) ans = 100. 1000. -->nnz (A) ans = 100. The sparse and full functions works as complementary functions. In- deed, the sparse function converts a full matrix into a sparse one, while the full function converts a sparse matrix into a full one. In the following session, we create a 3 × 5 dense matrix. Then we use the sparse function to convert it into a sparse matrix. Scilab then displays all the non-zero entries of the matrix one at a time. Finally, we use the full function to convert the sparse matrix into a dense one. -->A = [ -->1 2 0 0 0 -->3 4 5 0 0 -->0 6 7 8 0 -->] A = 1. 2. 0. 0. 0. 3. 4. 5. 0. 0. 0. 6. 7. 8. 0. -->B = sparse(A) B = ( 3, 5) sparse matrix 6 ( 1, 1) 1. ( 1, 2) 2. ( 2, 1) 3. ( 2, 2) 4. ( 2, 3) 5. ( 3, 2) 6. ( 3, 3) 7. ( 3, 4) 8. -->C = full(B) C = 1. 2. 0. 0. 0. 3. 4. 5. 0. 0. 0. 6. 7. 8. 0. Sparse matrices can be real or complex. In the following session, we define a 3-by-5 complex matrix of doubles. -->A = [ -->1 2 0 0 0 -->3 4 5 0 0 -->0 6 7 8 0 -->]; -->B = [ -->9 10 0 0 0 -->11 12 13 0 0 -->0 14 15 16 0 -->]; -->C=complex(A,B) C = 1.+9.i 2.+10.i 0 0 0 3.+11.i 4.+12.i 5.+13.i 0 0 0 6.+14.i 7.+15.i 8.+16.i 0 -->D=sparse(C) D = ( 3, 5) sparse matrix ( 1, 1) 1.+9.i ( 1, 2) 2.+10.i ( 2, 1) 3.+11.i ( 2, 2) 4.+12.i ( 2, 3) 5.+13.i ( 3, 2) 6.+14.i ( 3, 3) 7.+15.i ( 3, 4) 8.+16.i 7 2.2 Storage format There are various ways of storing the nonzero entries of a sparse matrix. In this section, we review how sparse matrices are stored internally, at the library level. As we are going to see, the format used in Scilab is very similar (but not exactly identical) to the compressed sparse row format (CSR), in which the nonzero entries are stored row-by-row. While this detail does not change the way a user user sparse matrices at the interpreter level, it does have an impact on the way the libraries are connected to Scilab. Hence, this is an important feature of sparse matrices in Scilab and it is worthwhile to know precisely what is stored. In Scilab, a sparse matrix is defined in the modules/core/includes/s- parse.h. This is a C struct with type scisparse and the following fields : { int m : the number of rows. { int n : the number of columns. { int it : is equal to 0 if the matrix is real, and 1 if the matrix is complex. { int nel : number of nonzero elements */ { int *mnel : an array with m entries. The entry mnel[i] is the number of non nul elements of the i-th row. { int *icol : an array with nel entries. The entry icol[j] is the column of the j-th nonzero element. { double *R : an array with nel entries. The entry R[j] is the real part of the j-th nonzero element. { double *I : an array with nel entries. The entry I[j] is the imaginary part of the j-th nonzero element. Consider the sparse matrix in the following example. -->A = [ -->1 2 0 -->3 4 5 -->0 6 7 -->]; -->B = sparse(A); In this case, the fields are the following. B.m: 3 B.n: 3 B.it: 0 B. nel : 7 B.mnel: [2, 3, 2] 8 B.icol: [1, 2, 1, 2, 3, 2, 3] B.R: [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] B.I: [undefined] This current storage is different from the CSR format, in the sense that there is no array containing the row indices corresponding to the values and no array containing the cumulated indexes where each column starts.
Recommended publications
  • CUDA 6 and Beyond
    MUMPS USERS DAYS JUNE 1ST / 2ND 2017 Programming heterogeneous architectures with libraries: A survey of NVIDIA linear algebra libraries François Courteille |Principal Solutions Architect, NVIDIA |[email protected] ACKNOWLEDGEMENTS Joe Eaton , NVIDIA Ty McKercher , NVIDIA Lung Sheng Chien , NVIDIA Nikolay Markovskiy , NVIDIA Stan Posey , NVIDIA Steve Rennich , NVIDIA Dave Miles , NVIDIA Peng Wang, NVIDIA Questions: [email protected] 2 AGENDA Prolegomena NVIDIA Solutions for Accelerated Linear Algebra Libraries performance on Pascal Rapid software development for heterogeneous architecture 3 PROLEGOMENA 124 NVIDIA Gaming VR AI & HPC Self-Driving Cars GPU Computing 5 ONE ARCHITECTURE BUILT FOR BOTH DATA SCIENCE & COMPUTATIONAL SCIENCE AlexNet Training Performance 70x Pascal [CELLR ANGE] 60x 16nm FinFET 50x 40x CoWoS HBM2 30x 20x [CELLR ANGE] NVLink 10x [CELLR [CELLR ANGE] ANGE] 0x 2013 2014 2015 2016 cuDNN Pascal & Volta NVIDIA DGX-1 NVIDIA DGX SATURNV 65x in 3 Years 6 7 8 8 9 NVLINK TO CPU IBM Power Systems Server S822LC (codename “Minsky”) DDR4 DDR4 2x IBM Power8+ CPUs and 4x P100 GPUs 115GB/s 80 GB/s per GPU bidirectional for peer traffic IB P8+ CPU P8+ CPU IB 80 GB/s per GPU bidirectional to CPU P100 P100 P100 P100 115 GB/s CPU Memory Bandwidth Direct Load/store access to CPU Memory High Speed Copy Engines for bulk data movement 1615 UNIFIED MEMORY ON PASCAL Large datasets, Simple programming, High performance CUDA 8 Enable Large Oversubscribe GPU memory Pascal Data Models Allocate up to system memory size CPU GPU Higher Demand
    [Show full text]
  • IADS Group Uses Multiple MATLAB Licenses
    Can We Migrate Our Analysis Routines to Python? Introduction • Can we migrate our analysis routines to Python? - MATLAB is powerful, but it’s expensive. - Capable open-source alternatives exist and are thriving. • Recent developments in scientific Python libraries have made migration from MATLAB to Python possible and attractive. • The IADS Group uses multiple MATLAB licenses. Dominance of MATLAB • MATLAB is the standard language for engineering analysis. • No need to be a programmer to solve engineering problems. • Used for collaboration and development of analysis routines. • MATLAB is required for study in an engineering curriculum - ECE 309 (CSUN), “Numerical Methods in Electrical Engineering”, is now taught using MATLAB. It was taught using Pascal in the 1980s… Dependence on MATLAB • IADS uses MATLAB to prototype new analysis routines. • IADS uses MATLAB to test and maintain data export and import. We need MATLAB! • IADS uses a set of MATLAB scripts to test Autospectrum and PSD results for Every Release. • IADS is dependent upon MATLAB. Problems with Dependency • Budget constraints mean fewer licenses and toolboxes are available. • MATLAB version changes force retest What happens of data interfaces. if they take MATLAB away • Retest requires an active license. from us? • Test Scripts are unusable without a license. • Having no backup plan in place is risky. Requirements for a Replacement • Should have broad industry acceptance. • Should have scientific libraries that mimic functionality that is commonly used in MATLAB by the flight test community. • Should have similar syntax. • Total MATLAB functionality is not necessary for our purposes, but it would be nice for going forward. • Should be relatively free of periodic licensing hassles.
    [Show full text]
  • A Comparative Evaluation of Matlab, Octave, R, and Julia on Maya 1 Introduction
    A Comparative Evaluation of Matlab, Octave, R, and Julia on Maya Sai K. Popuri and Matthias K. Gobbert* Department of Mathematics and Statistics, University of Maryland, Baltimore County *Corresponding author: [email protected], www.umbc.edu/~gobbert Technical Report HPCF{2017{3, hpcf.umbc.edu > Publications Abstract Matlab is the most popular commercial package for numerical computations in mathematics, statistics, the sciences, engineering, and other fields. Octave is a freely available software used for numerical computing. R is a popular open source freely available software often used for statistical analysis and computing. Julia is a recent open source freely available high-level programming language with a sophisticated com- piler for high-performance numerical and statistical computing. They are all available to download on the Linux, Windows, and Mac OS X operating systems. We investigate whether the three freely available software are viable alternatives to Matlab for uses in research and teaching. We compare the results on part of the equipment of the cluster maya in the UMBC High Performance Computing Facility. The equipment has 72 nodes, each with two Intel E5-2650v2 Ivy Bridge (2.6 GHz, 20 MB cache) proces- sors with 8 cores per CPU, for a total of 16 cores per node. All nodes have 64 GB of main memory and are connected by a quad-data rate InfiniBand interconnect. The tests focused on usability lead us to conclude that Octave is the most compatible with Matlab, since it uses the same syntax and has the native capability of running m-files. R was hampered by somewhat different syntax or function names and some missing functions.
    [Show full text]
  • Julia, My New Friend for Computing and Optimization? Pierre Haessig, Lilian Besson
    Julia, my new friend for computing and optimization? Pierre Haessig, Lilian Besson To cite this version: Pierre Haessig, Lilian Besson. Julia, my new friend for computing and optimization?. Master. France. 2018. cel-01830248 HAL Id: cel-01830248 https://hal.archives-ouvertes.fr/cel-01830248 Submitted on 4 Jul 2018 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. « Julia, my new computing friend? » | 14 June 2018, IETR@Vannes | By: L. Besson & P. Haessig 1 « Julia, my New frieNd for computiNg aNd optimizatioN? » Intro to the Julia programming language, for MATLAB users Date: 14th of June 2018 Who: Lilian Besson & Pierre Haessig (SCEE & AUT team @ IETR / CentraleSupélec campus Rennes) « Julia, my new computing friend? » | 14 June 2018, IETR@Vannes | By: L. Besson & P. Haessig 2 AgeNda for today [30 miN] 1. What is Julia? [5 miN] 2. ComparisoN with MATLAB [5 miN] 3. Two examples of problems solved Julia [5 miN] 4. LoNger ex. oN optimizatioN with JuMP [13miN] 5. LiNks for more iNformatioN ? [2 miN] « Julia, my new computing friend? » | 14 June 2018, IETR@Vannes | By: L. Besson & P. Haessig 3 1. What is Julia ? Open-source and free programming language (MIT license) Developed since 2012 (creators: MIT researchers) Growing popularity worldwide, in research, data science, finance etc… Multi-platform: Windows, Mac OS X, GNU/Linux..
    [Show full text]
  • Delivering a Professional ®
    Delivering a professional ® We stand on the shoulders of giants (2015) Custodians of OpenFOAM® (2016) … www.esi-group.com 1 Copyright © ESICopyright Group, 2017. © ESI All Group, rights reserved.2017. All rights reserved. OpenFOAM – foreword Greetings from, and thanks to the Team • OpenCFD Core Development‣ Karen Kettle and Supporting Teams ‣ Takashi Minabe (Japan) ‣ Andrew Heather ‣ Mohsen Battoei (North America) ‣ Mattijs Janssens ‣ Ravi Ajjampudi (India) ‣ Sergio Ferraris ‣ Bjorn Landmann, Sebastien Vilfayeau (Germany) ‣ Mark Olesen ‣ Matej Forman (Training Coordinator) ‣ Prashant Sonakar ‣ Roger Almenar ‣ Pawan Ghildiyal ‣ Fred Mendonca OpenFOAM Operation www.esi-group.com 2 Copyright © ESI Group, 2017. All rights reserved. OpenCFD – Commitment to OpenFOAM Users Development and Release Schedule • OpenCFD owns the trademark • Releasing OpenFOAM since 2004 • Professional Six-monthly Development and Release cycle, including ‣ New developments ‣ Consolidated bug-fixes ‣ Overhaulled testing procedure for Quality Assurance ‣ Release and Development repositories in GitLab https://develop.openfoam.com ‣ Master branch ‣ Develop branch (includes > Master > Release ‣ Community Repositories > Develop www.esi-group.com 3 Copyright © ESI Group, 2017. All rights reserved. OpenCFD – Commitment to OpenFOAM Users Development and Release Schedule • OpenFOAM.com releases so far • OpenFOAM-v3.0+ on Jan 13th 2016 • OpenFOAM-v1606+ on June 30th 2016 • OpenFOAM-v1612+ on 23rd December 2016 • OpenFOAM-v1706 on 30th June 2017 www.esi-group.com 4 Copyright
    [Show full text]
  • Ordinary Differential Equations (ODE) Using Euler's Technique And
    Mathematical Models and Methods in Modern Science Ordinary Differential Equations (ODE) using Euler’s Technique and SCILAB Programming ZULZAMRI SALLEH Applied Sciences and Advance Technology Universiti Kuala Lumpur Malaysian Institute of Marine Engineering Technology Bandar Teknologi Maritim Jalan Pantai Remis 32200 Lumut, Perak MALAYSIA [email protected] http://www.mimet.edu.my Abstract: - Mathematics is very important for the engineering and scientist but to make understand the mathematics is very difficult if without proper tools and suitable measurement. A numerical method is one of the algorithms which involved with computer programming. In this paper, Scilab is used to carter the problems related the mathematical models such as Matrices, operation with ODE’s and solving the Integration. It remains true that solutions of the vast majority of first order initial value problems cannot be found by analytical means. Therefore, it is important to be able to approach the problem in other ways. Today there are numerous methods that produce numerical approximations to solutions of differential equations. Here, we introduce the oldest and simplest such method, originated by Euler about 1768. It is called the tangent line method or the Euler method. It uses a fixed step size h and generates the approximate solution. The purpose of this paper is to show the details of implementing of Euler’s method and made comparison between modify Euler’s and exact value by integration solution, as well as solve the ODE’s use built-in functions available in Scilab programming. Key-Words: - Numerical Methods, Scilab programming, Euler methods, Ordinary Differential Equation. 1 Introduction availability of digital computers has led to a Numerical methods are techniques by which veritable explosion in the use and development of mathematical problems are formulated so that they numerical methods [1].
    [Show full text]
  • Running Sagemath (With Or Without Installation)
    Running SageMath (with or without installation) http://www.sagemath.org/ Éric Gourgoulhon Running SageMath 9 Feb. 2017 1 / 5 Various ways to install/access SageMath 7.5.1 Install on your computer: 2 options: install a compiled binary version for Linux, MacOS X or Windows1 from http://www.sagemath.org/download.html compile from source (Linux, MacOS X): check the prerequisites (see here for Ubuntu) and run git clone git://github.com/sagemath/sage.git cd sage MAKE=’make -j8’ make Run on your computer without installation: Sage Debian Live http://sagedebianlive.metelu.net/ Bootable USB flash drive with SageMath (boosted with octave, scilab), Geogebra, LaTeX, gimp, vlc, LibreOffice,... Open a (free) account on SageMathCloud https://cloud.sagemath.com/ Run in SageMathCell Single cell mode: http://sagecell.sagemath.org/ 1requires VirtualBox; alternatively, a full Windows installer is in pre-release stage at https://github.com/embray/sage-windows/releases Éric Gourgoulhon Running SageMath 9 Feb. 2017 2 / 5 Example 1: installing on Ubuntu 16.04 1 Download the archive sage-7.5.1-Ubuntu_16.04-x86_64.tar.bz2 from one the mirrors listed at http://www.sagemath.org/download-linux.html 2 Run the following commands in a terminal: bunzip2 sage-7.5.1-Ubuntu_16.04-x86_64.tar.bz2 tar xvf sage-7.5.1-Ubuntu_16.04-x86_64.tar cd SageMath ./sage -n jupyter A Jupyter home page should then open in your browser. Click on New and select SageMath 7.5.1 to open a Jupyter notebook with a SageMath kernel. Éric Gourgoulhon Running SageMath 9 Feb. 2017 3 / 5 Example 2: using the SageMathCloud 1 Open a free account on https://cloud.sagemath.com/ 2 Create a new project 3 In the second top menu, click on New to create a new file 4 Select Jupyter Notebook for the file type 5 In the Jupyter menu, click on Kernel, then Change kernel and choose SageMath 7.5 Éric Gourgoulhon Running SageMath 9 Feb.
    [Show full text]
  • Freemat V3.6 Documentation
    FreeMat v3.6 Documentation Samit Basu November 16, 2008 2 Contents 1 Introduction and Getting Started 5 1.1 INSTALL Installing FreeMat . 5 1.1.1 General Instructions . 5 1.1.2 Linux . 5 1.1.3 Windows . 6 1.1.4 Mac OS X . 6 1.1.5 Source Code . 6 2 Variables and Arrays 7 2.1 CELL Cell Array Definitions . 7 2.1.1 Usage . 7 2.1.2 Examples . 7 2.2 Function Handles . 8 2.2.1 Usage . 8 2.3 GLOBAL Global Variables . 8 2.3.1 Usage . 8 2.3.2 Example . 9 2.4 INDEXING Indexing Expressions . 9 2.4.1 Usage . 9 2.4.2 Array Indexing . 9 2.4.3 Cell Indexing . 13 2.4.4 Structure Indexing . 14 2.4.5 Complex Indexing . 16 2.5 MATRIX Matrix Definitions . 17 2.5.1 Usage . 17 2.5.2 Examples . 17 2.6 PERSISTENT Persistent Variables . 19 2.6.1 Usage . 19 2.6.2 Example . 19 2.7 STRING String Arrays . 20 2.7.1 Usage . 20 2.8 STRUCT Structure Array Constructor . 22 2.8.1 Usage . 22 2.8.2 Example . 22 3 4 CONTENTS 3 Functions and Scripts 25 3.1 ANONYMOUS Anonymous Functions . 25 3.1.1 Usage . 25 3.1.2 Examples . 25 3.2 FUNCTION Function Declarations . 26 3.2.1 Usage . 26 3.2.2 Examples . 28 3.3 KEYWORDS Function Keywords . 30 3.3.1 Usage . 30 3.3.2 Example . 31 3.4 NARGIN Number of Input Arguments . 32 3.4.1 Usage .
    [Show full text]
  • Towards a Fully Automated Extraction and Interpretation of Tabular Data Using Machine Learning
    UPTEC F 19050 Examensarbete 30 hp August 2019 Towards a fully automated extraction and interpretation of tabular data using machine learning Per Hedbrant Per Hedbrant Master Thesis in Engineering Physics Department of Engineering Sciences Uppsala University Sweden Abstract Towards a fully automated extraction and interpretation of tabular data using machine learning Per Hedbrant Teknisk- naturvetenskaplig fakultet UTH-enheten Motivation A challenge for researchers at CBCS is the ability to efficiently manage the Besöksadress: different data formats that frequently are changed. Significant amount of time is Ångströmlaboratoriet Lägerhyddsvägen 1 spent on manual pre-processing, converting from one format to another. There are Hus 4, Plan 0 currently no solutions that uses pattern recognition to locate and automatically recognise data structures in a spreadsheet. Postadress: Box 536 751 21 Uppsala Problem Definition The desired solution is to build a self-learning Software as-a-Service (SaaS) for Telefon: automated recognition and loading of data stored in arbitrary formats. The aim of 018 – 471 30 03 this study is three-folded: A) Investigate if unsupervised machine learning Telefax: methods can be used to label different types of cells in spreadsheets. B) 018 – 471 30 00 Investigate if a hypothesis-generating algorithm can be used to label different types of cells in spreadsheets. C) Advise on choices of architecture and Hemsida: technologies for the SaaS solution. http://www.teknat.uu.se/student Method A pre-processing framework is built that can read and pre-process any type of spreadsheet into a feature matrix. Different datasets are read and clustered. An investigation on the usefulness of reducing the dimensionality is also done.
    [Show full text]
  • The Freemat Primer Page 1 of 218 Table of Contents About the Authors
    The Freemat 4.0 Primer By Gary Schafer Timothy Cyders First Edition August 2011 The Freemat Primer Page 1 of 218 Table of Contents About the Authors......................................................................................................................................5 Acknowledgements...............................................................................................................................5 User Assumptions..................................................................................................................................5 How This Book Was Put Together........................................................................................................5 Licensing...............................................................................................................................................6 Using with Freemat v4.0 Documentation .............................................................................................6 Topic 1: Working with Freemat.................................................................................................................7 Topic 1.1: The Main Screen - Ver 4.0..................................................................................................7 Topic 1.1.1: The File Browser Section...........................................................................................10 Topic 1.1.2: The History Section....................................................................................................10 Topic 1.1.3: The
    [Show full text]
  • Freemat V4.0 Documentation
    FreeMat v4.0 Documentation Samit Basu October 4, 2009 2 Contents 1 Introduction and Getting Started 39 1.1 INSTALL Installing FreeMat . 39 1.1.1 General Instructions . 39 1.1.2 Linux . 39 1.1.3 Windows . 40 1.1.4 Mac OS X . 40 1.1.5 Source Code . 40 2 Variables and Arrays 41 2.1 CELL Cell Array Definitions . 41 2.1.1 Usage . 41 2.1.2 Examples . 41 2.2 Function Handles . 42 2.2.1 Usage . 42 2.3 GLOBAL Global Variables . 42 2.3.1 Usage . 42 2.3.2 Example . 42 2.4 INDEXING Indexing Expressions . 43 2.4.1 Usage . 43 2.4.2 Array Indexing . 43 2.4.3 Cell Indexing . 46 2.4.4 Structure Indexing . 47 2.4.5 Complex Indexing . 49 2.5 MATRIX Matrix Definitions . 49 2.5.1 Usage . 49 2.5.2 Examples . 49 2.6 PERSISTENT Persistent Variables . 51 2.6.1 Usage . 51 2.6.2 Example . 51 2.7 STRUCT Structure Array Constructor . 51 2.7.1 Usage . 51 2.7.2 Example . 52 3 4 CONTENTS 3 Functions and Scripts 55 3.1 ANONYMOUS Anonymous Functions . 55 3.1.1 Usage . 55 3.1.2 Examples . 55 3.2 FUNCTION Function Declarations . 56 3.2.1 Usage . 56 3.2.2 Examples . 57 3.3 KEYWORDS Function Keywords . 60 3.3.1 Usage . 60 3.3.2 Example . 60 3.4 NARGIN Number of Input Arguments . 61 3.4.1 Usage . 61 3.4.2 Example . 61 3.5 NARGOUT Number of Output Arguments .
    [Show full text]
  • LARGE-SCALE COMPUTATION of PSEUDOSPECTRA USING ARPACK and EIGS∗ 1. Introduction. the Matrices in Many Eigenvalue Problems
    SIAM J. SCI. COMPUT. c 2001 Society for Industrial and Applied Mathematics Vol. 23, No. 2, pp. 591–605 LARGE-SCALE COMPUTATION OF PSEUDOSPECTRA USING ARPACK AND EIGS∗ THOMAS G. WRIGHT† AND LLOYD N. TREFETHEN† Abstract. ARPACK and its Matlab counterpart, eigs, are software packages that calculate some eigenvalues of a large nonsymmetric matrix by Arnoldi iteration with implicit restarts. We show that at a small additional cost, which diminishes relatively as the matrix dimension increases, good estimates of pseudospectra in addition to eigenvalues can be obtained as a by-product. Thus in large- scale eigenvalue calculations it is feasible to obtain routinely not just eigenvalue approximations, but also information as to whether or not the eigenvalues are likely to be physically significant. Examples are presented for matrices with dimension up to 200,000. Key words. Arnoldi, ARPACK, eigenvalues, implicit restarting, pseudospectra AMS subject classifications. 65F15, 65F30, 65F50 PII. S106482750037322X 1. Introduction. The matrices in many eigenvalue problems are too large to allow direct computation of their full spectra, and two of the iterative tools available for computing a part of the spectrum are ARPACK [10, 11]and its Matlab counter- part, eigs.1 For nonsymmetric matrices, the mathematical basis of these packages is the Arnoldi iteration with implicit restarting [11, 23], which works by compressing the matrix to an “interesting” Hessenberg matrix, one which contains information about the eigenvalues and eigenvectors of interest. For general information on large-scale nonsymmetric matrix eigenvalue iterations, see [2, 21, 29, 31]. For some matrices, nonnormality (nonorthogonality of the eigenvectors) may be physically important [30].
    [Show full text]