Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 112

Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 112

Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 116
FreeSandal | 輕。鬆。學。部落客 | 第 265 頁

勇闖新世界︰ W!o《卡夫卡村》變形祭︰圓局定向‧【補充一】

自然界裡的萬象並非都可以拿過來『實驗』的,所以『模擬』

Simulation is the imitation of the operation of a real-world process or system over time.[1] The act of simulating something first requires that a model be developed; this model represents the key characteristics or behaviors/functions of the selected physical or abstract system or process. The model represents the system itself, whereas the simulation represents the operation of the system over time.

Simulation is used in many contexts, such as simulation of technology for performance optimization, safety engineering, testing, training, education, and video games. Often, computer experiments are used to study simulation models. Simulation is also used with scientific modelling of natural systems or human systems to gain insight into their functioning.[2] Simulation can be used to show the eventual real effects of alternative conditions and courses of action. Simulation is also used when the real system cannot be engaged, because it may not be accessible, or it may be dangerous or unacceptable to engage, or it is being designed but not yet built, or it may simply not exist.[3]

Key issues in simulation include acquisition of valid source information about the relevant selection of key characteristics and behaviours, the use of simplifying approximations and assumptions within the simulation, and fidelity and validity of the simulation outcomes. ……

 

有時就成了唯一的選項了。其中又以『計算機模擬』

Computer simulation

A computer simulation is a simulation, run on a single computer, or a network of computers, to reproduce behavior of a system. The simulation uses an abstract model (a computer model, or a computational model) to simulate the system. Computer simulations have become a useful part of mathematical modeling of many natural systems in physics (computational physics), astrophysics, climatology, chemistry and biology, human systems in economics, psychology, social science, and engineering. Simulation of a system is represented as the running of the system’s model. It can be used to explore and gain new insights into new technology and to estimate the performance of systems too complex for analytical solutions.[1]

Computer simulations vary from computer programs that run a few minutes to network-based groups of computers running for hours to ongoing simulations that run for days. The scale of events being simulated by computer simulations has far exceeded anything possible (or perhaps even imaginable) using traditional paper-and-pencil mathematical modeling. Over 10 years ago, a desert-battle simulation of one force invading another involved the modeling of 66,239 tanks, trucks and other vehicles on simulated terrain around Kuwait, using multiple supercomputers in the DoD High Performance Computer Modernization Program[2] Other examples include a 1-billion-atom model of material deformation;[3] a 2.64-million-atom model of the complex maker of protein in all organisms, a ribosome, in 2005;[4] a complete simulation of the life cycle of Mycoplasma genitalium in 2012; and the Blue Brain project at EPFL (Switzerland), begun in May 2005 to create the first computer simulation of the entire human brain, right down to the molecular level.[5]

Because of the computational cost of simulation, computer experiments are used to perform inference such as uncertainty quantification.[6]

400px-Typhoon_Mawar_2005_computer_simulation_thumbnail

A 48 hour computer simulation of Typhoon Mawar using the Weather Research and Forecasting model

 

扮演的角色越來越重要。舉例而言『蒙地卡羅法』就是一種以機率統計理論為指南之通用且重要之數值計算方法。

Monte Carlo method

Monte Carlo methods vary, but tend to follow a particular pattern:

  1. Define a domain of possible inputs.
  2. Generate inputs randomly from a probability distribution over the domain.
  3. Perform a deterministic computation on the inputs.
  4. Aggregate the results.

For example, consider a circle inscribed in a unit square. Given that the circle and the square have a ratio of areas that is π/4, the value of π can be approximated using a Monte Carlo method:[6]

  1. Draw a square on the ground, then inscribe a circle within it.
  2. Uniformly scatter some objects of uniform size (grains of rice or sand) over the square.
  3. Count the number of objects inside the circle and the total number of objects.
  4. The ratio of the two counts is an estimate of the ratio of the two areas, which is π/4. Multiply the result by 4 to estimate π.

In this procedure the domain of inputs is the square that circumscribes our circle. We generate random inputs by scattering grains over the square then perform a computation on each input (test whether it falls within the circle). Finally, we aggregate the results to obtain our final result, the approximation of π.

