SAS Viya

SAS Viya
Автор книги: id книги: 1622435     Оценка: 0.0     Голосов: 0     Отзывы, комментарии: 0 4692,65 руб.     (51,13$) Читать книгу Купить и скачать книгу Купить бумажную книгу Электронная книга Жанр: Программы Правообладатель и/или издательство: Ingram Дата добавления в каталог КнигаЛит: ISBN: 9781629608839 Скачать фрагмент в формате   fb2   fb2.zip Возрастное ограничение: 0+ Оглавление Отрывок из книги

Реклама. ООО «ЛитРес», ИНН: 7719571260.

Описание книги

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 PythonConnect to CAS, load data, and run simple analysesWork with CAS using APIs familiar to Python usersGrasp 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.

Оглавление

Kevin D. Smith. SAS Viya

Contents

Foreword

About This Book. What Does This Book Cover?

Is This Book for You?

What Are the Prerequisites for This Book?

Scope of This Book

What Should You Know about the Examples?

Software Used to Develop the Book's Content

Example Code and Data

We Want to Hear from You

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

Constructing Nested Action Parameters

Automatic Type Casting

Scalar Parameter to Dictionary Conversion

CAS Action Results

Using DataFrames

Checking the Return Status of CAS Actions

Working with CAS Action Sets

Details

Getting Help

Dealing with Errors

Using CAS Action Exceptions

Resolving CAS Action Parameter Problems

Handling Other Errors

SWAT Options

Partial Option Name Matches

The swat.options Object

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

Streaming Data from a Database into a CAS Table

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

Basic Iteration

Iterating over Columns

Techniques for Indexing and Selecting Data

Selecting Columns by Label and Position

Selecting Data by Label and Position

Dynamic Data Selection

Data Wrangling on the Fly

Creating Computed Columns

By Group Processing

Concatenating By Groups

Selecting Result Keys by Table Name

Selecting a Specific By Group

Handling Multiple Sets of By Groups

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

Binary (CAS) Interface

REST 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

Slicing

Tuples

Dictionaries and Sets

Sets

Other Types

Flow Control

Conditional Code

Looping

While Loops

For Loops

Loop Controls

Looping Helper Functions

Functions

Constructing Arguments Dynamically

Classes and Objects

Exceptions

Context Managers

Using the Pandas Package

Data Structures

Data Selection

The loc and iloc DataFrame Accessors

The at and iat DataFrame Accessors

The ix DataFrame Accessor

Using Boolean Masks

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

Contents

Отрывок из книги

Foreword

About This Book

.....

+ Elapsed: 0.000494s, mem: 0.0546mb

The object that is held in the out variable is an instance of a Python class called CASResults. The CASResults class is a subclass of collections.OrderedDict. This class is a dictionary-like object that preserves the order of the items in it. If you want only a plain Python dictionary, you can convert it as follows, but you lose the ordering of the items.

.....

Добавление нового отзыва

Комментарий Поле, отмеченное звёздочкой  — обязательно к заполнению

Отзывы и комментарии читателей

Нет рецензий. Будьте первым, кто напишет рецензию на книгу SAS Viya
Подняться наверх