Strengthen your programming skills with tips and techniques from the experts
Principal component analysis (PCA) is an important tool for understanding relationships in continuous multivariate data. When the first two principal components (PCs) explain a significant portion of the variance in the data, you can visualize the data by projecting the observations onto the span of the first two PCs. In
Grace Whiteis of SAS Technical Support shows you how to capitalize on arrays using SAS software -- and streamline your code, whether it involves arrays or not.
I was recently reading David Mintz's excellent SESUG 2018 conference paper on Five Crazy Good Visualizations and How to Plot Them, and saw a map that caught my eye. David showed how to create a similar map, but with completely different data - I decided to try creating a map
While growing up in the 80's, I watched The Golden Girls on TV with my Grandma Betty. Now, when my sister visits, we binge watch reruns on TV Land. I was excited when I saw for this Halloween, you could buy Golden Girls costumes! Too bad they sold out right
Every year at Halloween, I post an article that shows a SAS trick that is a real treat. This article shows how to use the INTNX function to find dates that are related to a specified date. The INTNX function is a sweet treat, indeed. I previously wrote an article
Find out about the changes and enhancements to the best-selling book, The Little SAS Book.
A common task in SAS programming is to specify a list of variables that satisfy some pattern. You can specify lists for the KEEP= or DROP= data set options, and you can use lists of variables on many SAS statements such as the VAR and MODEL statements. Although SAS has
Eliud Kipchoge recently ran a marathon in under 2 hours. It was a special marathon where they had set up the best possible conditions to help him achieve this goal (such as swapping in pace-setting runners to block the wind for him), so it won't count as the world record
In response to a recent article about how to compute the cosine similarity of observations, a reader asked whether it is practical (or even possible) to perform these types of computations on data sets that have many thousands of observations. The problem is that the cosine similarity matrix is an
Someone asked SAS' Steven Sober if the PROC SQL example noted first in this post could be refactored into PROC FedSQL so it could run faster by leveraging SAS Viya’s in-memory engine CAS? Yes. Here's how.
When my younger son grabs a book or a toy from his older siblings without permission, his line of defense is always the same: “Sharing is caring!” Our kids' schools teach and reinforce this philosophy. Likewise, our family has rules to ensure peaceful, orderly sharing. Similarly, many organizations value collaboration.
You've probably heard of the stupid 'challenges' where people usually end up hurting themselves (cinnamon challenge, Carolina reaper pepper challenge, etc). I thought it might be more helpful to society to have a challenge that could actually help people, rather than hurting them! Therefore I came up with the Halloween
In this post, you'll learn how to parallel load and compress a SAS® Cloud Analytic Services (CAS) Table in one pass of the CAS table.
なぜ“sasctl”が必要なのか？ オープンソースとの統合性はSAS Viyaの一つの重要な製品理念であり、そのための機能拡張を継続的に行っています。その一環として”sasctl”という新しいパッケージがリリースされました。SAS Viyaでは従来から、PythonからViyaの機能を使用するために”SWAT”パッケージを提供しており、SAS Viyaのインメモリー分析エンジン（CAS）をPythonからシームレスに活用し、データ準備やモデリングをハイパフォーマンスで実行することができるようになっていました。しかし、データ準備やモデル開発は、アナリティクス・ライフサイクル（AI＆アナリティクスの実用化に不可欠なプロセス）の一部のパートにすぎません。そこで、開発されたモデルをリポジトリに登録・管理して、最終的に業務に実装するためのPython向けパッケージとして”sasctl”が生まれたのです。 sasctlの概要 sasctlで提供される機能は、大まかに、3つのカテゴリーに分けられます。 また、この３つのカテゴリーは、お互いに依存する関係を持っています。 １．セッション sasctlを使用する前に、まずSAS Viyaのサーバーに接続する必要があります。（この接続は、ViyaマイクロサービスのRESTエンドポイントに対して行われることに注意してください） SAS Viyaのサーバーへの接続は、セッションのオブジェクトを生成することにより行われます。 >>> from sasctl import Session >>> sess = Session(host, username, password) この時点で、sasctlはViya環境を呼び出して認証し、この後のすべての要求に自動的に使用される認証トークンを受け取りました。 ここからは、このセッションを使用してViyaと通信します。 ２．タスク タスクは一般的に使用される機能を意味し、可能な限りユーザーフレンドリーになるように設計されています。各タスクは、機能を実現するために、内部的にViya REST APIを複数回呼び出しています。例えば、register_modelタスクではREST APIを呼び出し、下記の処理を実行しています： リポジトリの検索 プロジェクトの検索 プロジェクトの作成 モデルの作成 モデルのインポート ファイルのアップロード その目的としては、ユーザーがPythonを使って、アナリティクス・ライフサイクルで求められるタスクを実行する際に、sasctlの単一のタスクを実行するだけで済むようにすることです。 >>> from sasctl.tasks import register_model >>> register_model(model, 'My Model', project='My Project') 今後も継続的に新しいタスクを追加していきますが、現在のsasctlには下の２つのタスクを含まれています：
The SAS DATA Step's DESCENDING option on BY variables quickly reveals a data set's largest value.
The SAS Championship golf tournament is happening this week, here in Cary, North Carolina! If you're following along and watching the scores, you might wonder how they're doing compared to past years, and what kind of scores it generally takes to win. Follow along as I plot the data from
As a fellow student, I know that making sure you get the right books for learning a new skill can be tough. To get you started off right, I would like to share the top SAS books that professors are requesting for students learning SAS. With this inside sneak-peek, you
We've had record high 90+ degree temperatures here in the southeast US this past week (September / October), and it has made me appreciate having an air conditioner. Indeed, air conditioners were pretty much invented here in North Carolina (see Eric Cramer). They are used in pretty much every building
I frequently see questions on SAS discussion forums about how to compute the geometric mean and related quantities in SAS. Unfortunately, the answers to these questions are sometimes confusing or even wrong. In addition, some published papers and web sites that claim to show how to calculate the geometric mean
There are several different kinds of means. They all try to find an average value from among a set of numbers. Although the most popular mean is the arithmetic mean, the geometric mean can be useful for problems in statistics, finance, and biology. A common application of the geometric mean
This article continues a series that began with Machine learning with SASPy: Exploring and preparing your data (part 1). Part 1 showed you how to explore data using SASPy with Python. Here, in part 2, you will learn how to begin to prepare your data to use it within a
In part 1 of this post, we looked at setting up Spark jobs from Cloud Analytics Services (CAS) to load and save data to and from Hadoop. Now we are moving on to the next step in the analytic cycle, scoring data in Hadoop and executing SAS code as a
Lately we've been hearing a lot about "record low unemployment" in the news. Being a data guy, I wanted to see it for myself. Follow along as I create some custom unemployment graphs from the official data for California and New York (two of our most populous states). Or, if
One of the strengths of the SAS/IML language is its flexibility. Recently, a SAS programmer asked how to generalize a program in a previous article. The original program solved one optimization problem. The reader said that she wants to solve this type of problem 300 times, each time using a
One of the features of SAS Grid Manager (and SAS Grid Manager for Platform) introduced in SAS 9.4 M6 is the capability for the grid provider software to handle open-source workloads in addition to traditional SAS jobs. In this post, we’ll take a look at the steps required to get your SAS Grid Manager environment set up to utilize this functionality, and we’ll demonstrate the process of submitting Python code for execution in the SAS Grid.
Just when you think you’ve seen it all, life can surprise you in a big way, making you wonder what else you've missed. That is what happened when I recently had a chance to work with the SAS® Scalable Performance Data Server, a product that's been around a while, but
A moving average is a statistical technique that is used to smooth a time series. My colleague, Cindy Wang, wrote an article about the Hull moving average (HMA), which is a time series smoother that is sometimes used as a technical indicator by stock market traders. Cindy showed how to
Yesterday we had a 'special election' here in NC, to elect new members to the House of Representatives for Congressional Districts 3 and 9. The election got a lot of national news coverage, therefore I thought people might like seeing the results plotted on a map. Before I decided to