There are two important points to consider here: Firstly, if the grains are not uniformly distributed, then our approximation will be poor. Secondly, there should be a large number of inputs. The approximation is generally poor if only a few grains are randomly dropped into the whole square. On average, the approximation improves as more grains are dropped.

Uses of Monte Carlo methods require large amounts of random numbers, and it was their use that spurred the development of pseudorandom number generators, which were far quicker to use than the tables of random numbers that had been previously used for statistical sampling.

 

220px-Pi_30KMonte Carlo method applied to approximating the value of π. After placing 30000 random points, the estimate for π is within 0.07% of the actual value. This happens with an approximate probability of 20%.

 

假使我們可以『模擬』熱點 AP 的 RSSI 讀取值,對定向『演算法』之實務將會有莫大的助益。就讓我們嘗試用『 scipy 』的程式庫製造類似的現象。由於我們不可能簡潔講解那麼大部頭的程式庫,此處只能列出幾個參考網址,請讀者自習的了︰

Numpy and Scipy Documentation

SciPy-數值計算庫

 

下面的程式範例,基本祇應用了一點點

【 scipy 程式庫用以產生自訂特定統計分佈基本類】

scipy.stats.rv_discrete

class scipy.stats.rv_discrete(a=0, b=inf, name=None, badvalue=None, moment_tol=1e-08, values=None, inc=1, longname=None, shapes=None, extradoc=None, seed=None)

A generic discrete random variable class meant for subclassing.

rv_discrete is a base class to construct specific distribution classes and instances for discrete random variables. It can also be used to construct an arbitrary distribution defined by a list of support points and corresponding probabilities.

Parameters:

a : float, optional

Lower bound of the support of the distribution, default: 0

b : float, optional

Upper bound of the support of the distribution, default: plus infinity

moment_tol : float, optional

The tolerance for the generic calculation of moments.

values : tuple of two array_like, optional

(xk, pk) where xk are integers with non-zero probabilities pk with sum(pk) = 1.

inc : integer, optional

Increment for the support of the distribution. Default is 1. (other values have not been tested)

badvalue : float, optional

The value in a result arrays that indicates a value that for which some argument restriction is violated, default is np.nan.

name : str, optional

The name of the instance. This string is used to construct the default example for distributions.

longname : str, optional

This string is used as part of the first line of the docstring returned when a subclass has no docstring of its own. Note: longname exists for backwards compatibility, do not use for new subclasses.

shapes : str, optional

The shape of the distribution. For example “m, n” for a distribution that takes two integers as the two shape arguments for all its methods If not provided, shape parameters will be inferred from the signatures of the private methods, _pmf and _cdf of the instance.

extradoc : str, optional

This string is used as the last part of the docstring returned when a subclass has no docstring of its own. Note: extradoc exists for backwards compatibility, do not use for new subclasses.

seed : None or int or numpy.random.RandomState instance, optional

This parameter defines the RandomState object to use for drawing random variates. If None, the global np.random state is used. If integer, it is used to seed the local RandomState instance. Default is None.

 

【參考程式】

pi@raspberrypi ~ $ python
Python 2.7.3 (default, Mar 18 2014, 05:13:23) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy import stats
>>> import numpy as np

# 給定統計分佈
>>> xk = np.arange(11)
>>> pk = (0.02, 0.03, 0.01, 0.06, 0.05, 0.1, 0.28, 0.22, 0.07, 0.13, 0.02)
>>> custm = stats.rv_discrete(name='custm', values=(xk, pk))

# 繪出給定之統計分佈
>>> import matplotlib.pyplot as plt
>>> fig, ax = plt.subplots(1, 1)
>>> ax.plot(xk, custm.pmf(xk), 'ro', ms=12, mec='r')
[<matplotlib.lines.Line2D object at 0x21c2e30>]
>>> ax.vlines(xk, 0, custm.pmf(xk), colors='r', lw=4)
<matplotlib.collections.LineCollection object at 0x24e5550>
>>> plt.show()

