All Posts
As Hurricane Irma makes its way through the Caribbean, and heads towards the United States, the big question on everyone's mind ... is the hurricane going to hit my city? Or, as some people like to say, "should I buy milk & bread?" Let's analyze & map some data to
Imagínese estar en un centro comercial y que le llegue un mensaje a su celular en el que le digan que pagando con su tarjeta de crédito por los próximos 15 minutos podrá disfrutar de los mejores descuentos del fin de semana en el almacén que tiene al frente, este
In SAS Visual Analytics 8.1, report creators have the ability to include drive-distance and drive-time in their geographical maps, but only if their site has an Esri ArcGIS Online account and they have valid credentials for the account. In the user Settings for SAS Visual Analytics Geographic Mapping 8.1 release,
I suppose we've all been watching Hurricane Irma rip through the Caribbean like a giant buzzsaw blade, with wind speeds over 180mph. This is one of those rare Category 5 storms. But just how rare are Category 5 hurricanes? According to the Wikipedia page, hurricanes with wind speeds >=157mph are
If you use SAS regression procedures, you are probably familiar with the "stars and bars" notation, which enables you to construct interaction effects in regression models. Although you can construct many regression models by using that classical notation, a friend recently reminded me that the EFFECT statement in SAS provides
This is the seventh post in my series of machine best practices. Catch up by reading the first post or the whole series now. Generalization is the learned model’s ability to fit well to new, unseen data instead of the data it was trained on. Overfitting refers to a model that fits
Managing big data doesn't always mean hiring more people and buying new tools.
As the summer season begins to become part of the past and we return to a “normal” schedule, I’m reminded that there is still something celebratory as we slowly make our way into the autumn season. It’s yoga! September is National Yoga Month. It is a national health observance designated
은행 산업의 경쟁 환경 변화 지난 4월, 국내 최초 인터넷 전문 은행 ‘케이뱅크’는 출범 사흘 만에 신규 계좌 가입자 수 10만 명을 돌파하며 화려하게 데뷔했습니다. 1992년 옛 평화은행 이후 25년 만에 탄생한 신규 은행으로 은행권은 물론 세간의 이목을 집중시켰는데요. 이어서 7월에는 인터넷 전문 은행 2호 ‘카카오뱅크’가 오픈 8시간 만에 10만 계좌,
Parents, I don’t need to tell you three obvious things: Sleep is critical to our well-being (no matter what age you are). Ask any primary care physician or therapist. Tweens and teens need more sleep than they get (need an average of 9-10 hours, but almost half get fewer than
No se sorprenda si su empresa de telecomunicaciones es la que decide el próximo teléfono que usted debe comprar o la aerolínea, el siguiente destino de sus vacaciones: las ofertas que más le convienen, el producto ideal o el servicio que debería contratar es información que ya está en sus
Correlation is a fundamental statistical concept that measures the linear association between two variables. There are multiple ways to think about correlation: geometrically, algebraically, with matrices, with vectors, with regression, and more. To paraphrase the great songwriter Paul Simon, there must be 50 ways to view your correlation! But don't
From June 6 to 9 the first ever ‘Dutch Data Science Week’ took place in the Netherlands. The week consisted of 4 days in which 28 events took place in 6 different locations. During the week people could attend classes ranging from beginner to advanced levels, visit meetups, participate in
SAS Viyaで線形回帰を行う方法を紹介します。 言語はPythonを使います。 SAS Viyaで線形回帰を行う方法には大きく以下の手法が用意されています。 多項回帰: simpleアクションセットで提供。 一般化線形回帰または一般線形回帰: regressionアクションセットで提供。 機械学習で回帰: 各種機械学習用のアクションセットで提供。 今回は単純なサインカーブを利用して、上記3種類の回帰モデルを作ってみます。 【サインカーブ】 -4≦x<4の範囲でサインカーブを作ります。 普通に $$y = sin(x) $$を算出しても面白みがないので、乱数を加減して以下のようなデータを作りました。これをトレーニングデータとします。 青い点線が $$y=sin(x)$$ の曲線、グレーの円は $$y=sin(x)$$ に乱数を加減したプロットです。 グレーのプロットの中心を青い点線が通っていることがわかります。 今回はグレーのプロットをトレーニングデータとして線形回帰を行います。グレーのプロットはだいぶ散らばって見えますが、回帰モデルとしては青い点線のように中心を通った曲線が描けるはずです。 トレーニングデータのデータセット名は "sinx" とします。説明変数は "x"、ターゲット変数は "y" になります。 各手法で生成したモデルで回帰を行うため、-4≦x<4 の範囲で0.01刻みで"x" の値をとった "rangex" というデータセットも用意します。 まずはCASセッションを生成し、それぞれのデータをCASにアップロードします。 import swat host = "localhost" port = 5570 user = "cas" password = "p@ssw0rd"
先日投稿した「機械学習のパラメータをオートチューニングしよう(分類編)!」の続きです。 今回は回帰分析をオートチューニングします。 あらまし 機械学習の課題はパラメータチューニングで、手動で最高のパラメータを探そうとすると、とても時間がかかり効率的ではありません。 SAS Viyaではパラメータチューニングを自動化するオートチューニング機能を提供しています。 オートチューニング機能を使うことで、限られた時間内、条件下で最高のパラメータを探索し、予測モデルを生成することができます。 今回やること 今回はオートチューニングを使って数値予測モデルを生成します。 使うデータは架空の銀行の金融商品販売データです。顧客の取引履歴と営業履歴から構成されており、新たな金融商品の販売数を予測するデータとなっています。 内容は以下のようになっており、約5万行、22列の構成です。 1行1お客様データとなっていて、顧客の口座情報や取引履歴、営業履歴が1行に収納されています。 ターゲット変数はcount_tgtで、これは各顧客が購入した金融商品数を表しています。 ほとんどが0(=未購入)ですが、購入されている顧客の購入数を予測するモデルを生成します。 今回はランダムフォレストを使って予測したいと思います。 ランダムフォレストは別々の決定木を複数作り、各決定木の予測値をアンサンブルして最終的な予測値とする機械学習の一種です。 まずは手動で予測 SAS Viyaでランダムフォレストを使って予測モデルを生成するにあたり、まずはCASセッションを作ってトレーニングデータとテストデータをインメモリにロードします。 # PythonからCASを操作するためのSWATライブラリをインポート import swat # 接続先ホスト名、ポート番号、ユーザー名、パスワードを指定 host = "localhost" port = 5570 user = "cas" password = "p@ssw0rd" # mysessionという名称のCASセッションを作成 mysession = swat.CAS(host, port, user, password)