python / r で使うsas viya

34
Copyright © SAS Institute Inc. All rights reserved. I am Multilingual Python / Rで使うSAS ViyaSAS Institute Japan株式会社 SUPER DEMO

Upload: sas-institute-japan

Post on 23-Jan-2018

11.998 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Copyright © SAS Inst itute Inc. A l l r ights reserved.

I am Multilingual~Python / Rで使うSAS Viya~SAS Institute Japan株式会社

SUPER DEMO

Copyright © SAS Inst itute Inc. A l l r ights reserved.

Para

llel &

Ser

ial,

Pub

/ S

ub

, W

eb S

ervi

ces,

MQ

s

Source-basedEngines

Microservices

UAA

QueryGen

Folders

CAS Mgmt

Data Source Mgmt

AnalyticsGUIs

etc…

BIGUIs

EnvMgr

ModelMgmt

Log

Audit

UAAUAA

Data Mgmt GUIs

In-Memory Engine

In-Database

In-Hadoop

In-StreamSolutions

APIs

Platform

Analytics

Data ManagementFraud and Security Intelligence

Business VisualizationRisk Management

!

Customer Intelligence

Cloud Analytics Services (CAS)

GoogleCloudPlatform

What is SAS Viya?

2

Copyright © SAS Inst itute Inc. A l l r ights reserved.

What can SAS Viya do?

Visual Interfaces

Programming Interfaces

API Interfaces

Microservices

UAA

QueryGen

Folders

CAS Mgmt

Data Source Mgmt

AnalyticsGUIs

etc…

BIGUIs

EnvMgr

ModelMgmt

Log

Audit

UAAUAA

Data Mgmt GUIs

In-Memory Engine

Cloud Analytics Services (CAS)

データロード

探索・加工

モデル化

スコアリング

アセスメント 3

Copyright © SAS Inst itute Inc. A l l r ights reserved.

How do I use it?

Microservices

UAA

QueryGen

Folders

CAS Mgmt

Data Source Mgmt

AnalyticsGUIs

etc…

BIGUIs

EnvMgr

ModelMgmt

Log

Audit

UAAUAA

Data Mgmt GUIs

In-Memory Engine

Cloud Analytics Services (CAS)

データロード

探索・加工

モデル化

スコアリング

アセスメント

Python SWAT

R SWAT

https://github.com/sassoftware/python-swat

https://github.com/sassoftware/R-swat4

Copyright © SAS Inst itute Inc. A l l r ights reserved.

What is SWAT?

1. Special Weapon and Tactics

2. SAS Scripting Wrapper for Analytics Transfer

5

Copyright © SAS Inst itute Inc. A l l r ights reserved.

What is SWAT?

1. Special Weapon and Tactics

2. SAS Scripting Wrapper for Analytics Transfer

6

Copyright © SAS Inst itute Inc. A l l r ights reserved.

How do I use it?

Python SWAT

pip install https://github.com/sassoftware/python-

swat/releases/download/v1.0.0/python-swat-1.0.0-linux64.tar.gz

7

Copyright © SAS Inst itute Inc. A l l r ights reserved.

How do I use it?

Python SWAT

R SWAT

wget https://github.com/sassoftware/R-

swat/releases/download/v1.0.0/r-swat-1.0.0-linux64.tar.gz

R CMD INSTALL r-swat-1.0.0-linux64.tar.gz

8

Copyright © SAS Inst itute Inc. A l l r ights reserved.

SWAT Supports

Linux

Windows

Mac9

Copyright © SAS Inst itute Inc. A l l r ights reserved.

Now give it a try!

Microservices

UAA

QueryGen

Folders

CAS Mgmt

Data Source Mgmt

AnalyticsGUIs

etc…

BIGUIs

EnvMgr

ModelMgmt

Log

Audit

UAAUAA

Data Mgmt GUIs

In-Memory Engine

Cloud Analytics Services (CAS)

データロード

探索・加工

モデル化

スコアリング