# 用給定之統計分佈,產生隨機現象
>>> R = custm.rvs(size=100)
>>> R
array([ 8,  6,  7,  6,  7,  6,  8,  9,  7,  7,  8,  7,  7,  7,  3,  9,  6,
        3,  6,  5,  8,  4,  6,  8,  6,  6,  1,  9,  6,  9,  7,  7,  5,  6,
        7,  6,  5,  5,  9,  6,  4,  3,  1,  9,  5,  6,  6, 10,  7,  0,  6,
        4,  6,  7,  7,  4,  7,  6,  0,  6,  8,  5,  6,  3,  7,  6,  9,  6,
        9,  6,  1,  9,  7,  9,  7,  5,  6,  3,  4,  7,  9,  2,  1,  4,  3,
        6,  7,  5,  5,  9,  6,  3,  5,  6,  6,  6,  6,  7,  7,  5])
>>> 

# 畫出所模擬之 RSSI 讀取值
>>> fig, ax = plt.subplots(1, 1)
>>> xi = np.arange(100)
>>> def funcR(x):
...     return pk[R[x]]
... 

>>> funcR(3)
0.28

>>> xi
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
       17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
       34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
       51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
       68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
       85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99])

>>> vi = [funcR(i) for i in R]
>>> vi
[0.22, 0.07, 0.13, 0.07, 0.13, 0.07, 0.22, 0.22, 0.13, 0.13, 0.22, 0.13, 0.13, 0.13, 0.28, 0.22, 0.07, 0.28, 0.07, 0.28, 0.22, 0.22, 0.07, 0.22, 0.07, 0.07, 0.28, 0.22, 0.07, 0.22, 0.13, 0.13, 0.28, 0.07, 0.13, 0.07, 0.28, 0.28, 0.22, 0.07, 0.22, 0.28, 0.28, 0.22, 0.28, 0.07, 0.07, 0.07, 0.13, 0.07, 0.07, 0.22, 0.07, 0.13, 0.13, 0.22, 0.13, 0.07, 0.07, 0.07, 0.22, 0.28, 0.07, 0.28, 0.13, 0.07, 0.22, 0.07, 0.22, 0.07, 0.28, 0.22, 0.13, 0.22, 0.13, 0.28, 0.07, 0.28, 0.22, 0.13, 0.22, 0.22, 0.28, 0.22, 0.28, 0.07, 0.13, 0.28, 0.28, 0.22, 0.07, 0.28, 0.28, 0.07, 0.07, 0.07, 0.07, 0.13, 0.13, 0.28]

>>> ax.plot(xi, vi, 'ro', ms=12, mec='r')
[<matplotlib.lines.Line2D object at 0x2705f10>]
>>> plt.show()

 

【機率分佈對照參考圖】

2015-09-02-110308_652x563_scrot

 

Histogram-of-signal-strength

 

【產生 RSSI 對照比較】

2015-09-02-112821_1918x563_scrot

 

horst-history_1

 

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰ ○ 局 □ 陣【☵】

方將剛起步,就感覺脖子被掛上個什麼東西?低頭一看,彷彿是張卡片,耳邊響起 W!o 的聲音,說道︰這是『邀請護照』,無照亂走 ,小心一會就被逮了。一時錯愕,怎麼『神遊』也能被逮了! W!o 接著說︰你不要以為這只是個『洞徑』而已,事實上這裡是出入《卡夫卡村》之『保安關卡』。古來就有多處暗巷密室,由於陽光進不來這裡,傳聞昔日壁上都用油燈照明。現今可不一樣了,發光可撓性薄膜顯示器、攝像鏡頭、軟 X 光透視、頻譜分析儀、…布滿整個通道,甚至還有『神遊者』感知器的哩。不禁問到︰這真的是可能的嗎?只聽 W!o 自顧自的說︰詳情我也不知。然而凡能『感知者』就可能『被感知』;宛如牛頓力學之凡有『作用』通常都會有『反作用』一般。如果從數學的角度看『萬象模型』,大體總落入『如何計算』罷了。你既是能來,它又豈不能測的呢?雖然講的像這麼回事,終究是匪夷所思的耶!!只不過,假使問已知的『科學原理』是什麼?當下的『工藝技術』依賴著什麼?果真要用『數理邏輯』觀點來看,若說不是『 □○ 計算』又是什麼呢??……

