Jamoviによる新宿区中古マンション価格の統計解析(ボストン住宅価格を参考に)

国土交通省「不動産情報ライブラリ」から取得した不動産取引価格データをjamoviで読み込み、データの概要を確認したうえで、最後に「面積(㎡)」と「築年数」を用いた重回帰分析を行う

機械学習による価格予測や、最も精度の高いモデルを作ることは目的とせず、データの特徴と変数間の関係をJamoviで簡便に統計的に直感理解することを目指します

 

項目

今回の設定

対象地域

東京都新宿区

物件種別

中古マンション等

対象期間

2023年第2四半期~2026年第1四半期

元データ

Tokyo_Shinjuku Ward_20232_20261.csv

分析対象

取引価格(総額)、面積(㎡)、建築年から計算した築年数

最終分析

取引価格(総額)を目的変数、面積(㎡)と築年数_計算を説明変数とする線形重回帰

 

出力結果を読む

モデル適合度

値

読み方

R

0.865

モデルの当てはまりと価格の関係が強いことを示す指標

R²

0.747

取引価格のばらつきの約74.7%を、このモデルで説明できている

分析件数 N

5,629

価格・面積・築年数など必要な値がそろい、分析に使われた件数

 

築年数-取引量(築20年と40年にピーク)

都心中古マンションでも1億円に迫ると言っても

回帰式

推定取引価格 = 14,200,000 + 1,700,000 × 面積(㎡) − 1,160,000 × 築年数

※上式は出力された係数を読みやすく丸めて記載しています。価格の単位が円であることを前提としています。

係数の解釈(2026/10/25時点)

·       面積の係数は約170万円です。築年数が同じであると仮定したとき、面積が1㎡大きい物件は、推定価格が平均して約170万円高いという関係を示します。

·       築年数の係数は約−116万円です。面積が同じであると仮定したとき、築年数が1年増えると、推定価格が平均して約116万円低いという関係を示します。

·       p < .001は、各係数が0であるという帰無仮説のもとでは今回のような結果が得られにくいことを示し、係数が統計的に有意であることを表します。ただし、因果関係が証明されたという意味ではありません。

·       切片は、面積0㎡・築年数0年のときの推定価格です。実際に想定されるマンションの条件とは離れているため、実質的な価格として解釈することは限定的です。

 

茗荷谷で多変量解析

データサイエンスの初歩講習として、Rによる多変量解析の講座を受講しているが、無理にRで解・仮説判定するよりも、グラフ一発描画のjamoviで良いのではと思ってしまう。

現状のフロー

Jamoviから、SQL-lite3のデータを直接取り込むのは、うまくいっておらず、csv読み込みになってしまったが、jamoviからnativeRエディターが使えることはうれしい。

SQL-lite3 by letos管理端末

↓

Jamovi

生データを読み込んだみたものの、データ件数が50万件のため、分析方法には一考が必要そう・・・。

Copilotに問う、なぜ、df <- as.data.frame(data) の1行

で直るのか?

  • df <- as.data.frame(data) の1行を入れることで、jamoviのガチガチにロックされたスプレッドシートからデータを「R専用の自由な作業スペース(df)」に完全に切り離しています。

やっと・・・描画



DELL XPS 8960 深層学習環境構築手順

マシン構成

●      DELL XPS 8960

●      CPU: Core i7-14700K (3.4GHz)

●      メモリ: 64GB

●      SSD: 1TB

●      GPU: GeForce RTX 4070 Ti SUPER (16GB VRAM)

●      OS: Windows 11 Pro

構成方針

TensorFlowは2.11以降ネイティブWindowsでGPUが使えなくなったため、WSL2(Ubuntu)上にPyTorchとTensorFlowを両方構築する方式を採用。手順はClaudeによる提示でのインストールを実行する。

 

GTX4070 Ti Super

1. GeForceドライバのインストール(Windows側)

●      https://www.nvidia.com/Download/index.aspx を開く

●      Product Type: GeForce / Series: RTX 40 Series / Product: RTX 4070 Ti SUPER / OS: Windows 11 を選択

●      Game Ready DriverまたはStudio Driverをダウンロード(安定性重視ならStudio Driver)

●      インストーラ実行 →「カスタムインストール」→「NVIDIAグラフィックスドライバ」のみでOK(GeForce Experienceは不要)

●      再起動

●      確認: コマンドプロンプトで nvidia-smi を実行し、GPU名とCUDA Versionが表示されればOK

2. WSL2 + Ubuntuのインストール(Windows側)

