Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions TSUTSUMI_Soichiro/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## 名前:
堤 創一朗

## 大学名:
東京都市大学

## 専攻:
情報学

## 今までの開発経験:
8年前くらいから C,Java,Perl,Python,JavaScriptなどで小さなプログラムをちょこちょこ書いてきました。

Perl,Python,JavaScriptではチャットなどのWebアプリケーションや、スクレイピング用のスクリプトを書いたり、

Javaではアプレットを使って、クリックとドラッグでピエトモンドリアンっぽい絵を生成するアプリケーションを作りました。

それからCUIアプリケーションが好きなので、Pythonからcursesライブラリを使って簡単なツールをよく作ります。

最近だとC言語で遺伝的アルゴリズムやアプリオリアリゴリズムを実装してみました。

機械学習は本を読みながら、例題のコードを参考に試してみている最中です。

## 中期的な目標:

やりがいを感じている課題がいくつも在るのですが、それらの解決を通じて

    卒論を書くこと

    名刺がわりになるような成果をあげること

を達成したいです。

そのために、機械学習で一体どんなことができて、どんなことはできないのかを見極め、

今、自分の手で一定の成果をあげられる課題を見つけたいです。
265 changes: 265 additions & 0 deletions TSUTSUMI_Soichiro/TSUTSUMI_Soichiro.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#課題1\n",
"\n",
"#1から11未満の整数のリストnumを作成\n",
"num = list(range(1,11))\n",
"num"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[2, 4, 6, 8, 10]"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#課題2\n",
"\n",
"#上で作った1〜10の数字を含むリストnumを利用してスライスで、\n",
"#num[1] から順に evenを作成\n",
"even = num[1::2]\n",
"even"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{0: 'a', 1: 'b', 2: 'c', 3: 'd', 4: 'e', 5: 'f'}"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#課題3\n",
"\n",
"#在る前提のリスト\n",
"atof = [\"a\",\"b\",\"c\",\"d\",\"e\",\"f\"]\n",
"\n",
"#0〜5の整数をキー、前提となるリストのアルファベット一文字づつの文字列を値とする、\n",
"#辞書型のオブジェクトを作成せよという課題だと解釈しました。\n",
"#辞書型の内包表記を使って、リストの値を値とし、\n",
"#そのindexをキーとする辞書型のオブジェクトdを作成\n",
"d = {i:atof[i] for i in range(len(atof))}\n",
"d"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#課題4\n",
"\n",
"class Human:\n",
" \"\"\"個人につての情報を扱うクラス\"\"\"\n",
" ctr = 0\n",
" \n",
" def __init__(self, name, age, sex, height, weight):\n",
" \"\"\"\n",
" コンストラクタではインスタンス変数を初期化し、\n",
" 作成したインスタンスの数を数えるクラスメソッド count_instance を呼び出す。\n",
" \"\"\"\n",
" #引数をインスタンス変数に代入\n",
" self.name = name\n",
" self.age = age\n",
" self.sex = sex\n",
" self.height = height\n",
" self.weight = weight\n",
" \n",
" #作成したインスタンスを作成する。\n",
" Human.count_instance()\n",
" \n",
" def pass_a_year(self):\n",
" \"\"\"年齢をインクリメントするインスタンスメソッド\"\"\"\n",
" self.age += 1\n",
" \n",
" @classmethod\n",
" def count_instance(cls):\n",
" \"\"\"作成したインスタンスをカウントするクラスメソッド\"\"\"\n",
" cls.ctr += 1\n",
" \n",
"yamada = Human(\"山田\", 23, \"男\", 170.3, 60.2)\n",
"takahashi = Human(\"高橋\", 30, \"女\", 165.2, 46.2)\n"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"('山田', 23, '男', 170.3, 60.2)"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"yamada.name, yamada.age, yamada.sex, yamada.height, yamada.weight"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"('高橋', 30, '女', 165.2, 46.2)"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"takahashi.name, takahashi.age, takahashi.sex, takahashi.height, takahashi.weight"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"('山田', 24, '男', 170.3, 60.2)"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"yamada.pass_a_year()\n",
"yamada.name, yamada.age, yamada.sex, yamada.height, yamada.weight"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"matrix([[19, 22],\n",
" [43, 50]])"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#課題5\n",
"import numpy as np\n",
"m1 = np.matrix([[1,2],[3,4]])\n",
"m2 = np.matrix([[5,6],[7,8]])\n",
"np.dot(m1, m2)"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1.4142135623730951"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#課題6\n",
"v1 = np.array([0,1])\n",
"v2 = np.array([1,1])\n",
"#ベクトルv1とv2がなす角の余弦\n",
"np.dot(v1, v2) / np.linalg.norm(v1) * np.linalg.norm(v2)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}