當面對『奧秘』,單靠『好奇心』是不夠的。問題是該打哪講起的哩?不得已遁之以『君子務本』的啊!先行介紹『派生科學』軟件集成的吧!!

 

SciPy (pronounced “Sigh Pie”) is a Python-based ecosystem of open-source software for mathematics, science, and engineering. In particular, these are some of the core packages:

 

目前官方版 raspbian 的『 scipy 』是 0.10.1 ,或許這是個開始處,

pi@raspberrypi ~ apt-cache search scipy mayavi2 - scientific visualization package for 2-D and 3-D data python-guiqwt - efficient 2D data-plotting library python-scipy - scientific tools for Python python-scipy-dbg - scientific tools for Python - debugging symbols python-sciscipy - Python binding of Scilab python3-scipy - scientific tools for Python 3 python3-scipy-dbg - scientific tools for Python 3 - debugging symbols stimfit - A program for viewing and analyzing electrophysiological data stimfit-dbg - Debug symbols for stimfit  # scipy 版本 pi@raspberrypi ~ apt-cache show python-scipy
Package: python-scipy
Version: 0.10.1+dfsg2-1
Architecture: armhf
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Installed-Size: 31947
Depends: python-numpy (>= 1:1.6.1), python-numpy-abi9, python2.7 | python2.6, python (>= 2.6.6-7~), python (<< 2.8), libamd2.2.0 (>= 1:3.4.0), libblas3 | libblas.so.3 | libatlas3-base, libc6 (>= 2.13-28), libgcc1 (>= 1:4.4.0), libgfortran3 (>= 4.6), liblapack3 | liblapack.so.3 | libatlas3-base, libstdc++6 (>= 4.4.0), libumfpack5.4.0 (>= 1:3.4.0)
Recommends: g++ | c++-compiler, python-dev, python-imaging
Suggests: python-profiler
Provides: python2.6-scipy, python2.7-scipy
Homepage: http://www.scipy.org/
Priority: extra
Section: python
Filename: pool/main/p/python-scipy/python-scipy_0.10.1+dfsg2-1_armhf.deb
Size: 10293878
SHA256: 2fc2ade74630169b8b5e6bc602ee65b02a0df95d1341d7366d8c4801637df345
SHA1: 02de2d5f0037c776c13a244f2c7e63e8d0a7fd3c
MD5sum: 14d140b574f8409b44e9b1402cb62882
Description: scientific tools for Python
 SciPy supplements the popular NumPy module (python-numpy package), gathering a
 variety of high level science and engineering modules together as a single
 package.
 .
 SciPy is a set of Open Source scientific and numeric tools for Python. It
 currently supports special functions, integration, ordinary differential
 equation (ODE) solvers, gradient optimization, genetic algorithms, parallel
 programming tools, an expression-to-C++ compiler for fast execution, and
 others.

 

當然最好『驗證』那選擇的『安裝』,

# scipy 以及相關軟體安裝
pi@raspberrypi ~ sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose  # scipy 自我測試 pi@raspberrypi ~ python
Python 2.7.3 (default, Mar 18 2014, 05:13:23) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> scipy.test()
Running unit tests for scipy
NumPy version 1.6.2
NumPy is installed in /usr/lib/pymodules/python2.7/numpy
SciPy version 0.10.1
SciPy is installed in /usr/lib/python2.7/dist-packages/scipy
Python version 2.7.3 (default, Mar 18 2014, 05:13:23) [GCC 4.6.3]
nose version 1.1.2
..........................................................................K..K..................................................................................................................................................................................................................................................................................../usr/lib/python2.7/dist-packages/scipy/io/wavfile.py:31: WavFileWarning: Unfamiliar format bytes
  warnings.warn("Unfamiliar format bytes", WavFileWarning)
