All Posts
SAS author Jane Eslinger shows give you tips for working with PROC TEMPLATE when diving into the Output Delivery System (ODS) world. Learn how to create a custom style template to get the stylized output you want.
In August 2017, Britta Gross spoke about General Motors’ perspective on bringing electric vehicles (and their derivatives) to market. Her point of view reaffirmed GM's research on consumer awareness of electric vehicles (only 60 percent) and consumer adoption concerns with this emerging technology. She also revealed the portfolio of cars
When it comes to feeding our children many of us feel lost. Maybe you’re just starting to introduce solids to your baby or maybe you are having all out wars with your 5 year old at dinner time. If meal times stress you out, you might be making some of
This article shows how to construct a butterfly plot in SAS. A butterfly plot (also called a butterfly chart) is a comparative bar chart or histogram that displays the distribution of a variable for two subpopulations. A butterfly plot for the cholesterol readings of 5,057 patients in a medical study
Amor e matemática. Quase não se consegue imaginar dois mundos mais afastados. No entanto Hannah Fry provou que as matemáticas podem descobrir o segredo de um relacionamento bem-sucedido e prever um divórcio. Conversámos com a professora da UCL e perguntámos sobre a relação que os humanos têm com as novas
There’s a common response I encounter while supporting people dealing with loss of all kinds whether that be death, divorce, illness, etc. After vulnerably revealing a bit of their sadness they quickly jump to, “but I know someone out there has it worse than me”, and this signals the end
SAS Viya is our latest extension of the SAS Platform and interoperable with SAS® 9.4. There were a number of SAS Viya presentations at SAS Global Forum 2018. In this series, we will review several of the most interesting talks. This post reviews Hadley Christoffels’ talk, A Need For Speed: Loading Data via the Cloud.
Andy Dufresne, the wrongly convicted character in The Shawshank Redemption, provocatively asks the prison guard early in the film: “Do you trust your wife?” It’s a dead serious question regarding avoiding taxes on a recent financial windfall that had come the guard's way, and leads to events that eventually win
In a recent blog post, Chris Hemedinger used a scatter plot to show the result of 100 coin tosses. Chris arranged the 100 results in a 10 x 10 grid, where the first 10 results were shown on the first row, the second 10 were shown on the second row, and so
SASでは、従来からSAS Viyaの機能をPythonなど各種汎用プログラミング言語から利用するためのパッケージであるSWATを提供していました。 これに加え、よりハイレベルなPython向けAPIパッケージであるDLPyの提供も開始され、PythonからViyaの機能をより効率的に活用することが可能となっています。 ※DLPyの詳細に関しては以下サイトをご覧ください。 https://github.com/sassoftware/python-dlpy DLPyとは DLPyの機能(一部抜粋) 1.DLPyとは DLPyは、Viya3.3以降のディープラーニングと画像処理(image action set)のために作成された、Python API向けハイレベルパッケージです。DLPyではKerasに似たAPIを提供し、ディープラーニングと画像処理のコーディングの効率化が図られています。既存のKerasのコードをほんの少し書き換えるだけで、SAS Viya上でその処理を実行させることも可能になります。 例えば、以下はCNNの層の定義例です。Kerasに酷似していることがわかります。 DLPyでサポートしているレイヤは、InputLayer, Conv2d, Pooling, Dense, Recurrent, BN, Res, Proj, OutputLayer、です。 以下は学習時の記述例です。 2.DLPyの機能(一部抜粋) 複数のイルカとキリンの画像をCNNによって学習し、そのモデルにテスト画像を当てはめて予測する内容を例に、DLPyの機能(一部抜粋)を紹介します。 2-1.メジャーなディープラーニング・ネットワークの実装 DLPyでは、事前に構築された以下のディープラーニングモデルを提供しています。 VGG11/13/16/19、 ResNet34/50/101/152、 wide_resnet、 dense_net また、以下のモデルでは、ImageNetのデータを使用した事前学習済みのweightsも提供(このweightsは転移学習によって独自のタスクに利用可能)しています。 VGG16、VGG19、ResNet50、ResNet101、ResNet152 以下は、ResNet50の事前学習済みのweightsを転移している例です。 2-2.CNNの判断根拠情報 heat_map_analysis()メソッドを使用し、画像の何処に着目したのかをカラフルなヒートマップとして出力し、確認することができます。 また、get_feature_maps()メソッドを使用し、CNNの各層の特徴マップ(feature map)を取得し、feature_maps.display()メソッドを使用し、取得されたfeature mapの層を指定して表示し、確認することもできます。 以下は、レイヤー1のfeature mapの出力結果です。 以下は、レイヤー18のfeature mapの出力結果です。 2-3.ディープラーニング&画像処理関連タスク支援機能 2-3-1.resize()メソッド:画像データのリサイズ 2-3-2.as_patches()メソッド:画像データ拡張(元画像からパッチを生成) 2-3-3.two_way_split()メソッド:データ分割(学習、テスト) 2-3-4.plot_network()メソッド:定義したディープラーニングの層(ネットワーク)の構造をグラフィカルな図として描画 2-3-5.plot_training_history()メソッド:反復学習の履歴表示
前回の「ディープラーニングの判断根拠」ブログでは、PythonからSAS Viyaの機能を活用するためのパッケージであるSWATを使用した例を説明しましたが、今回は、以下2点に関してご紹介します。 SAS ViyaのよりハイレベルなPython APIであるDLPyを使用した画像認識モデルの判断根拠情報 機械学習の判断根拠情報 1.SAS ViyaのよりハイレベルなPython APIであるDLPyを使用した画像認識モデルの判断根拠情報 この例では、複数のイルカとキリンの画像をSAS Viyaのディープラーニング(CNN)で学習させ、そのモデルに以下の画像を当てはめて、これがイルカなのか否かを判別するものです。 実際、この画像はイルカであると判定されたんですが。 SAS Viyaでは、その判断根拠となり得る情報の一つとして、入力画像のどこに着目したのかを以下の通り出力し、確認できるようになっています。 DLPyでは、get_feature_maps()メソッドでfeature mapを取得し、feature_map.display()で指定したレイヤーの内容を表示することができます。 以下は、レイヤー1のfeature mapです。 以下は、レイヤー18のfeature mapです。 白色の濃淡で、判別に影響を与えている箇所を確認することができます。 さらに、SAS Viyaでは、画像認識モデルの判断根拠情報を可視化する手法の一つである、Grad-CAMと同様に、画像の何処に着目したのかを、カラフルなヒートマップとして出力し、確認することもできるようになっています。 しかも、heat_map_analysis()メソッドを使用して、以下の通り、たった1行書くだけでです。 青、緑、赤の濃淡で、判別に影響を与えている箇所を確認することができます。 DLPyの詳細に関しては、以下をご覧ください。 https://github.com/sassoftware/python-dlpy 2.機械学習の判断根拠情報 もちろんディープラーニングだけではなく、従来からの機械学習のモデルによって導き出された予測や判断に関しても、それがなぜ正しいと言えるのか、具体的に言えば、なぜAさんはこの商品を買ってくれそうだと判断されたのか、なぜこの取引データは疑わしいと判断されたのか、を説明する必要性があるわけです。特に説明責任が求められるような業務要件においては、 ということでSAS Viyaの次期版には機械学習の判断根拠情報、モデル内容を説明するための機能が実装される予定です。 まず、影響度が最も高い変数は、という問いに対しては、従来からの変数の重要度で確認することができます。これをさらに一段掘り下げたものが、Partial Dependence (PD)です。 日本語では「部分従属」と言いますが。重要度の高い変数は、予測に対して、具体的にはどのように作用しているのかを知ることができます。 そしてこのPDを元にさらに一段掘り下げたものが、Individual Conditional Expectation (ICE)になります。 また、これらとは別に、なぜその予測結果に至ったのかを説明するテクニックとしてLocal Interpretable Model-agnostic Explanations (LIME)を活用することができます。 SAS Viyaベースの製品であるSAS Visual Data Mining and
Learn how to change your working directory for SAS. Beginning with SAS® 9.4 TS1M4, you can use a new DATA step function, DLGCDIR, to change the location of your working directory.
Our modern world is full of daily environmental pollutants. We can control much of these by choosing to eat "clean" food and water, free from pesticides and harmful substances. We can also use healthy products on our body and I appreciate the Environmental Working Group for making this task and others easy to
SAS 솔루션으로 다양한 종류의 심층 신경망(DNN;Deep Neural Network) 모델을 구축할 수 있습니다. 구체적으로 컨볼루션 신경망(convolutional neural networks), 순환 신경망(recurrent neural networks), 순방향 신경망(feedforward neural networks), 오토인코더 신경망(autoencoder neural networks) 등을 생성할 수 있는데요. 오늘은 ‘SAS VDMML(Visual Data Mining and Machine Learning)'을 이용해 딥러닝 모델을 구축하는 방법을 자세히 설명해 드리고자 합니다. ‘SAS 클라우드 분석 서비스’를 활용한 딥러닝
During SAS Global Forum 2018, I sat down with four SAS users to get their take on what makes a SAS user. Read through to find valuable tips they shared and up your SAS game. I’m sure you will come away inspired, as you discover some universal commonalities in being a SAS user.