●      PowerShellを管理者として実行

●      wsl --install を実行(既定でUbuntu最新LTSが入る)

●      再起動

●      スタートメニューから「Ubuntu」を起動し、ユーザー名・パスワードを設定(Linux側の別管理)

●      Ubuntu側で nvidia-smi を実行し、Windows側と同じGPU情報が表示されればWSL2からGPUが見えている

注意: WSL2側にLinux用NVIDIAドライバを別途インストールしない(Windows側のドライバがそのまま使われる)。

3. Python環境構築(Ubuntu側)

sudo apt update && sudo apt upgrade -y

Python 3.11をdeadsnakes PPA経由で試みたが、環境によっては python3.11-dev が見つからない場合があるため、最終的にUbuntu標準のPython 3.12を使用(PyTorch/TensorFlowともに3.12対応済み)。

sudo apt install -y python3.12-venv build-essential

cd ~

python3.12 -m venv dl-env

source ~/dl-env/bin/activate

pip install --upgrade pip

プロンプトの先頭に (dl-env) と表示されれば仮想環境が有効化された状態。

4. PyTorchのインストール

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126

確認コマンド:

python3 -c "import torch; print(torch.__version__); \

  print(torch.cuda.is_available()); print(torch.cuda.get_device_name(0))"

→ True と NVIDIA GeForce RTX 4070 Ti SUPER が表示されればOK(実績: torch 2.14.0+cu126)

5. TensorFlowのインストール

pip install tensorflow[and-cuda]

初回はGPUライブラリが見つからず「Cannot dlopen some GPU libraries」→ [](GPU未検出)になった。原因は、pipで入ったnvidia関連ライブラリ(cuDNN等)の場所をTensorFlowが自動で見つけられないこと。

対処: venvの activate スクリプトに以下を追記する(.bashrcではなくactivateに書くのがポイント。.bashrcはvenv有効化前に実行されるため、python3がシステム側を指してしまい失敗する)。

echo 'export LD_LIBRARY_PATH=$(find $(python3 -c "import site; \

  print(site.getsitepackages()[0])")/nvidia -name lib -type d \

  2>/dev/null | tr "\n" ":")$LD_LIBRARY_PATH' >> ~/dl-env/bin/activate

以降、source ~/dl-env/bin/activate するたびに自動でパスが設定される。

確認コマンド:

python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

