
SAS expert Leonid Batkhan presents the %embed macro function as a way to embed both “foreign” and SAS native code from a file into a SAS program, preventing clutter in your code.
SAS expert Leonid Batkhan presents the %embed macro function as a way to embed both “foreign” and SAS native code from a file into a SAS program, preventing clutter in your code.
Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In this post I'll discuss how to load multiple CSV files into memory as a single table using the loadTable action. Load and prepare data on the CAS server To start, we need to create multiple
Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In this post I'll discuss how to update rows in a distributed CAS table. Load and prepare data in the CAS server I created a script to load and prepare data in the CAS server. This
Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In this post I'll discuss saving CAS tables to a caslib's data source as a file. This is similar to saving pandas DataFrames using to_ methods. Load and preview the CAS table First, I imported the
In part 1 of this series, we examined our data before building any models. Among the discoveries was a column that seemed to contain a SAS date value. Here, we will discuss what exactly is meant by a 'SAS date', how to format it correctly, and how to create a
Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In this post I'll discuss how to execute SQL with the Python SWAT package in the distributed CAS server. Prepare and load data to the CAS server I created a Python function named createDemoData to prepare
Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In this post I'll discuss how to count missing values in a CAS table using the Python SWAT package. Load and prepare data First, I connect my Python client to the distributed CAS server and named
Welcome to my series on getting started with Python integration to SAS Viya for predictive modeling. Exploring Data - Learn how to explore the data before fitting a model Working with Dates - Learn how to format a SAS Date and calculate a new column Imputing Missing Values - Learn
Welcome to the first post in my series Getting Started with Python Integration to SAS Viya for Predictive Modeling. I'm going to dive right into the content assuming you have minimal knowledge on SAS Cloud Analytic Services (CAS), CAS Actions and Python. For some background on these subjects, refer to
Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In this post I'll discuss how to bring a distributed CAS table back to your Python client as a DataFrame. In this example, I'm using Python on my laptop (Python client) to connect to the
Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In previous posts, I discussed how to connect to the CAS server, how to execute CAS actions, and how your data is organized on the CAS server. In this post I'll discuss loading client-side CSV files into
Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In previous posts, I discussed how to connect to the CAS server, working with CAS actions and CASResults objects, and how to summarize columns. Now it's time to focus on how to get the count of unique values
The addition of the PYTHON procedure and Python editor in SAS Viya enables users to execute Python code in SAS Studio. This new capability in SAS Viya adds another tool to SAS's existing collection. With this addition I thought, how can I utilize this new found power? In this example,
I will show you how to deploy multi-stage deep learning (DL) models in SAS Event Stream Processing (ESP) and leverage ESP on Edge via Docker containers to identify events of interest.
Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In previous posts, I discussed how to connect to the CAS server, how to execute CAS actions, and how to summarize columns. Now it's time to focus on how to rename columns in CAS tables. Load and explore data
Group and aggregate CAS tables Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In previous posts, I discussed how to connect to the CAS server, how to execute CAS actions, and how to summarize columns. Now it's time to focus on how to group and aggregate CAS
Using SAS Viya in combination with open-source capabilities, we were able to develop an automated solution for logo detection that does not require any manual data labeling.
こんにちは!SAS Institute Japanの堀内です。今回も自然言語処理について紹介いたします。 前回の投稿では、実際にSASを使って日本語の文章を扱う自然言語処理の例を解説しました。 最終回の本投稿ではその応用編として、自然言語処理の代表的なタスクとSASによる実装方法を紹介します。なお、ここでいうタスクとは「定式化され一般に共有された課題」といった意味になります。自然言語処理には複数のタスクがあり、タスクごとに、共通する部分はあるとはいえ、問題解決のアプローチ方法は基本的に大きく異なります。SASには各タスクごとに専用のアクションセット1が容易されています。 要約タスク その名の通り文章を要約するタスクです。SASではtextSummarizeアクションセットで対応可能です。 ここでは、NHKのニュース解説記事「気になる頭痛・めまい 天気が影響?対処法は?」(https://www.nhk.or.jp/kaisetsu-blog/700/471220.html) の本文を5センテンスで要約してみましょう。 import swat conn = swat.CAS('mycashost.com', 5570, 'username', 'password') conn.builtins.loadActionSet(actionSet='textSummarization') conn.textSummarization.textSummarize(addEllipses=False, corpusSummaries=dict(name='corpusSummaries', compress=False, replace=True), documentSummaries=dict(name='documentSummaries', compress=False, replace=True), id='Id', numberOfSentences=5, table={'name':CFG.in_cas_table_name}, text='text', useTerms=True, language='JAPANESE') conn.table.fetch(table={'name': 'corpusSummaries'}) numberOfSentencesで要約文のセンテンス数を指定しています。結果は以下の通りです。 'まず体調の変化や天気、気温・湿度・気圧などの日記をつけ、本当に天気が影響しているのか、どういうときに不調になるのかパターンを把握すると役立ちます。 気温・湿度以外にも、気圧が、体調の悪化や、ときに病気の引き金になることもあります。 私たちの体は、いつも耳の奥にある内耳にあると言われている気圧センサーで、気圧の変化を調整しています。 ただ、天気の体への影響を研究している愛知医科大学佐藤客員教授にお話ししを伺ったところ、「台風最接近の前、つまり、気圧が大きく低下する前に、頭が痛いなど体調が悪くなる人は多い」ということです。 内耳が敏感な人は、わずかな気圧の変化で過剰に反応し、脳にその情報を伝えるので、脳がストレスを感じ、体のバランスを整える自律神経が乱れ、血管が収縮したり、筋肉が緊張するなどして、その結果、頭痛・めまいなどの体に様々な不調につながっているのです。' 重要なセンテンスが抽出されていることが分かります。 テキスト分類タスク 文章をいくつかのカテゴリに分類するタスクです。その内、文章の印象がポジティブなのかネガティブなのか分類するものをセンチメント分析と呼びます。ここでは日本語の有価証券報告書の文章をポジティブかネガティブか判定してみます。使用するデータセットは以下になります。 https://github.com/chakki-works/chABSA-dataset (なお、こちらのデータセットには文章ごとにポジティブかネガティブかを示す教師ラベルは元々付与されておりませんが、文章内の特定のフレーズごとに付与されているスコアを合算することで教師ラベルを合成しております。その結果、ポジティブ文章は1670文章、ネガティブ文章は1143文章、合計2813文章になりました。教師ラベルの合成方法詳細はこちらのブログをご覧ください。) pandasデータフレームにデータを格納した状態を確認してみましょう。 df = pd.read_csv(CFG.local_input_file_path) display(df)
Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In previous posts, I discussed how to connect to the CAS server, how to execute CAS actions, and how to filter CAS tables. Now it's time to focus on how to summarize columns. Load and explore data Let's first load
こんにちは!SAS Institute Japanの堀内です。今回も自然言語処理について紹介いたします。 第1回目の投稿では、最近の自然言語処理の応用例とSAS社が携わった自然言語処理関連の実案件の概要を紹介しました。 第2回目の本投稿では実際にSASを使って日本語の文章を扱う自然言語処理の例を解説していきます。 テキストデータって何? 自然言語処理を語る前に、自然言語処理が処理対象とするデータのことを知る必要があります。自然言語処理で扱われるデータはテキストデータと呼ばれています。ここからはテキストデータがどういうものか探っていきます。 テキストとは以下のようなものです。 「自然言語処理で扱われるデータはテキストデータと呼ばれています。本投稿ではテキストデータがどういうものか探っていきます。」 何の変哲もない日本語の文章です。日本語以外の言語で書かれた文章ももちろんテキストと呼ばれます。 ではテキストデータとは何でしょう?データと言うからには何らかの構造を持っていると考えます。例えば行と列が与えられたテーブルデータがわかりやすい例です。 テキストデータと呼ぶとき、テキストに何らかの構造を与えられたものを想起すると良いかと思います。上で挙げたサンプルのテキストをテキストデータに変換してみましょう。 ["自然言語処理で扱われるデータはテキストデータと呼ばれています。", "本投稿ではテキストデータがどういうものか探っていきます。"] これは句読点でテキストを区切り、リストに格納した例です。やりかたは他にもあります、 [["自然言語処理", "で", "扱われる", "データ", "は", "テキストデータ", "と", "呼ばれて", "います", "。"], ["本投稿", "では", "テキストデータ", "が", "どういうもの", "か", "探って", "いきます", "。"]] これは先ほどの例で2つのテキストに区切ったうえで、それぞれのテキストを更に単語ごとに区切って別々のリストに格納した例になります。これをテーブルデータのように整えると、 ID COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 1 自然言語処理 で 扱われる
Let's create a Multi-stage Computer Vision model to detect objects on high-resolution imagery taken from an aerial view. The goal is to locate a dog and determine if he is wearing a scarf or not and what color the scarf is.
Welcome to the continuation of my series Getting Started with Python Integration to SAS Viya. In previous posts, I discussed how to connect to the CAS server, how to execute CAS actions, and how to filter CAS tables. Now it's time to focus on creating calculated columns on a CAS table. Load and explore
Welcome to the seventh installment in my series Getting Started with Python Integration to SAS Viya. In previous posts, I discussed how to connect to the CAS server, how to execute CAS actions, and how to work with the results. Now it's time to learn how to filter CAS tables. Load and explore data
The Proc Python procedure, Python code editor & Python code step facilitate low-code analytics calling Python and SAS from a common interface. Data scientists also appreciate the connection to Python & R through the Model Studio Open-source Code node. Older methods of interaction include the swat and sas_kernel packages running on Python clients.
Welcome to the sixth installment in my series Getting Started with Python Integration to SAS Viya. In previous posts, I discussed how to connect to the CAS server, how to execute CAS actions, and how to work with the results. Now it's time to generate simple descriptive statistics of a CAS table. Let's begin
[Editor's note: this post was co-authored by Marinela Profi and Wilbram Hazejager] Data science teams are multidisciplinary, each with different skills and technologies of choice. Some of them use SAS, others may have analytical assets already built in Python or R. Let's just say each team is unique. As part
This post, written by Radhikha Myeni and Jagruti Kanjia, will demonstrate how easy it is to build and deploy a machine learning pipeline by using SAS and Python. The Model Studio platform provides a quick and collaborative way to build complex pipelines by dragging and dropping nodes from a web-based
Welcome to the fifth installment in my series Getting Started with Python Integration to SAS Viya. In previous posts, I discussed how to connect to the CAS server, how to execute CAS actions, how to work with the results, and how your data is organized on the CAS server. In
Welcome to the fourth installment in my series Getting Started with Python Integration to SAS Viya. In previous posts, I discussed how to connect to the CAS server, how to execute CAS actions, and how to work with the results. Now it's time to understand how your data is organized
In this article, we summarize our SAS research paper on the application of reinforcement learning to monitor traffic control signals which was recently accepted to the 34th Conference on Neural Information Processing Systems (NeurIPS 2020), Vancouver, Canada. This annual conference is hosted by the Neural Information Processing Systems Foundation, a non-profit corporation that promotes the exchange of ideas in neural information processing systems across multiple disciplines.