You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Pythonには多様なライブラリが用意されているので、様々な分野で活用することができる。今回は、Pythonからオンラインストレージの「Googleドライブ」を操作してみよう。PythonからGoogleドライブにアクセスできれば、任意のタイミングでクラウドにデータをアップしたり、定期的にファイルを更新したり、とアイデア次第で活用できるだろう。 Googleドライブとは? Googleドライブは、Googleが提供しているオンラインストレージのサービスだ。15GBを無料で利用可能で、各種ファイルをクラウド上に保存できる。加えて、オフィス文書などはWebブラウザ上でも閲覧することが可能なので、利用している方も多いだろう。 OAuth認証について 普通に使っても便利なGoogleドライブだが「Google Drive API」と言って、プログラミング言語から、Googleドライブを操作するため
久しぶりのブログになってしまった...こんにちは,野球データサイエンティストです.*1 最近はちゃんとワールドシリーズや日本シリーズを観る余裕ができて野球好きらしい生活できてます.*2 今日は野球の話...ではなく,最近読んだPython本で感動した書籍があるので紹介&簡単な書評を記したいと思います. 今年(2017)の4月に発行された「Pythonではじめるデータラングリング」という書籍です. www.oreilly.co.jp Pythonではじめるデータラングリング ―データの入手、準備、分析、プレゼンテーション 作者: Jacqueline Kazil,Katharine Jarmul,嶋田健志,長尾高弘出版社/メーカー: オライリージャパン発売日: 2017/04/26メディア: 単行本(ソフトカバー)この商品を含むブログを見る 誕生日プレゼントとして友人*3から頂きました,誠に
Transcript Deep Learning以外の⼿法で ユニクロコンに参戦してみた @mamas16k Kaggle Tokyo Meetup #3 Outline 0.はじめに 1.ユニクロコンペとは? 2.結果 3.⼿法 4.上位の⼈の⼿法まとめ 0.はじめに • Twitter ID: mamas16k • 物理系の学部2年⽣ • 機械学習暦・プログラミング暦共に1年ぐらいの初⼼者 • データ分析系の企業でインターンしてました • ユニクロコンは初の機械学習コンペ 今回のKaggle Meetupの初⼼者枠なので、あまり真に受けずにた くさんマサカリを投げてくれると有り難いです>< 1.ユニクロコンペとは? • Kaggleではなく、オプトDSLで2017年4⽉ ~ 7⽉に開催 • スポンサー:Fast Retailing (ユニクロの親会社) • 服、靴下、ベルト等の画像を2
ロジスティック回帰分析は、2値の分類モデルを作るアルゴリズムです。そして、分類結果の発生確率を予測できます。例えばある人が「ガンである確率 90%」 のような予測ができます。 また、モデルの中身を数式として理解できるので、ディープラーニングのようにブラックボックスになりません。つまり、どの説明変数がモデルの判定に重要かが人間でも分かります。 一方、ロジスティック回帰は、線形分離可能なクラスに対してのみ高い性能が発揮されます。非線形の問題はうまく学習できないという重回帰分析と同じ問題を抱えています。 加えて、ロジスティック回帰の説明変数は、数量データのみ利用可能です。カテゴリデータは基本的に推奨されません。 過去記事:ランダムフォレストで特徴量の重要度を評価する 重回帰分析とロジスティック回帰分析重回帰分析は数値を予測する手法です。ロジスティック回帰分析は、二値分類を予測する手法です。分析対
はじめに 目標の設定と指標の決定 目標の設定 指標の決定 評価指標に対する最低限の知識 機械学習における知識(補足) ニューラルネットワークの学習 最初に使うニューラルネットワーク 時間的にも空間的にも独立である複数の特徴量を持つデータ 空間の局所的な構造に意味のある多次元配列データ(例えば画像) 時間的な変動に意味のあるデータ(例えば音声、自然言語) ニューラルネットワークの細かい設定 ユニットの数と層の数 正則化 活性化関数 ドロップアウト バッチ正規化 学習の早期終了 性能が出ない場合 データの追加収集 ニューラルネットの設定をいじる 用いるニューラルネット自体を変更する 新たなニューラルネットワークの考案 コードを書くにあたって データ成形 結果を記録するコード フレームワークの利用 フレームワークの選択 ChainerとPyTorch TensorFlow Keras 最後に は
自分で小さいツールを作る時に心に留めているtipsです. 書き始めたときは「どうせ書捨てだし」と思って書き始めると意外と長い間,もしくはいろんなところで使うことになったりするので,気をつけておくと後から楽になるというような小技です.大規模なソフトウェアの開発ではまた違った流儀があると思います. メインルーチンを関数にする 関数名はなんでもいいのですが,自分は趣味で main() という名前の関数を用意し,メインルーチンは全てそこに書くようにしています. #!/usr/bin/env python def main(): print('hello, hello, hello!') if __name__ == '__main__': main() pythonの小さなサンプルコードを見たりすると関数外の部分にベタで実行コードが書かれていたりします.もちろんそれでも動くのですが,以下の2点で後
追記20180611 このページはあくまでWindowsでスタンドアローンを前提にした説明ですが、さくらのVPSを使ったセットアップの最新版を書きました。ゆっくり見ていってね! LAMP+WP+Pyのセットアップメモ2018 追記20180816 Windowsでスタンドアローン環境構築の2018最新版(by VisualStudio)できました!ゆっくり見ていってね! Pythonの環境構築とDBへのSQL実行例のメモ2018 追記20190201 なんか閲覧数が多いので内容全見直します。さすがに3年も経つとずいぶん日本語ページも増えたね 参考ページ ・Python3のインストール Python3のインストール ダウンロード(64bit版) https://www.python.org/downloads/windows/ 環境変数にPathを追加してからインストール "Add Pyth
タイトルの本を頂きました。ありがとうございます。僕は原著を少し読んだことがあり、こちらで非常に評判が高い本です。翻訳にもかかわらず原著とほぼ同じ値段で購入できます。 先にJAGSになじみのない方へ説明しておきますと、JAGSはRコアメンバーの一人でもあるMartyn Plummer氏によってC++で開発されたMCMCソフトウェアです。Rから使うのが多数派ですが、PythonからもPyJAGSによって使うことができます。 複雑なモデルでなければStanより収束が早く、離散値をとるパラメータも使えるため、プログラミングがそんなに得意でない人がベイズ統計モデリングをはじめるには一番向いていると思います。最近、再び活発に開発され始めたようで、先日JAGS 4.3.0がリリースされました。 JAGS 4.3.0 is released https://t.co/3jExabWcPI— Martyn
先日、以下のイベントで話しました。 『StanとRでベイズ統計モデリング』読書会(Osaka.Stan#5) : ATND 発表資料は以下です。 MCMCサンプルの使い方 ~見る・決める・探す・発生させる~ from Kentaro Matsuura 理論的には事後分布や予測分布の使い方というのが正しいですが、プログラミング言語との相性を考えてMCMCサンプルの使い方というタイトルにしました。自著ではモデリングのやり方の体得にフォーカスしていますが、事後分布や予測分布が得られるメリットについては分野や人によって異なるので詳細は省きました。いつか補おうと思っていたので良い機会でした。 読書会では、小杉先生の発表やLTもめちゃ面白く、東京のStan勉強会では見たことがない盛り上がりを見ました。ネット上でしか知らなかったベイジアンにたくさん会って話すことができてよかったです。調子に乗って3次会ま
以下の記事で話題になっていたので,自分も導入してみました. pythonで美しいグラフ描画 -seabornを使えばデータ分析と可視化が捗る その1 pythonで美しいグラフ描画 -seabornを使えばデータ分析と可視化が捗る その2 seabornは,installして読みこむだけで,デフォルトでは少々野暮ったい感じのmatplotlibをいい感じにしてくれるライブラリです. 公式のドキュメント 公式チュートリアル - 一覧 公式チュートリアル - スタイリングガイド 公式チュートリアル - いろんなグラフの描き方 基本的には,公式のギャラリーに行き,書きたいグラフを探して使うのがいいと思います. 公式ギャラリー install pip install seaborn サンプル ipython notebook環境で行う場合は,以下のコードを打つことでインライン出力できます. %ma
※こちらの記事は、プロスタ編集部が現在大変人気の高いPythonの文法記事を公開することで、皆様の学習にお役に立ちたい意図で投稿しております。 参考サイト:【Python入門】format関数で文字列の書き方 Pythonで変数を文字列に埋め込むには%演算子を使った%記法が長く用いられてきましたが、Python2.6以降はそれに代わる新しい方式が登場しました。それが「format関数」を使って変数を文字列中に埋め込む方法です。今回は「format関数」の使い方について説明します。 目次 [非表示] 1 format関数とは? 2 format関数の構文 2.1 複数の引数を与える 2.2 リストやタプルを埋め込む 3 format関数の書式指定 3.1 書式指定のやり方 3.2 数値表現 3.3 幅 format関数とは? format関数は、Pyhonで変数の文字列への埋め込みに使われま
Photo by thekirbster こんにちは。谷口です。 先日paizaが行ったアンケートで、「好きなプログラミング言語」の1位(※社会人2位・学生1位)にPythonがランクインしました。 paiza.hatenablog.com Pythonは1990年代前半からオランダ人のグイド・ヴァンロッサムによって開発されたオブジェクト指向スクリプト言語で、文法が必要最小限に抑えられており、ITエンジニアの学習の負担が軽減された開発言語と言われています。 海外では、近年Pythonによる開発が急速に増加しており、InstagramやDropboxなどの開発にも使われています。また、機械学習に適したライブラリが多く、最近は日本でも積極的に取り入れる企業が増加してきており、これからの一層の普及が期待される人気言語となっています。 Pythonはバージョン2系と3系があり、3系には後方互換性が
このサイトについて このサイトでは、データ加工や集計、統計分析などインタラクティブに実行されるスクリプトやバッチプログラム、本格的な Web アプリケーションの実装まで、多彩な機能を持ちながらも初心者にも扱いやすいプログラミング言語 Python (パイソン) を使ったデータの統計分析の手順や使い方について紹介します。 初めてプログラムに触れる人や、R や SAS, Ruby のような言語のプログラミング経験はあっても、Python をあまり扱った経験のない初心者向けに理解できるような内容としてまとめています。 また、本格的な統計分析(基本統計量や多変量解析、データマイニング、機械学習)を学んだことがない人でも理解できるよう、統計(アナリティクス)の解説も必要に応じて述べています。 このサイトで提供できる情報を通して、皆さんが Python を使ったビッグデータ解析を思いのままに使いこなせ
特に断りがない限り、使うデータは、パラメータの効果がわかり易くなるよう、タブ区切りだったり、文字列と空白と数値が混在していたりと、以下のようなちょっと癖のあるものにしています。 filepath_or_buffer本パラメータは、読み込むファイル名を指定するときに使うパラメータです。ただし、以下①、②に示すように、引数なしで動きますので実際に使うことはないでしょう。日本語はデフォルトだとutf_8形式で保存した場合のみ文字化けなく読み込めます。それ以外の形式の場合はencodingを参照ください。 import pandas as pd #①と②のどちらの書き方でも処理は同じ。 df = pd.read_csv('test.txt') #① df = pd.read_csv(filepath_or_buffer='test.txt') #② Out[1]: D001\tD002\tD003
The Python Standard Library¶ While The Python Language Reference describes the exact syntax and semantics of the Python language, this library reference manual describes the standard library that is distributed with Python. It also describes some of the optional components that are commonly included in Python distributions. Python’s standard library is very extensive, offering a wide range of faci
今回は、たった30分で温湿度をセンサーを使えるようになり、Slackに投稿できるお手軽IoTを紹介します。 準備するもの 前提条件 配線する IncomingWebHook の有効化 Slackwebのセットアップ Slackwebのインストール Slack投稿テスト 温湿度センサーの測定値を取得する 温湿度センサーのサンプルプログラムを実行する 温湿度をSlackへ投稿する Slackへ投稿するためのPythonプログラムを作成する プログラムを実行し、温湿度の値をSlackへ投稿する Slackへ定期的に投稿する方法 まとめ:すぐにIoTをはじめたい人へ 準備するもの まずは、必要なセンサーとパーツを準備ができている状態からスタートします。 名称 型番 価格 販売元 温湿度センサー AM2302 (DHT22) 950円 秋月電子通商 ブレッドボード EIC-801 270円 秋月電子
1. はじめに 週刊少年ジャンプ(以下,ジャンプ)は,日本で最も売れている漫画雑誌1です.言うまでもなく,私は大ファンです. ジャンプ編集部の連載会議は非常にシビアです.ジャンプ作家の奮闘を描いたフィクション漫画「バクマン。」では,編集部が毎号の読者アンケートをもとに各漫画の人気を評価し,掲載順や打ち切り作品を決定する様子が描かれています2.連載開始から10週以内(単行本約1冊分)で連載が打ち切られてしまうことも珍しくありません.とても厳しい世界です. 本記事では,機械学習を使って,短命作品(10週以内に終了する作品)の予測を行います.究極の目標は,ジャンプ編集部より先に打ち切り作品を予測し,好みの作品が危ない場合はアンケートを出して打ち切りを回避することです3.我々は読者アンケートの結果を知ることができないので,掲載順の履歴を入力とし,短命作品か否かを出力する多層パーセプトロン4をTen
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く