/usr/lib/python2.7/dist-packages/scipy/io/wavfile.py:121: WavFileWarning: chunk not understood
  warnings.warn("chunk not understood", WavFileWarning)
.................................................................................................................................................................................................................SSSSSS......SSSSSS...................................................................................................................................................................................................................................................................K........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................./usr/lib/python2.7/dist-packages/scipy/sparse/linalg/eigen/arpack/arpack.py:63: UserWarning: Single-precision types in `eigs` and `eighs` are not supported currently. Double precision routines are used instead.
  warnings.warn("Single-precision types in `eigs` and `eighs` "
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K...............................................................K...........................................................................................................................................................KK................................................................................................................................................................................................................................................................K.K.................................................................................................................................................................................../usr/lib/python2.7/dist-packages/scipy/special/tests/test_basic.py:824: RuntimeWarning: invalid value encountered in ellipj
  special.ellipj(0.5, np.nan)
..........................................................................................................................................................................................................K........K........................................................../usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:6457: RuntimeWarning: invalid value encountered in greater_equal
  return where(temp >= q, vals1, vals)
.............................................................................................../usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:6739: RuntimeWarning: invalid value encountered in greater_equal
  return where((temp >= q), vals1, vals)
......................S................................................................................................................................................................................................../usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:1255: RuntimeWarning: invalid value encountered in greater_equal
  cond1 = (scale > 0) & (x >= self.a) & (x <= self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:1255: RuntimeWarning: invalid value encountered in less_equal
  cond1 = (scale > 0) & (x >= self.a) & (x <= self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:1297: RuntimeWarning: invalid value encountered in greater_equal
  cond1 = (scale > 0) & (x >= self.a) & (x <= self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:1297: RuntimeWarning: invalid value encountered in less_equal
  cond1 = (scale > 0) & (x >= self.a) & (x <= self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:1507: RuntimeWarning: invalid value encountered in greater
  cond1 = (q > 0) & (q < 1)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:1507: RuntimeWarning: invalid value encountered in less
  cond1 = (q > 0) & (q < 1)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:1548: RuntimeWarning: invalid value encountered in greater
  cond1 = (q > 0) & (q < 1)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:1548: RuntimeWarning: invalid value encountered in less
  cond1 = (q > 0) & (q < 1)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5935: RuntimeWarning: invalid value encountered in greater_equal
  cond1 = (k >= self.a) & (k < self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5935: RuntimeWarning: invalid value encountered in less
  cond1 = (k >= self.a) & (k < self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5936: RuntimeWarning: invalid value encountered in greater_equal
  cond2 = (k >= self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5895: RuntimeWarning: invalid value encountered in greater_equal
  cond1 = (k >= self.a) & (k < self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5895: RuntimeWarning: invalid value encountered in less
  cond1 = (k >= self.a) & (k < self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5896: RuntimeWarning: invalid value encountered in greater_equal
  cond2 = (k >= self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:6015: RuntimeWarning: invalid value encountered in greater_equal
  cond1 = (k >= self.a) & (k <= self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:6015: RuntimeWarning: invalid value encountered in less_equal
  cond1 = (k >= self.a) & (k <= self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:6016: RuntimeWarning: invalid value encountered in less
  cond2 = (k < self.a) & cond0
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5976: RuntimeWarning: invalid value encountered in greater_equal
  cond1 = (k >= self.a) & (k <= self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5976: RuntimeWarning: invalid value encountered in less_equal
  cond1 = (k >= self.a) & (k <= self.b)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5977: RuntimeWarning: invalid value encountered in less
  cond2 = (k < self.a) & cond0
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5820: RuntimeWarning: invalid value encountered in greater_equal
  cond1 = (k >= self.a) & (k <= self.b) & self._nonzero(k,*args)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5820: RuntimeWarning: invalid value encountered in less_equal
  cond1 = (k >= self.a) & (k <= self.b) & self._nonzero(k,*args)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5857: RuntimeWarning: invalid value encountered in greater_equal
  cond1 = (k >= self.a) & (k <= self.b) & self._nonzero(k,*args)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:5857: RuntimeWarning: invalid value encountered in less_equal
  cond1 = (k >= self.a) & (k <= self.b) & self._nonzero(k,*args)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:6056: RuntimeWarning: invalid value encountered in greater
  cond1 = (q > 0) & (q < 1)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:6056: RuntimeWarning: invalid value encountered in less
  cond1 = (q > 0) & (q < 1)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:6098: RuntimeWarning: invalid value encountered in greater
  cond1 = (q > 0) & (q < 1)
/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py:6098: RuntimeWarning: invalid value encountered in less
  cond1 = (q > 0) & (q < 1)
............................................................................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 4266 tests in 253.540s

OK (KNOWNFAIL=11, SKIP=13)
<nose.result.TextTestResult run=4266 errors=0 failures=0>
>>> 

 

有興趣嚐鮮的,也可試著直奔『 scipy 』 0.16.0 最新版

sudo pip install scipy
sudo apt-get install python-matplotlib
sudo apt-get install python-nose

 

一舉打開『科學計算』之門乎?!

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰ ○ 局 □ 陣【☯】

雖說最好一事畢後,再起一事。然而行文筆法,總得依著故事情節以及節奏,就讓我們暫將 RSSI 定向器放下,隨著 W!o^{+} 的腳步繼續趕路吧。

一時只覺或前行、或右迴旋、或左迴旋、九彎十八拐的向著出口走 。突然狂風呼嘯,沙塵滾滾橫亙眼前不遠處。這時感覺 W!o 放慢了步伐,說道︰出口快到,恰遇『無常風』,需要等風沙退後,方可急度『不歸路』,穿越『無影牆』入谷。一段嗚哩哇啦的聲音,盡講些『聽譕』的字詞。或許 W!o 早料著了,接著又講︰出口林子外接著東西向的過道,兩頭皆通大海,若是俯瞰形狀像個『沙漏』。此處最窄,風沙極強,直能將人吹落幾里外的海中。而且東西林徑交接處有兩座『石敢當』,西邊的刻著『 疾 風 』,東邊之上有『 勁 草 』。由於在地原鄉人不識古文,因傷人害命之故,將之稱之為『不歸路』。後來 M♪o 帶著學生在此作『科研調查』時,始解讀了西邊刻的是『疾風』,東邊上的為『勁草』。而且這裡的『徑邊草』,貌似『菰』

 

不死草

 

卻秋生春死,又嚐之酸苦,不類茭白。雖說《 典 》典裡有︰

《十洲記》:「上有不死之草,草形如菰,苗長三四尺,人已死三日者,以草覆之皆當時活也。服之令人長生。昔秦始皇大苑中,多枉死者橫道,有鳥如烏狀,銜此草覆死人面,當時起坐而自活也。有司聞奏,始皇遣使者齎草以問北郭鬼谷先生。鬼谷先生云:「臣嘗聞東海祖洲上有不死之草,生玉田中,或名為養神芝。其葉似菰 ,苗叢生,一株可活一人。」始皇於是慨然言曰,可採得否?乃使使者徐福,發童男童女五百人,率攝樓船等入海尋祖洲,遂不返。 」

,此草卻無不死之效,難道果有名叫『勁草』之草的耶?後來也許 M♪o 也自覺好笑,既是『生生』,既已『生生』,誰又該管那誰知誰不知曉的呢?不知是因設想那當年之人選址植栽,真有『憂患』乎之思,還是對目下之境『傷感』之意,隨筆也記下了︰

天若有情,天亦老,

北宋‧晏幾道 《鷓鴣天》

其一

彩袖殷勤捧玉鐘。當年拚卻醉顏紅。

舞低楊柳樓心月,歌盡桃花扇底風。

從別后,憶相逢。幾回魂夢與君同。

今宵剩把銀釭照,猶恐相逢是夢中。

 

其二

醉拍春衫惜舊香。天將離恨惱疏狂。

年年陌上生秋草,日日樓中到夕陽。

云渺渺,水茫茫。征人歸路許多長。

相思本是無憑語,莫向花箋費淚行!

疾風知勁草。

 

後有好事者得知此事,設法取得 M♪o  筆記抄本將之公開,從此此路有了個大名叫『真情小徑』,當真『疾風配勁草』的哩!!

又說到︰經過多年的『觀測』,『數據』之累積,大體已有了疾風的『模型』,雖說預測的『準確性』還不夠高,……只覺手被 W!o 拉著往前跑,直向山壁撞去,祇覺大喊一聲︰小心!已入谷中。…彷彿那『但就過徑入谷也足夠了也。』聲音正迴盪。轉眼卻不見了 W!o ,待回過神來,探頭出谷外望,『圓局』在面前。細瞧多次之後,出谷入谷觀察多遍,原來『無影牆』是『錯覺』的啊!腦海中浮現了

隐藏在树林中的隐形建筑,立体视错觉模型

隱形谷倉

 

一篇網文。這《卡夫卡村》地理果然是有些奇妙,古哩古怪的耶!既一時尋不着了 W!o ,也只能順著『洞徑』獨自向前行的了!!

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰圓局定向‧六

如果換個觀點重讀《樹莓一月記;》文本片段︰

green-raspberry

red-raspberry

golden-raspberry

White raspberry flowers

black-raspberry

五官 ── ── 從,各有『』與『』。有的人『不聽講』自己看書『看不懂』;又有人『一目十行』,可以『既讀即解』;還有的人非得『親為』否則『不解』。難道說『』與『』就果真或與『讀書無緣』?俗話說︰『氣味相投』自然朋比;『把酒飛斝』無非道友。學習的過程中,如果有志同道合的『朋友』,彼此切磋琢磨,想必更能日行千里,事半功倍吧!!

莊子講『庖丁解牛』的故事,講到庖丁功夫之深厚,竟然能讓『解牛不知其死,真真的是出神入化的好勒!!科學教育的重要性在於求『』,然而需要了解的是,世界有『價值』的不只是『』而已,也許說還有著『』與『』吧。曾經有一位西方哲人說道︰所謂『』就是把『』的事,用『』得方式呈現;古時或有另一位東方覺者談起︰大、大、亦大 ──

佚名詩

大地藏無盡,

勤勞資有生;

念哉斯意厚,

努力事春耕。

──,
大人者不失其『赤子之心』。

科學的方法在於『實驗』,不斷驗證『人以為知』之事,而這個 方法要求『人人都能』與『時時都可』,是嚴格的『事實』立論的基石,故可以說是強調『他証性』;然而人世間『經驗』的廣褒,自有『如人飲水』『自証』之,與『朋比道友』『互証』之

 

那『眼、耳、鼻、舌、身』與相對的『色、聲、香、味、觸』具有什麼樣的『關係』呢?所謂『自證』、『互證』和『他證』之『證』如何論述『異同』??假使說︰存在即感知。又是否該補上『意』 ── 意識 ── 以及『法』 ──事理 ── 的耶!何不從體驗『自我感知』來了解『感知』到底是什麼呢?畢竟一個具足『內省反思』能力的人,還是已知之最佳『真相感測器』的哩!!

要是有人看圖看到忘其所見,

Histogram-of-signal-strength

horst-history_1

 

突然間,一個轉念,想到『固定位置』‧『最大訊號』,也許發生『啊哈』 AHHA 現象。這樣的人是否會立即動手『驗證』

figure9

的呢?古今中外的歷史顯示,多數的人並非不曾『有創見』,通常總與『發現』失之交臂,只因『待明日』使然。然而『發明者』的熱情是無法『待明日』的!那一種『立馬作』精神,所以才造就了『發明者』也!事實上,或許『假設』尚未被『驗證』,『峰端』 peak 『演算法』也都還沒寫出來,那人的『心思』可能已經跑到能怎麼『應用』上去了!!若說人之『異同』?大哉問也耶??

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰圓局定向‧五

若是仔細觀察『地壘』之 Signal/Noise/History 圖

horst-history_1

 

當可知道即使在『固定』位置,所測得的『 RSSI 』也像是『隨機』的勒!?一張典型 RF 發射系統圖,也許足以說明這個『不確定性』的由來︰

 

RF_TX

 

或許另一張實測圖︰

Histogram-of-signal-strength

引自《 Indoor Localization using Multiple Wireless Technologies 》論文

 

更能清楚了解那些數值的『機率分佈』。如此我們當知 RSSI 的數據必須經過『處理』,方能代表某種『 金文尺 』尺度,而且還得『校正 』才能表達『□□』的吧!那個『數據』的『時間序列』本身

X_{t_1}, \ X_{t_2}, \ X_{t_3}, \ \cdots , \ X_{t_n}, \ \cdots

宛如起伏之波瀾,正待適當『模型』的詮釋哩!!

如是看來這麼個『簡單定向器』也『不簡單』的耶?那麼我們將要如何用這根 RSSI 『尺』的呢?又怎樣能夠得到下面的圖的呢??

 

figure9

 

俗話說︰有煙 必有火,無風不起浪。是否『煙』可以作『火』的『指標』?『浪』一定是『風』引起的呢??相繼的現象,伴隨的關係常為『徵候』的由來,卻未必有『物理因 果』性。雖說大多數物質『熱脹冷縮』,水結冰、冰化水,卻是『冷漲熱縮』!更別講此一現象對水中生物之生存重要性的哩!!所以當我們談到度量的『 金文尺 』尺,就必須注意『現象』的『重複性』、『再現性』……『可靠性』的概念區分。此處引用維基百科相關詞條︰

Repeatability

Repeatability or test–retest reliability[1] is the variation in measurements taken by a single person or instrument on the same item, under the same conditions, and in a short period of time. A less-than-perfect test–retest reliability causes test–retest variability. Such variability can be caused by, for example, intra-individual variability and intra-observer variability. A measurement may be said to be repeatable when this variation is smaller than a pre-determined acceptance criteria.

Test–retest variability is practically used, for example, in medical monitoring of conditions. In these situations, there is often a predetermined “critical difference”, and for differences in monitored values that are smaller than this critical difference, the possibility of pre-test variability as a sole cause of the difference may be considered in addition to, for examples, changes in diseases or treatments.[2]

───

Reproducibility

Reproducibility is the ability of an entire experiment or study to be duplicated, either by the same researcher or by someone else working independently. Reproducing an experiment is called replicating it. Reproducibility is one of the main principles of the scientific method.

The values obtained from distinct experimental trials are said to be commensurate if they are obtained according to the same reproducible experimental description and procedure. The basic idea can be seen in Aristotle‘s dictum that there is no scientific knowledge of the individual, where the word used for individual in Greek had the connotation of the idiosyncratic, or wholly isolated occurrence. Thus all knowledge, all science, necessarily involves the formation of general concepts and the invocation of their corresponding symbols in language (cf. Turner). Aristotle′s conception about the knowledge of the individual being considered unscientific is due to lack of the field of statistics in his time, so he could not appeal to statistical averaging by the individual.

A particular experimentally obtained value is said to be reproducible if there is a high degree of agreement between measurements or observations conducted on replicate specimens in different locations by different people—that is, if the experimental value is found to have a high precision.[1]

───

Reliability

In the psychometrics, reliability is the overall consistency of a measure. A measure is said to have a high reliability if it produces similar results under consistent conditions. For example, measurements of people’s height and weight are often extremely reliable.[1][2]

Types

There are several general classes of reliability estimates:

  • Inter-rater reliability assesses the degree of agreement between two or more raters in their appraisals.
  • Test-retest reliability assesses the degree to which test scores are consistent from one test administration to the next. Measurements are gathered from a single rater who uses the same methods or instruments and the same testing conditions.[2] This includes intra-rater reliability.
  • Inter-method reliability assesses the degree to which test scores are consistent when there is a variation in the methods or instruments used. This allows inter-rater reliability to be ruled out. When dealing with forms, it may be termed parallel-forms reliability.[3]
  • Internal consistency reliability, assesses the consistency of results across items within a test.[3]

───

方便讀者對比意義的差別,或將發現建立 RSSI 『尺度』之法的耶 !?

 

 

 

 

 

 

 

 

 

輕。鬆。學。部落客