SAS Viya
185 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris
Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus
185 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus

Description

Learn how to access analytics from SAS Cloud Analytic Services (CAS) using Python and the SAS Viya platform.


SAS Viya : The Python Perspective is an introduction to using the Python client on the SAS Viya platform. SAS Viya is a high-performance, fault-tolerant analytics architecture that can be deployed on both public and private cloud infrastructures. While SAS Viya can be used by various SAS applications, it also enables you to access analytic methods from SAS, Python, Lua, and Java, as well as through a REST interface using HTTP or HTTPS.

This book focuses on the perspective of SAS Viya from Python.
SAS Viya is made up of multiple components. The central piece of this ecosystem is SAS Cloud Analytic Services (CAS). CAS is the cloud-based server that all clients communicate with to run analytical methods. The Python client is used to drive the CAS component directly using objects and constructs that are familiar to Python programmers.


Some knowledge of Python would be helpful before using this book; however, there is an appendix that covers the features of Python that are used in the CAS Python client. Knowledge of CAS is not required to use this book. However, you will need to have a CAS server set up and running to execute the examples in this book.


With this book, you will learn how to:

  • Install the required components for accessing CAS from Python
  • Connect to CAS, load data, and run simple analyses
  • Work with CAS using APIs familiar to Python users
  • Grasp general CAS workflows and advanced features of the CAS Python client

SAS Viya : The Python Perspective covers topics that will be useful to beginners as well as experienced CAS users. It includes examples from creating connections to CAS all the way to simple statistics and machine learning, but it is also useful as a desktop reference.


Sujets

Informations

Publié par
Date de parution 08 février 2018
Nombre de lectures 0
EAN13 9781629608839
Langue English
Poids de l'ouvrage 18 Mo

Informations légales : prix de location à la page 0,0105€. Cette information est donnée uniquement à titre indicatif conformément à la législation en vigueur.

Extrait