→ [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')] が表示されれば成功

完了状態(2026年9月6日時点)

●      PyTorch: GPU認識 OK(cu126)

●      TensorFlow: GPU認識 OK

●      環境: ~/dl-env(Ubuntu on WSL2、Python 3.12)

今後の運用メモ

●      作業を再開するたびに source ~/dl-env/bin/activate を実行すること

●      新しいターミナルでは自動でLD_LIBRARY_PATHが設定される(activateスクリプトに組み込み済み)

●      PyTorchとTensorFlowは同じ仮想環境に同居させても問題なし。依存関係の衝突が出た場合は環境を分けて対応

「人は考える葦である」

生成AIを活用した情報検索(情報収集)について、どのような意見をお持ちですか?

 

必要不可欠だが、「人は考える葦である」というスタンスと
試行錯誤で人の知識は鍛えられるというスタンスは必要

今後AIの進展に伴い利用するのは必須だが、
AIの無謬性と提供者の恣意的フィルターに対する批判的留意も必要

The Future Direction of Japan’s AI Development: The Search for a Third Path in the AI Era

In the twenty-first century, artificial intelligence has become more than a technological innovation. It is now deeply connected to political power, economic systems, social control, and even the future structure of human civilization. Today, the global AI race is led primarily by the United States and China, each representing very different approaches to technological development and governance. However, the growing dominance of these two models also raises an important question: Is a world shaped only by American and Chinese visions of AI truly desirable for humanity?

The United States has promoted AI development through intense market competition and private-sector innovation. American companies have produced many of the world’s most advanced AI systems by embracing risk-taking, massive investment, and rapid expansion. This model has generated extraordinary technological progress. At the same time, however, it has also created serious concerns, including excessive concentration of power in large technology corporations, information monopolies, growing economic inequality, and increasing influence of private platforms over democratic processes.

China has taken a different path by treating AI as a national strategic project closely connected to state authority and national development. Through centralized planning, large-scale data collection, and strong state coordination, China has rapidly expanded its AI capabilities. Yet this system also raises fears about mass surveillance, social scoring systems, restrictions on free expression, and AI-supported authoritarianism.

Compared to these two powers, Japan has often appeared to be behind in the AI revolution. Unlike the United States, Japan did not experience an extreme survival-based competition that forced rapid innovation. Unlike China, Japan did not pursue AI as an instrument of national expansion or centralized control. Japanese society has maintained relative social stability, public safety, and a strong middle-class identity. As a result, the sense of urgency surrounding AI development has been weaker.

Nevertheless, this apparent weakness may contain an important historical opportunity. The limitations and caution shown by Japan and Europe may become valuable strengths in the future. Europe has already taken a leading role in establishing legal and ethical frameworks to regulate AI and protect human rights. Japan, meanwhile, possesses unique social characteristics such as high social trust, implicit cooperation, and a culture of continuous improvement. In addition, Japanese society has experienced less extreme ideological polarization than many other countries.

These characteristics suggest that Japan could help create a “third model” of AI development—one that differs from both American corporate-driven capitalism and Chinese state-centered authoritarianism. Such a model would aim to balance innovation with ethics, efficiency with human dignity, and technological progress with democratic stability.

The existence of this third path is extremely important. If the future of AI is determined only by two superpowers, humanity may be forced to choose between corporate domination and technological authoritarianism. A third model can function as a safeguard for freedom, equality, and human-centered social progress. It can offer an alternative vision in which AI supports society without completely controlling it, and in which technology serves human beings rather than reducing them to data or economic resources.

Therefore, Japan should not simply attempt to imitate the American or Chinese systems. Instead, Japan should aim to become a mediator and stabilizing force in the AI era by developing technologies that respect human relationships, democratic values, and social harmony. In the coming decades, the most important competition may not be about which country possesses the most powerful AI, but about which civilization can create the most sustainable and humane model of coexistence between humans and intelligent machines.

In this sense, the role of Japan as a third pole in the AI age may become essential not only for its own future, but also for the future of global society itself.

An Inconvenient Truth :地方の定着支援事業とOECD (2025) Enhancing Rural Innovation in Japan

■ Topic

Enhancing Rural Innovation for Depopulation in rural Japan
--- the underlying right of women to choose not to marry or have children ---


■ Thesis

I think depopulation in rural Japan cannot be completely stopped.
However, the government should manage it wisely by concentrating resources in key areas and improving transportation systems.


■ Main Argument

First, population decline in Japan will continue for a long time.
Even if the birth rate increases from this year, it will take about 20 years for those children to enter the workforce.
So, it is realistic to assume that the population will keep decreasing.

Second, Japan has serious financial problems.
The government cannot support all rural areas equally.
Because of this, the idea of a “compact city” is important.

In urban areas, people and infrastructure should be concentrated to improve efficiency.
In rural areas, people should move to smaller regional centers instead of living in very remote places.
This can reduce the cost of maintaining roads, hospitals, and schools.

Third, I am a little skeptical about remote work as a solution.
Some people say remote work allows people to live anywhere.
However, many jobs still require face-to-face communication.

Also, high-speed transportation like the Shinkansen can create a “straw effect,” where people and resources are pulled toward big cities.
Because of this, it may be more realistic to support long-distance commuting rather than full relocation.


■ Counter-Argument

Some people argue that the government should invest more money in rural areas.
They believe that financial support and remote work can fully revive rural communities.


■ Rebuttal

However, I think this idea is too optimistic.
Because of limited financial resources, it is impossible to support every rural area equally.

Also, the straw effect of large cities is very strong.
Even if people move to rural areas, they may still depend on cities for work and services.

Therefore, instead of trying to stop depopulation completely,
the government should focus on managing it efficiently.

This means supporting compact cities, improving transportation, and helping people live between rural and urban areas.


■ Conclusion

In conclusion, depopulation in Japan is unavoidable in the short term.
The important thing is not to stop it completely, but to manage it in a smart way.

By concentrating resources, using compact city strategies, and improving transportation systems,
Japan can create a more sustainable society even with a smaller population.

 

Reference
This view is supported by OECD studies, which argue that population decline in rural areas is unavoidable and that governments should focus on managing shrinkage efficiently rather than attempting to reverse it.

「Ubuntu on Wayland」on NVIDIA

どうもupdateでまたもやGUIの動作がおかしくなって、マウスが使えなくなったので調査してみた。

24.04 LTS Ubuntuのnvidia-driver-595ではログインパスワード入力時に右下の歯車をクリックすると「Ubuntu on Wayland」があり、Waylandセッションでのログインが可能です。Waylandログインで動作不良は解決した模様だが、動画VLCソフトでは色のちらつきがやや感じられる。

Wayland