アセスメント

Python SWAT

R SWAT

https://github.com/sassoftware/python-swat

https://github.com/sassoftware/R-swat10

Copyright © SAS Inst itute Inc. A l l r ights reserved.

11

Copyright © SAS Inst itute Inc. A l l r ights reserved.

Python SWATをインポートし、SAS ViyaのCASに接続します。CASとはSAS Viyaのインメモリ分析エンジンです。

12

Copyright © SAS Inst itute Inc. A l l r ights reserved.

分析対象のデータをCASにロードします。今回はタイタニック号の乗船者データを使います。

13

Copyright © SAS Inst itute Inc. A l l r ights reserved.

Pandas Dataframe同様の操作が可能

14

Copyright © SAS Inst itute Inc. A l l r ights reserved.

Pandas Dataframe同様の操作が可能

15

Copyright © SAS Inst itute Inc. A l l r ights reserved.

決定木分析でモデルを作ります。ターゲット変数は "survived" です。

16

Copyright © SAS Inst itute Inc. A l l r ights reserved.

スコアリングし、モデルを評価します。

17

Copyright © SAS Inst itute Inc. A l l r ights reserved.

スコアリングし、モデルを評価します。

18

Copyright © SAS Inst itute Inc. A l l r ights reserved.

ランダムフォレストでモデルを作ります。

19

Copyright © SAS Inst itute Inc. A l l r ights reserved.

スコアリングし、モデルを評価します。

20

Copyright © SAS Inst itute Inc. A l l r ights reserved.

スコアリングし、モデルを評価します。

21

Copyright © SAS Inst itute Inc. A l l r ights reserved.

ROC曲線をグラフに描画します。

22

Copyright © SAS Inst itute Inc. A l l r ights reserved.

Links for Python and SAS Viya

• https://github.com/sassoftware/python-swat

• https://sassoftware.github.io/python-swat/index.html#

• https://github.com/sassoftware/sas-viya-programming

• http://go.documentation.sas.com/?cdcId=vdmmlcdc&cdcVersion=8.11&docsetId=caspg3&docsetTarget=titlepage.htm&locale=ja

23

Copyright © SAS Inst itute Inc. A l l r ights reserved.

Now give it a try!

Microservices

UAA

QueryGen

Folders

CAS Mgmt

Data Source Mgmt

AnalyticsGUIs

etc…

BIGUIs

EnvMgr

ModelMgmt

Log

Audit

UAAUAA

Data Mgmt GUIs

In-Memory Engine

Cloud Analytics Services (CAS)

データロード

探索・加工

モデル化

スコアリング

アセスメント

Python SWAT

R SWAT

https://github.com/sassoftware/python-swat

https://github.com/sassoftware/R-swat24

Copyright © SAS Inst itute Inc. A l l r ights reserved.

25

Copyright © SAS Inst itute Inc. A l l r ights reserved.

R SWATを呼び出してCASに接続します。

26

Copyright © SAS Inst itute Inc. A l l r ights reserved.

データをCASにロードします。

27

Copyright © SAS Inst itute Inc. A l l r ights reserved.

データを表示します。

28

Copyright © SAS Inst itute Inc. A l l r ights reserved.

決定木で分析します。

29

Copyright © SAS Inst itute Inc. A l l r ights reserved.

スコアリングします。

30

Copyright © SAS Inst itute Inc. A l l r ights reserved.

モデルを評価します。

31

Copyright © SAS Inst itute Inc. A l l r ights reserved.

モデルの予測精度をまとめます。

32

Copyright © SAS Inst itute Inc. A l l r ights reserved.

ROC曲線を描画します。

33

Copyright © SAS Inst itute Inc. A l l r ights reserved.

Links for R and SAS Viya

• https://github.com/sassoftware/R-swat-

• http://go.documentation.sas.com/?cdcId=vdmmlcdc&cdcVersion=8.11&docsetId=caspg3r&docsetTarget=titlepage.htm&locale=ja

34