SlideShare a Scribd company logo
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle R Enterprise
Rでのビッグデータ分析を可能にする
日本オラクル株式会社
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
2
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
アジェンダ
• オラクルにおけるRテクノロジー
• Oracle R Enterprise
3
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
オラクルにおけるRテクノロジー
4
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 5
アナリティクスをデータベースに, そしてクラウドへ
Oracleアナリティクス分野の歴史
Thinking Machines
Corporation "Darwin"
Oracle Data Mining
"Java API"
Oracle Data Mining
"PL/SQL"
Oracle R Enterprise
(Oracle Advanced
Analytics)
Oracle R Advanced
Analytics for Hadoop
Oracle
Analytics Cloud
1998 2002 20092004 20152012
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 6
100%互換で容易に共存と移行を可能にする
Oracle Advanced Analytics—オンプレミスとクラウド
Oracle CloudOn-Premise
同じ「アーキテクチャ」
同じ「オラクル製品」
同じ「知識・ノウハウ」
DEVELOP AND DEPLOY ANYWHERE
ワークロードと分析フローを
オンプレミスとパブリッククラウドで双方向に移動可能
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
OracleにおけるRテクノロジー
• オラクルは, 統計分析や高度な分析, 高機能グラフの生成をサポートする
言語および環境としてRを採用
• オラクルはR consortiumの創設メンバー
– RIOT 2016のオーガナイザー
• オラクルは次の4つのキーテクノロジーを通じてRの統合を提供
– Oracle R Distribution
– ROracle
– Oracle R Enterprise (ORE)
– Oracle R Advanced Analytics for Hadoop (ORAAH)
7
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle R Distribution
• オラクルがサポートするオープンソースRのディストリビューション
• 無料でダウンロード可能
• MKL, ACML, Solaris Sun Performance Libraryを動的にロードできる
機能拡張がされている
• Oracle Advanced Analytics, Oracle Linux, Oracle Big Data Applianceの
ユーザーに対してはサポートを提供
8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
ROracle
• オラクルが管理するオープンソースRパッケージ
• OCIライブラリに基づいたDBI準拠のOracleドライバ
• Oracle Databaseに接続でき, ユーザー指定のSQL文について
トランザクション・レベルの制御と実行が可能
• CRANで公開されており, オラクルによってメンテナンス
9
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle R Enterprise (ORE)
• Oracle Advanced Analyticsのコンポーネント
• オープンソースRとOracle Databaseの統合
• データベースのパラレル処理機能やスケーラビリティを活用
• Rの処理をSQLに透過的に変換
• Rスクリプトをデータ分析サーバで実行
10
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle R Advanced Analytics for Hadoop (ORAAH)
• Big Data Connectorsのコンポーネント
• HDFSとMapReduceフレームワークに対してのRインターフェースを提供
• Sparkベースの分析アルゴリズムも提供
• Oracle R Enterpriseと透過的に動作
11
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle R Enterprise
12
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Spawned R Engine
Spawned R Engine
Spawned R Engine
Oracle R Enterprise アーキテクチャ
13
Database Server
R Engine
Other R packages
Oracle R Enterprise packages
R
Client
Spawned R Engine
Other R packages
Oracle R Enterprise packages
SQL
結果 結果
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle R Enterprise コンポーネント
14
Database ServerClient
SQL
結果
Operating System
Oracle R
Distribution
Oracle R
Enterprise
Client Oracle
DB
Client
Oracle R
Enterprise
supporting
Packages
Operating System
Oracle R
Distribution
Oracle R
Enterprise Server
Oracle R
Enterprise
supporting
Packages
Oracle
DB
/w
AA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle R Enterpriseのメリット
• Rコマンドからデータベース内の
データを操作可能
• データの「移動」をなくす
• データセキュリティ
• データベースのパワーで分析
• データベース内でデータ準備
• Rオブジェクトをデータベースに保存
• モデルをデータベース内に作成
• データベース内でスコアリング
• Rスクリプトをデータベースで実行
• オラクルの他サービスと連携可能
15
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
インデータベース分析
16
従来のデータ分析
数時間, 数日, 数週間
Oracle R Enterprise
数秒, 数分, 数時間
Data Import
Data Mining & Model "Scoring"
Data Preparation & Transformation
Data Mining & Model Building
Data Preparation & Transformation
Data Extraction
Model "Scoring"
Data Preparation
Model Building
Data Preparation
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
ore.frame
• ore.frameというdata.frameのサブクラス
• データベーステーブルのプロキシとしてore.frameオブジェクトを利用可能
• データベース内のデータをクライアントに持ってくることなく処理可能
17
R> class(TITANIC01)
[1] "ore.frame"
attr(,"package")
[1] "OREbase"
R> colnames(TITANIC01)
[1] "Class" "Sex" "Age"
"Survived" "Freq"
R> mean(TITANIC01$Freq)
[1] 68.78125
Database Server
R Engine
Other R packages
Oracle R Enterprise packages
Client
SQL
結果
ore.frame
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
参考)サポートされるR演算子およびR関数(ORE 1.4.1, 1.5)
18
• 数学的変換: abs, sign, sqrt, ceiling, floor, trunc, cummax, cummin, cumprod,
cumsum, log, loglo, log10, log2, log1p, acos, acosh, asin, asinh, atan, atanh,
exp, expm1, cos, cosh, sin, sinh, tan, atan2, tanh, gamma, lgamma,
digamma, trigamma, factorial, lfactorial, round, signif, pmin, pmax, zapsmall,
rank, diff, besselI, besselJ, besselK, besselY
• 基本統計: mean, summary, min, max, sum, any, all, median, range, IQR,
fivenum, mad, quantile, sd, var, table, tabulate, rowSums, colSums,
rowMeans, colMeans, cor, cov
• 算術演算子: +, -, *, /, ^, %%, %/%
• 比較演算子: ==, >, <, !=, <=, >=
• 論理演算子: &, |, xor
• 集合演算子: unique, %in%, subset
• 文字列演算: tolower, toupper, casefold, toString, chartr, sub, gsub, substr,
substring, paste, nchar, grepl
• データ・フレームの結合: cbind, rbind, merge
• ベクトルの結合: append
• ベクトルの作成: ifelse
• サブセットの選択: [, [[, $, head, tail, window, subset, Filter, na.omit,
na.exclude, complete.cases
• サブセットの置換: [<-, [[<-, $<-
• データの再編成: split, unlist
• データ処理: eval, with, within, transform
• applyのバリアント: tapply, aggregate, by
• 特別な値のチェック: is.na, is.finite, is.infinite, is.nan
• メタデータ関数: nrow, NROW, ncol, NCOL, nlevels, names, names<-, row, col,
dimnames, dimnames<-, dim, length, row.names, row.names<-, rownames,
rownames<-, colnames, levels, reorder
• グラフィック: arrows, boxplot, cdplot, co.intervals, coplot, hist, identify, lines,
matlines, matplot, matpoints, pairs, plot, points, polygon, polypath, rug,
segments, smoothScatter, sunflowerplot, symbols, text, xspline, xy.coords
• 変換関数: as.logical, as.integer, as.numeric, as.character, as.vector, as.factor,
as.data.frame
• 型チェック関数: is.logical, is.integer, is.numeric, is.character, is.vector,
is.factor, is.data.frame
• 文字の操作: nchar, tolower, toupper, casefold, chartr, sub, gsub, substr
• その他のore.frame関数: data.frame, max.col, scale
• 仮説検定: binom.test, chisq.test, ks.test, prop.test, t.test, var.test, wilcox.test
• 各種分布: 密度, 累積分布, および標準分布のクォンタイル関数
• ore.matrix関数: show, is.matrix, as.matrix, %*% (マトリクスの乗算), t,
crossprod (マトリクスのクロス積), tcrossprod (BをA回転置したマトリクスのクロ
ス積), solve (反転), backsolve, forwardsolve, すべての適切な算術関数(abs, sign
など), summary (max, min, allなど), mean
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
ore.pull
• ore.pull関数でDB上のデータを取得しRのdata.frameに強制Cast
• データをDBからクライアントに持ってきて, 処理を実行
• 処理オフロードはされないが, 既存Rスクリプトをそのまま使用可能
19
R> df_titanic <- ore.pull(TITANIC01)
R> class(df_titanic)
[1] "data.frame"
Database Server
R Engine
Other R packages
Oracle R Enterprise packages
Client
ore.pull
データ
data.frame
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
ore.push
• ore.push関数でデータベースに一時オブジェクトとしてRオブジェクトを格納
• データをクライアントからDBに格納し, 処理を実行
• セッションクローズ後にも保存する際には、ore.save関数を利用
20
R> v <- ore.push(c(1,2,3,4,5))
R> class(v)
[1] "ore.numeric"
attr(,"package")
[1] "OREbase"
R> head(v)
[1] 1 2 3 4 5
R> ore.save(v,name="ds_1")
Database Server
R Engine
Other R packages
Oracle R Enterprise packages
Client
ore.push
データ
data.object
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
モデル構築とスコアリング
• 2種類のカテゴリが存在
– Oracle R Enterprise models(OREmodels package)
• linear regression, generalized linear model, neural network, random forest classification, stepwise
linear regression
– Oracle Data Mining models(OREdm package)
• minimum description length, apriori, decision tree, generalized linear models, k-means, naive bayes,
non-negative matrix factorization, orthogonal partitioning cluster (O-Cluster), support vector
machines
• ore.frameオブジェクトに対して, ore.predictでスコアリング可能
– 対応しているモデル・オブジェクトであれば, OREmodels, OREdm以外にも使用可能
21
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
参考)ORE関数
> unique(apropos("^ore"))
[1] "ore.attach" "ore.connect" "ore.const" "ore.corr"
[5] "ore.create" "ore.crosstab" "ore.datastore" "ore.datastoreSummary"
[9] "ore.delete" "ore.detach" "ore.disconnect" "ore.doEval"
[13] "ore.drop" "ore.esm" "ore.exec" "ore.exists"
[17] "ore.frame" "ore.freq" "ore.get" "ore.getXlevels"
[21] "ore.getXnlevels" "ore.glm" "ore.glm.control" "ore.groupApply"
[25] "ore.hash" "ore.hiveOptions" "ore.hour" "ore.indexApply"
[29] "ore.is.connected" "ore.lazyLoad" "ore.lm" "ore.load"
[33] "ore.ls" "ore.make.names" "ore.mday" "ore.minute"
[37] "ore.month" "ore.neural" "ore.odmAI" "ore.odmAssocRules"
[41] "ore.odmDT" "ore.odmGLM" "ore.odmKMeans" "ore.odmNB"
[45] "ore.odmNMF" "ore.odmOC" "ore.odmSVM" "ore.predict"
[49] "ore.pull" "ore.push" "ore.rank" "ore.recode"
[53] "ore.rm" "ore.rollmax" "ore.rollmean" "ore.rollmin"
[57] "ore.rollsd" "ore.rollsum" "ore.rollvar" "ore.rowApply"
[61] "ore.save" "ore.scriptCreate" "ore.scriptDrop" "ore.second"
[65] "OREShowDoc" "ore.showHiveOptions" "ore.sort" "ore.stepwise"
[69] "ore.summary" "ore.sync" "ore.tableApply" "ore.toXML"
[73] "ore.univariate" "ore.year"
22
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
埋込み(Embeded)R
• データベース側にスクリプトや関数を送り込み, データベースで実行
• データベースサーバ内で外部プロシージャ形式でRが起動
– DBサーバにRパッケージを追加することで様々なパッケージに対応
• データを分割し, 複数のRプロセスを起動し並列処理可能
23
Database Server
R Engine
Other R packages
Oracle R Enterprise packages
Client
結果
exec
R script
Spawned R EngineSpawned R EngineRプロシージャ
Spawned R Engine
Other R packages
Oracle R Enterprise packages
結果
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• 2002年創業
• 分析製品, 分析サービスを提供する企業
• OracleのRプロジェクトのパートナー
• MySQL + R のシステムから
Oracle Database + OREへの移行を実施
• 3つのステップに分けての移行を実施
1. オブジェクト管理として利用
ore.save, ore.load, ore.datastore, ore.datastoreSummary
2. ore関数へ置き換え
ore.lm, ore.rollmax, ore.rollmean, ore.rollmin, ore.rollsd,
ore.rollsum, ore.rollvar
3. 埋込み(Embeded)Rの活用
ore.doEval
 コード管理が容易になり, パフォーマンスが向上
 SQLインターフェースによりデプロイをシンプル化
24
事例) Mango Solutions
Raw Data &
Alpha Storage
Backtest
Application
Scripting
Interface
Analytic
Engine
Graphical User
Interface
Analytic Code
MgMent UI
Raw Data &
Alpha Storage
Backtest
Application
Embedded
Scripts
Analytic
Engine
SQL
Interface
Analytic Code
Interface
Graphical User
Interface
MySQL
Open R eclipse
.net
Bespoke C
Oracle
ORE RStudio
pdf
pdf
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 25
環境価格 1時間 $6.720 ≒ 800円
Oracle Application Express
Oracle REST Data Services
Oracle R Distribution
https://
Mobiles $6.720 / hour
Oracle Database Cloud Service
+ Oracle Advanced Analytics
(Oracle R Enterprise)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
(参考)セットアップ+2か月間ランニングコストイメージ
• イニシャルコスト
– 1 OCPU 15GBメモリのマシンパワーで実施
– 環境設定(10時間)
• Data Miner 設定
• 分析ユーザ作成
• 150GBのストレージ容量1年分保持
– 操作確認(10時間)
– データロード(10時間)
• ランニングコスト
– 2 OCPU 15GBメモリのマシンパワーで実施
– 分析PDCAサイクル(120時間)
• 日々3時間 x 20日 x 2か月間 ※分析実行回数・ユーザー数に関しての,
金額への影響はなし
イニシャルコスト ランニングコスト
(2か月間)
DBCS 24,797円 198,374円
Storage (21,600円) 21,600円
合計 24,797円 219,974円
26
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 27
クラウドから始めるRのビッグデータ分析- Oracle R Enterprise in Cloud
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• Client
1. Oracle Database Clientの
インストール
2. Oracle R Distributionの
インストール
3. Oracle R Enterprise Supporting
Packagesのインストール
4. Oracle R Enterprise Clientの
インストール
• Server
1. Oracle Databaseのインストール
2. Oracle R Distributionの
インストール
3. Oracle R Enterprise Serverの
インストール
4. Oracle R Enterprise Supporting
Packagesのインストール
Oracle R Enterpriseセットアップ手順
29
※DBCS環境構築の5stepで1と2は完了
/scratch/db/oreserver/直下に
3と4のためのスクリプトを配置済み
ore-server-linux-x86-64-1.4.1.zip
ore-supporting-linux-x86-64-1.4.1.zip
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle R Enterprise Server Support Matrix
Oracle R Enterprise Oracle R Distribution Oracle Database
1.5 3.2.x 11.2.0.4, 12.1.0.1, 12.1.0.2
1.4.1 3.0.1, 3.1.1 11.2.0.3, 11.2.0.4, 12.1.0.1, 12.1.0.2
1.4 3.0.1, 3.1.1 11.2.0.3, 11.2.0.4, 12.1.0.1
1.3.1 2.15.1, 2.15.2, 2.15.3 11.2.0.3, 11.2.0.4, 12.1.0.1
1.3 2.15.1 11.2.0.3, 11.2.0.4, 12.1.0.1
1.2 2.15.1 11.2.0.3, 11.2.0.4, 12.1.0.1
1.1 2.13.2 11.2.0.3, 11.2.0.4, 12.1.0.1
1.0 2.13.2 11.2.0.3, 11.2.0.4, 12.1.0.1
30

More Related Content

PPTX
RでKaggleの登竜門に挑戦
PPTX
機械学習ハンズオン
PPTX
Oracle advanced analyticsによる機械学習full version
PPTX
Hcm cloudをpaasでカスタマイズ
PDF
実はDatabase cloudだけで実現できる巷で噂の機械学習とは?
PDF
Deep Dive into Spark SQL with Advanced Performance Tuning
PPTX
Oracle APEX 概要
PDF
Spark 2.0 What's Next (Hadoop / Spark Conference Japan 2016 キーノート講演資料)
RでKaggleの登竜門に挑戦
機械学習ハンズオン
Oracle advanced analyticsによる機械学習full version
Hcm cloudをpaasでカスタマイズ
実はDatabase cloudだけで実現できる巷で噂の機械学習とは?
Deep Dive into Spark SQL with Advanced Performance Tuning
Oracle APEX 概要
Spark 2.0 What's Next (Hadoop / Spark Conference Japan 2016 キーノート講演資料)

What's hot (20)

PDF
1000台規模のHadoopクラスタをHive/Tezアプリケーションにあわせてパフォーマンスチューニングした話
PDF
(LT)Spark and Cassandra
PDF
ビッグデータ活用を加速する!分散SQLエンジン Spark SQL のご紹介 20161105 OSC Tokyo Fall
PDF
Hadoop Conference Japan_2016 セッション「顧客事例から学んだ、 エンタープライズでの "マジな"Hadoop導入の勘所」
PPSX
HBaseとSparkでセンサーデータを有効活用 #hbasejp
PDF
Impalaチューニングポイントベストプラクティス
PDF
Cloudera Impalaをサービスに組み込むときに苦労した話
PPTX
Pythonで入門するApache Spark at PyCon2016
PDF
SASとHadoopとの連携 2015
PPTX
オラクルGo! 位置情報アプリをクラウドで簡単に作ってみた
PPTX
sparksql-hive-bench-by-nec-hwx-at-hcj16
PDF
ゼロから始めるSparkSQL徹底活用!
PDF
2017年5月26日 オープンソースデータベース比較セミナー「NoSQLとしても使えるMySQLとMySQL Cluster」
PDF
HiveとImpalaのおいしいとこ取り
PDF
Apexで作成したrest apiをしっかり保護する方法
PDF
QConTokyo2015「Sparkを用いたビッグデータ解析 〜後編〜」
PDF
Sparkを用いたビッグデータ解析 〜 前編 〜
PDF
Spark Streamingを活用したシステムの検証結果と設計時のノウハウ
PDF
Spark勉強会_ibm_20151014-公開版
PDF
基礎から学ぶ超並列SQLエンジンImpala #cwt2015
1000台規模のHadoopクラスタをHive/Tezアプリケーションにあわせてパフォーマンスチューニングした話
(LT)Spark and Cassandra
ビッグデータ活用を加速する!分散SQLエンジン Spark SQL のご紹介 20161105 OSC Tokyo Fall
Hadoop Conference Japan_2016 セッション「顧客事例から学んだ、 エンタープライズでの "マジな"Hadoop導入の勘所」
HBaseとSparkでセンサーデータを有効活用 #hbasejp
Impalaチューニングポイントベストプラクティス
Cloudera Impalaをサービスに組み込むときに苦労した話
Pythonで入門するApache Spark at PyCon2016
SASとHadoopとの連携 2015
オラクルGo! 位置情報アプリをクラウドで簡単に作ってみた
sparksql-hive-bench-by-nec-hwx-at-hcj16
ゼロから始めるSparkSQL徹底活用!
2017年5月26日 オープンソースデータベース比較セミナー「NoSQLとしても使えるMySQLとMySQL Cluster」
HiveとImpalaのおいしいとこ取り
Apexで作成したrest apiをしっかり保護する方法
QConTokyo2015「Sparkを用いたビッグデータ解析 〜後編〜」
Sparkを用いたビッグデータ解析 〜 前編 〜
Spark Streamingを活用したシステムの検証結果と設計時のノウハウ
Spark勉強会_ibm_20151014-公開版
基礎から学ぶ超並列SQLエンジンImpala #cwt2015
Ad

Similar to クラウドから始めるRのビッグデータ分析- Oracle R Enterprise in Cloud (20)

PDF
Oracle R Enterprise の使い方
PPTX
Oracle Data Minerハンズオンセミナー170927:①Oracle 機械学習概要
PPTX
R超入門機械学習をはじめよう
PDF
Oracle R Advanced Analytics for Hadoop利用方法
PDF
20160121 データサイエンティスト協会 木曜セミナー #5
PDF
20160220 MSのビッグデータ分析基盤 - データマイニング+WEB@東京
PDF
Let's stady Machine Learning with OCSJ
PDF
Oracle Cloud Developers Meetup@東京
PDF
[Oracle Innovation Summit Tokyo 2018] 水環境の持続を支えるクラウド型ICTプラットフォーム「Water Busine...
PDF
レボリューションR(RRE)のご紹介
PDF
DAIS2024参加報告 ~Spark中心にしらべてみた~ (JEDAI DAIS Recap 講演資料)
PPTX
超高速な機械学習を Oracle Database で実現!
PPTX
Oracle Advanced Analytics 概要
PPTX
Oracle Cloud Infrastructure Data Science 技術資料(20200402)
PDF
Dat011 hd insight_+_spark_+_r_を活用した
PPTX
大量のデータ処理や分析に使えるOSS Apache Spark入門(Open Source Conference 2021 Online/Kyoto 発表資料)
PPTX
20200527 oracle cloud infrastructure data science
PDF
SQL Server 2016 R Services + Microsoft R Server 技術資料
PPTX
Hadoop scr第7回 hw2011フィードバック
PDF
Apache spark 2.3 and beyond
Oracle R Enterprise の使い方
Oracle Data Minerハンズオンセミナー170927:①Oracle 機械学習概要
R超入門機械学習をはじめよう
Oracle R Advanced Analytics for Hadoop利用方法
20160121 データサイエンティスト協会 木曜セミナー #5
20160220 MSのビッグデータ分析基盤 - データマイニング+WEB@東京
Let's stady Machine Learning with OCSJ
Oracle Cloud Developers Meetup@東京
[Oracle Innovation Summit Tokyo 2018] 水環境の持続を支えるクラウド型ICTプラットフォーム「Water Busine...
レボリューションR(RRE)のご紹介
DAIS2024参加報告 ~Spark中心にしらべてみた~ (JEDAI DAIS Recap 講演資料)
超高速な機械学習を Oracle Database で実現!
Oracle Advanced Analytics 概要
Oracle Cloud Infrastructure Data Science 技術資料(20200402)
Dat011 hd insight_+_spark_+_r_を活用した
大量のデータ処理や分析に使えるOSS Apache Spark入門(Open Source Conference 2021 Online/Kyoto 発表資料)
20200527 oracle cloud infrastructure data science
SQL Server 2016 R Services + Microsoft R Server 技術資料
Hadoop scr第7回 hw2011フィードバック
Apache spark 2.3 and beyond
Ad

Recently uploaded (9)

PDF
液体クラトム抽出物供給側分析:世界の生産能力・販売量・平均価格動向(2025-2031)
PDF
【QYResearch】人形ロボット産業の市場構造と今後の発展方向に関する分析レポート
PDF
商用ウェブカメラ市場:世界の産業現状、競合分析、シェア、規模、動向2025-2031年の予測
PDF
口腔内スキャナー市場:世界の産業現状、競合分析、シェア、規模、動向2025-2031年の予測
PDF
世界半導体用酸化ハフニウム市場のサプライチェーン解析:上流、下流、収益モデル分析2025-2031
PDF
グローバルロープウェイ用スチールワイヤーロープ市場2025:主要企業のシェア、売上動向、競争戦略
PDF
Qlik TECH TALK セミナー:What's New In Qlik ~ 2025年7月リリース最新機能のご紹介
PDF
XCMSを用いた質量分析データ処理_BioCAsia2021_yamamoto.pdf
PDF
限外ろ過膜調査レポート:市場規模、シェア、産業分析データ、最新動向2025-2031 YH Research
液体クラトム抽出物供給側分析:世界の生産能力・販売量・平均価格動向(2025-2031)
【QYResearch】人形ロボット産業の市場構造と今後の発展方向に関する分析レポート
商用ウェブカメラ市場:世界の産業現状、競合分析、シェア、規模、動向2025-2031年の予測
口腔内スキャナー市場:世界の産業現状、競合分析、シェア、規模、動向2025-2031年の予測
世界半導体用酸化ハフニウム市場のサプライチェーン解析:上流、下流、収益モデル分析2025-2031
グローバルロープウェイ用スチールワイヤーロープ市場2025:主要企業のシェア、売上動向、競争戦略
Qlik TECH TALK セミナー:What's New In Qlik ~ 2025年7月リリース最新機能のご紹介
XCMSを用いた質量分析データ処理_BioCAsia2021_yamamoto.pdf
限外ろ過膜調査レポート:市場規模、シェア、産業分析データ、最新動向2025-2031 YH Research

クラウドから始めるRのビッグデータ分析- Oracle R Enterprise in Cloud

  • 1. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle R Enterprise Rでのビッグデータ分析を可能にする 日本オラクル株式会社
  • 2. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 2
  • 3. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | アジェンダ • オラクルにおけるRテクノロジー • Oracle R Enterprise 3
  • 4. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | オラクルにおけるRテクノロジー 4
  • 5. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 5 アナリティクスをデータベースに, そしてクラウドへ Oracleアナリティクス分野の歴史 Thinking Machines Corporation "Darwin" Oracle Data Mining "Java API" Oracle Data Mining "PL/SQL" Oracle R Enterprise (Oracle Advanced Analytics) Oracle R Advanced Analytics for Hadoop Oracle Analytics Cloud 1998 2002 20092004 20152012
  • 6. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 6 100%互換で容易に共存と移行を可能にする Oracle Advanced Analytics—オンプレミスとクラウド Oracle CloudOn-Premise 同じ「アーキテクチャ」 同じ「オラクル製品」 同じ「知識・ノウハウ」 DEVELOP AND DEPLOY ANYWHERE ワークロードと分析フローを オンプレミスとパブリッククラウドで双方向に移動可能
  • 7. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | OracleにおけるRテクノロジー • オラクルは, 統計分析や高度な分析, 高機能グラフの生成をサポートする 言語および環境としてRを採用 • オラクルはR consortiumの創設メンバー – RIOT 2016のオーガナイザー • オラクルは次の4つのキーテクノロジーを通じてRの統合を提供 – Oracle R Distribution – ROracle – Oracle R Enterprise (ORE) – Oracle R Advanced Analytics for Hadoop (ORAAH) 7
  • 8. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle R Distribution • オラクルがサポートするオープンソースRのディストリビューション • 無料でダウンロード可能 • MKL, ACML, Solaris Sun Performance Libraryを動的にロードできる 機能拡張がされている • Oracle Advanced Analytics, Oracle Linux, Oracle Big Data Applianceの ユーザーに対してはサポートを提供 8
  • 9. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | ROracle • オラクルが管理するオープンソースRパッケージ • OCIライブラリに基づいたDBI準拠のOracleドライバ • Oracle Databaseに接続でき, ユーザー指定のSQL文について トランザクション・レベルの制御と実行が可能 • CRANで公開されており, オラクルによってメンテナンス 9
  • 10. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle R Enterprise (ORE) • Oracle Advanced Analyticsのコンポーネント • オープンソースRとOracle Databaseの統合 • データベースのパラレル処理機能やスケーラビリティを活用 • Rの処理をSQLに透過的に変換 • Rスクリプトをデータ分析サーバで実行 10
  • 11. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle R Advanced Analytics for Hadoop (ORAAH) • Big Data Connectorsのコンポーネント • HDFSとMapReduceフレームワークに対してのRインターフェースを提供 • Sparkベースの分析アルゴリズムも提供 • Oracle R Enterpriseと透過的に動作 11
  • 12. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle R Enterprise 12
  • 13. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Spawned R Engine Spawned R Engine Spawned R Engine Oracle R Enterprise アーキテクチャ 13 Database Server R Engine Other R packages Oracle R Enterprise packages R Client Spawned R Engine Other R packages Oracle R Enterprise packages SQL 結果 結果
  • 14. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle R Enterprise コンポーネント 14 Database ServerClient SQL 結果 Operating System Oracle R Distribution Oracle R Enterprise Client Oracle DB Client Oracle R Enterprise supporting Packages Operating System Oracle R Distribution Oracle R Enterprise Server Oracle R Enterprise supporting Packages Oracle DB /w AA
  • 15. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle R Enterpriseのメリット • Rコマンドからデータベース内の データを操作可能 • データの「移動」をなくす • データセキュリティ • データベースのパワーで分析 • データベース内でデータ準備 • Rオブジェクトをデータベースに保存 • モデルをデータベース内に作成 • データベース内でスコアリング • Rスクリプトをデータベースで実行 • オラクルの他サービスと連携可能 15
  • 16. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | インデータベース分析 16 従来のデータ分析 数時間, 数日, 数週間 Oracle R Enterprise 数秒, 数分, 数時間 Data Import Data Mining & Model "Scoring" Data Preparation & Transformation Data Mining & Model Building Data Preparation & Transformation Data Extraction Model "Scoring" Data Preparation Model Building Data Preparation
  • 17. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | ore.frame • ore.frameというdata.frameのサブクラス • データベーステーブルのプロキシとしてore.frameオブジェクトを利用可能 • データベース内のデータをクライアントに持ってくることなく処理可能 17 R> class(TITANIC01) [1] "ore.frame" attr(,"package") [1] "OREbase" R> colnames(TITANIC01) [1] "Class" "Sex" "Age" "Survived" "Freq" R> mean(TITANIC01$Freq) [1] 68.78125 Database Server R Engine Other R packages Oracle R Enterprise packages Client SQL 結果 ore.frame
  • 18. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 参考)サポートされるR演算子およびR関数(ORE 1.4.1, 1.5) 18 • 数学的変換: abs, sign, sqrt, ceiling, floor, trunc, cummax, cummin, cumprod, cumsum, log, loglo, log10, log2, log1p, acos, acosh, asin, asinh, atan, atanh, exp, expm1, cos, cosh, sin, sinh, tan, atan2, tanh, gamma, lgamma, digamma, trigamma, factorial, lfactorial, round, signif, pmin, pmax, zapsmall, rank, diff, besselI, besselJ, besselK, besselY • 基本統計: mean, summary, min, max, sum, any, all, median, range, IQR, fivenum, mad, quantile, sd, var, table, tabulate, rowSums, colSums, rowMeans, colMeans, cor, cov • 算術演算子: +, -, *, /, ^, %%, %/% • 比較演算子: ==, >, <, !=, <=, >= • 論理演算子: &, |, xor • 集合演算子: unique, %in%, subset • 文字列演算: tolower, toupper, casefold, toString, chartr, sub, gsub, substr, substring, paste, nchar, grepl • データ・フレームの結合: cbind, rbind, merge • ベクトルの結合: append • ベクトルの作成: ifelse • サブセットの選択: [, [[, $, head, tail, window, subset, Filter, na.omit, na.exclude, complete.cases • サブセットの置換: [<-, [[<-, $<- • データの再編成: split, unlist • データ処理: eval, with, within, transform • applyのバリアント: tapply, aggregate, by • 特別な値のチェック: is.na, is.finite, is.infinite, is.nan • メタデータ関数: nrow, NROW, ncol, NCOL, nlevels, names, names<-, row, col, dimnames, dimnames<-, dim, length, row.names, row.names<-, rownames, rownames<-, colnames, levels, reorder • グラフィック: arrows, boxplot, cdplot, co.intervals, coplot, hist, identify, lines, matlines, matplot, matpoints, pairs, plot, points, polygon, polypath, rug, segments, smoothScatter, sunflowerplot, symbols, text, xspline, xy.coords • 変換関数: as.logical, as.integer, as.numeric, as.character, as.vector, as.factor, as.data.frame • 型チェック関数: is.logical, is.integer, is.numeric, is.character, is.vector, is.factor, is.data.frame • 文字の操作: nchar, tolower, toupper, casefold, chartr, sub, gsub, substr • その他のore.frame関数: data.frame, max.col, scale • 仮説検定: binom.test, chisq.test, ks.test, prop.test, t.test, var.test, wilcox.test • 各種分布: 密度, 累積分布, および標準分布のクォンタイル関数 • ore.matrix関数: show, is.matrix, as.matrix, %*% (マトリクスの乗算), t, crossprod (マトリクスのクロス積), tcrossprod (BをA回転置したマトリクスのクロ ス積), solve (反転), backsolve, forwardsolve, すべての適切な算術関数(abs, sign など), summary (max, min, allなど), mean
  • 19. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | ore.pull • ore.pull関数でDB上のデータを取得しRのdata.frameに強制Cast • データをDBからクライアントに持ってきて, 処理を実行 • 処理オフロードはされないが, 既存Rスクリプトをそのまま使用可能 19 R> df_titanic <- ore.pull(TITANIC01) R> class(df_titanic) [1] "data.frame" Database Server R Engine Other R packages Oracle R Enterprise packages Client ore.pull データ data.frame
  • 20. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | ore.push • ore.push関数でデータベースに一時オブジェクトとしてRオブジェクトを格納 • データをクライアントからDBに格納し, 処理を実行 • セッションクローズ後にも保存する際には、ore.save関数を利用 20 R> v <- ore.push(c(1,2,3,4,5)) R> class(v) [1] "ore.numeric" attr(,"package") [1] "OREbase" R> head(v) [1] 1 2 3 4 5 R> ore.save(v,name="ds_1") Database Server R Engine Other R packages Oracle R Enterprise packages Client ore.push データ data.object
  • 21. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | モデル構築とスコアリング • 2種類のカテゴリが存在 – Oracle R Enterprise models(OREmodels package) • linear regression, generalized linear model, neural network, random forest classification, stepwise linear regression – Oracle Data Mining models(OREdm package) • minimum description length, apriori, decision tree, generalized linear models, k-means, naive bayes, non-negative matrix factorization, orthogonal partitioning cluster (O-Cluster), support vector machines • ore.frameオブジェクトに対して, ore.predictでスコアリング可能 – 対応しているモデル・オブジェクトであれば, OREmodels, OREdm以外にも使用可能 21
  • 22. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 参考)ORE関数 > unique(apropos("^ore")) [1] "ore.attach" "ore.connect" "ore.const" "ore.corr" [5] "ore.create" "ore.crosstab" "ore.datastore" "ore.datastoreSummary" [9] "ore.delete" "ore.detach" "ore.disconnect" "ore.doEval" [13] "ore.drop" "ore.esm" "ore.exec" "ore.exists" [17] "ore.frame" "ore.freq" "ore.get" "ore.getXlevels" [21] "ore.getXnlevels" "ore.glm" "ore.glm.control" "ore.groupApply" [25] "ore.hash" "ore.hiveOptions" "ore.hour" "ore.indexApply" [29] "ore.is.connected" "ore.lazyLoad" "ore.lm" "ore.load" [33] "ore.ls" "ore.make.names" "ore.mday" "ore.minute" [37] "ore.month" "ore.neural" "ore.odmAI" "ore.odmAssocRules" [41] "ore.odmDT" "ore.odmGLM" "ore.odmKMeans" "ore.odmNB" [45] "ore.odmNMF" "ore.odmOC" "ore.odmSVM" "ore.predict" [49] "ore.pull" "ore.push" "ore.rank" "ore.recode" [53] "ore.rm" "ore.rollmax" "ore.rollmean" "ore.rollmin" [57] "ore.rollsd" "ore.rollsum" "ore.rollvar" "ore.rowApply" [61] "ore.save" "ore.scriptCreate" "ore.scriptDrop" "ore.second" [65] "OREShowDoc" "ore.showHiveOptions" "ore.sort" "ore.stepwise" [69] "ore.summary" "ore.sync" "ore.tableApply" "ore.toXML" [73] "ore.univariate" "ore.year" 22
  • 23. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 埋込み(Embeded)R • データベース側にスクリプトや関数を送り込み, データベースで実行 • データベースサーバ内で外部プロシージャ形式でRが起動 – DBサーバにRパッケージを追加することで様々なパッケージに対応 • データを分割し, 複数のRプロセスを起動し並列処理可能 23 Database Server R Engine Other R packages Oracle R Enterprise packages Client 結果 exec R script Spawned R EngineSpawned R EngineRプロシージャ Spawned R Engine Other R packages Oracle R Enterprise packages 結果
  • 24. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • 2002年創業 • 分析製品, 分析サービスを提供する企業 • OracleのRプロジェクトのパートナー • MySQL + R のシステムから Oracle Database + OREへの移行を実施 • 3つのステップに分けての移行を実施 1. オブジェクト管理として利用 ore.save, ore.load, ore.datastore, ore.datastoreSummary 2. ore関数へ置き換え ore.lm, ore.rollmax, ore.rollmean, ore.rollmin, ore.rollsd, ore.rollsum, ore.rollvar 3. 埋込み(Embeded)Rの活用 ore.doEval  コード管理が容易になり, パフォーマンスが向上  SQLインターフェースによりデプロイをシンプル化 24 事例) Mango Solutions Raw Data & Alpha Storage Backtest Application Scripting Interface Analytic Engine Graphical User Interface Analytic Code MgMent UI Raw Data & Alpha Storage Backtest Application Embedded Scripts Analytic Engine SQL Interface Analytic Code Interface Graphical User Interface MySQL Open R eclipse .net Bespoke C Oracle ORE RStudio pdf pdf
  • 25. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 25 環境価格 1時間 $6.720 ≒ 800円 Oracle Application Express Oracle REST Data Services Oracle R Distribution https:// Mobiles $6.720 / hour Oracle Database Cloud Service + Oracle Advanced Analytics (Oracle R Enterprise)
  • 26. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | (参考)セットアップ+2か月間ランニングコストイメージ • イニシャルコスト – 1 OCPU 15GBメモリのマシンパワーで実施 – 環境設定(10時間) • Data Miner 設定 • 分析ユーザ作成 • 150GBのストレージ容量1年分保持 – 操作確認(10時間) – データロード(10時間) • ランニングコスト – 2 OCPU 15GBメモリのマシンパワーで実施 – 分析PDCAサイクル(120時間) • 日々3時間 x 20日 x 2か月間 ※分析実行回数・ユーザー数に関しての, 金額への影響はなし イニシャルコスト ランニングコスト (2か月間) DBCS 24,797円 198,374円 Storage (21,600円) 21,600円 合計 24,797円 219,974円 26
  • 27. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 27
  • 29. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • Client 1. Oracle Database Clientの インストール 2. Oracle R Distributionの インストール 3. Oracle R Enterprise Supporting Packagesのインストール 4. Oracle R Enterprise Clientの インストール • Server 1. Oracle Databaseのインストール 2. Oracle R Distributionの インストール 3. Oracle R Enterprise Serverの インストール 4. Oracle R Enterprise Supporting Packagesのインストール Oracle R Enterpriseセットアップ手順 29 ※DBCS環境構築の5stepで1と2は完了 /scratch/db/oreserver/直下に 3と4のためのスクリプトを配置済み ore-server-linux-x86-64-1.4.1.zip ore-supporting-linux-x86-64-1.4.1.zip
  • 30. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle R Enterprise Server Support Matrix Oracle R Enterprise Oracle R Distribution Oracle Database 1.5 3.2.x 11.2.0.4, 12.1.0.1, 12.1.0.2 1.4.1 3.0.1, 3.1.1 11.2.0.3, 11.2.0.4, 12.1.0.1, 12.1.0.2 1.4 3.0.1, 3.1.1 11.2.0.3, 11.2.0.4, 12.1.0.1 1.3.1 2.15.1, 2.15.2, 2.15.3 11.2.0.3, 11.2.0.4, 12.1.0.1 1.3 2.15.1 11.2.0.3, 11.2.0.4, 12.1.0.1 1.2 2.15.1 11.2.0.3, 11.2.0.4, 12.1.0.1 1.1 2.13.2 11.2.0.3, 11.2.0.4, 12.1.0.1 1.0 2.13.2 11.2.0.3, 11.2.0.4, 12.1.0.1 30

Editor's Notes

  • #6: 対応Oracle Database 12.1または11.2.0.3以上
  • #8: R consortiumはR FoundationとR Communityと協力し, サポートすること
  • #9: RのライセンスはGPL2 => Oracle R Distribution MKLのライセンスが必要 Intel Math Kernel Library (MKL), AMD Core Math Library (ACML), Solaris Sun Performance Library on Solaris. Intel MKLはIntelの数学演算高速化のライブラリ ※MKLはサポート無しの無償コミュニティライセンスがあります。 ※サポートが必要な場合は別途ご購入ください Linuxの場合, LD_LIBRARY_PATHにMKLのライブラリを追加するだけです Windowsの場合 libOrdBlasLoader.dllおよびmkl_rt.dllの場所をPATHシステム環境に追加 DBサーバ(Linux/Windows)ではMKLがORACLE_HOME/lib以下に同梱されています
  • #15: Open R 最新バージョンは対応していない可能性あり (/w shared lib,lapack..)※ ClientのOSは64bitである必要あり パッケージの選択は慎重に。<-テスト環境用意を推奨
  • #30: DBCSではR Distributionは3.1.1 OREは1.4.1 (DBCS 16.2.2 2016年4月15日時点)