The correct bibliographic citation for this manual is as follows: Smith, Kevin D., Xiangxiang Meng. 2017.
SAS Viya : The Python Perspective. Cary, NC: SAS Institute Inc.
SAS Viya : The Python Perspective
Copyright 2017, SAS Institute Inc., Cary, NC, USA
ISBN 978-1-62960-276-9 (Hard copy) ISBN 978-1-62960-883-9 (EPUB) ISBN 978-1-62960-884-6 (MOBI) ISBN 978-1-62960-885-3 (PDF)
All Rights Reserved. Produced in the United States of America.
For a hard copy book: No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, SAS Institute Inc.
For a web download or e-book: Your use of this publication shall be governed by the terms established by the vendor at the time you acquire this publication.
The scanning, uploading, and distribution of this book via the Internet or any other means without the permission of the publisher is illegal and punishable by law. Please purchase only authorized electronic editions and do not participate in or encourage electronic piracy of copyrighted materials. Your support of others rights is appreciated.
U.S. Government License Rights; Restricted Rights: The Software and its documentation is commercial computer software developed at private expense and is provided with RESTRICTED RIGHTS to the United States Government. Use, duplication, or disclosure of the Software by the United States Government is subject to the license terms of this Agreement pursuant to, as applicable, FAR 12.212, DFAR 227.7202-1(a), DFAR 227.7202-3(a), and DFAR 227.7202-4, and, to the extent required under U.S. federal law, the minimum restricted rights as set out in FAR 52.227-19 (DEC 2007). If FAR 52.227-19 is applicable, this provision serves as notice under clause (c) thereof and no other notice is required to be affixed to the Software or documentation. The Government s rights in Software and documentation shall be only those set forth in this Agreement.
SAS Institute Inc., SAS Campus Drive, Cary, NC 27513-2414
February 2018
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration.
Other brand and product names are trademarks of their respective companies.
SAS software may be provided with certain third-party software, including but not limited to open-source software, which is licensed under its applicable third-party software license agreement. For license information about third-party software distributed with SAS software, refer to http://support.sas.com/thirdpartylicenses .
Contents
Foreword
About This Book
About These Authors
Chapter 1: Installing Python, SAS SWAT, and CAS
Installing Python
Installing SAS SWAT
Installing CAS
Making Your First Connection
Conclusion
Chapter 2: The Ten-Minute Guide to Using CAS from Python
Importing SWAT and Getting Connected
Running CAS Actions
Loading Data
Executing Actions on CAS Tables
Data Visualization
Closing the Connection
Conclusion
Chapter 3: The Fundamentals of Using Python with CAS
Connecting to CAS
Running CAS Actions
Specifying Action Parameters
CAS Action Results
Working with CAS Action Sets
Details
Getting Help
Dealing with Errors
SWAT Options
CAS Session Options
Conclusion
Chapter 4: Managing Your Data in CAS
Overview
Getting Started with Caslibs and CAS Tables
Loading Data into a CAS Table
Displaying Data in a CAS Table
Computing Simple Statistics
Dropping a CAS Table
CAS Data Types
Caslib and CAS Table Visibility
The Active Caslib
Uploading Data Files to CAS Tables
Uploading Data from URLs to CAS Tables
Uploading Data from a Pandas DataFrame to a CAS Table
Using Data Message Handlers
The HTML Data Message Handler
The Excel Data Message Handler
The PandasDataFrame Data Message Handler
Using Data Message Handlers with Databases
Writing Your Own Data Message Handlers
Variable Definition Details
Adding Data Transformers
Managing Caslibs
Creating a Caslib
Setting an Active Caslib
Dropping a Caslib
Conclusion
Chapter 5: The CASAction and CASTable Objects
Getting Started with the CASAction Objects
Setting Nested Parameters
Setting Parameters as Attributes
Retrieving and Removing Action Parameters
First Steps with the CASTable Object
Manually Creating a CASTable Object
CASTable Action Interface
Setting CASTable Parameters
Managing Parameters Using the Method Interface
Managing Parameters Using the Attribute Interface
Materializing CASTable Parameters
Conclusion
Chapter 6: Working with CAS Tables
Using CASTable Objects like a DataFrame
CAS Table Introspection
Computing Simple Statistics
Creating Plots from CASTable Data
Exporting CASTables to Other Formats
Sorting, Data Selection, and Iteration
Fetching Data with a Sort Order
Iterating through Columns and Rows
Techniques for Indexing and Selecting Data
Data Wrangling on the Fly
Creating Computed Columns
BY-Group Processing
Conclusion
Chapter 7: Data Exploration and Summary Statistics
Overview
Summarizing Continuous Variables
Descriptive Statistics
Histograms
Percentiles
Correlations
Summarizing Categorical Variables
Distinct Counts
Frequency
Top K
Cross Tabulations
Variable Transformation and Dimension Reduction
Variable Binning
Variable Imputation
Conclusion
Chapter 8: Modeling Continuous Variables
Linear Regressions
Extensions of Ordinary Linear Regression
Generalized Linear Models
Regression Trees
Conclusion
Chapter 9: Modeling Categorical Variables
Logistic Regression
Decision Trees
Gradient Boosting, Forests, and Neural Networks
Conclusion
Chapter 10: Advanced Topics
Binary vs. REST Interfaces
The Binary Interface
The REST Interface
The Pros and Cons of Each Interface
Result Processing Workflows
The Easy Way
Using Response and Result Callback Functions
Handling Responses from Multiple Sessions Simultaneously
Connecting to Existing Sessions
Communicating Securely
Conclusion
Appendix A: A Crash Course in Python
IPython and Jupyter
Data Types and Collections
Numeric Data Types
Character Data Types
Booleans
Lists and Tuples
Other Types
Flow Control
Conditional Code
Looping
Functions
Classes and Objects
Exceptions
Context Managers
Using the Pandas Package
Data Structures
Data Selection
Creating Plots and Charts
Plotting from Pandas DataFrame Methods
Plotting DataFrames with Plotly and Cufflinks
Creating Graphics with Matplotlib
Interactive Visualization with Bokeh
Conclusion
Appendix B: Troubleshooting
Software Version Issues
Connection Issues
Missing Linux Library Dependencies
Incorrect SAS Threaded Kernel Configuration
Unable to Import _pyXXswat
Refused Connection
Authentication Problems
Index
Foreword
SAS Viya marks a new and important chapter in our ever-evolving SAS software. A unified, open, powerful, and cloud-ready platform built on excellence in data management, advanced analytics, and high-performance computing.
These pillars of SAS Viya are important individually, but it is through their combination that the platform comes to life. The ability to access a central data management and computing environment through public APIs and from multiple programming languages, with consistent security and data models is a core competency of the modern analytic platform.
The Python language has quickly grown into one of the important programming languages for data science and analytics. As the SAS R D team embarked on building SAS Cloud Analytic Services (CAS), the engine of the SAS Viya platform, it was obvious that access from Python would be important.
The Python client for SAS Viya was developed by Kevin Smith as a member of the core team that designed and developed SAS Cloud Analytic Services. This book by Kevin and Xiangxiang Meng takes you on a journey to learn and apply Python programming in the context of the SAS Viya platform. Their deep understanding of the SAS Viya server architecture, the client architecture, and the Python language implementation shines through in every chapter.
As a lifelong learner, I greatly enjoyed the journey and am sure that you will, too.

Oliver Schabenberger, PhD Executive Vice President, Chief Operating Officer and Chief Technology Officer SAS
About This Book
What Does This Book Cover?
This book is an introduction to using the Python client on the SAS Viya platform. SAS Viya is a high-performance, fault-tolerant analytics architecture that can be deployed on both public and private cloud infrastructures. Although SAS Viya can be used by various SAS applications, it also enables you to access analytic methods from SAS, Python, Lua, and Java, as well as through a REST interface using HTTP or HTTPS. Of course, in this book we focus on the perspective of SAS Viya from Pyt

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents