# Python code to Rescale data (between 0 and 1)importpandasimportscipyimportnumpyfromsklearn.preprocessingimportMinMaxScalerurl="https://archive.ics.uci.edu/ml/machine-learning-databases/pima-indians-diabetes/pima-indians-diabetes.data"# 指定一個網址names=['preg','plas','pres','skin','test','mass','pedi','age','class']# 指定每個變數嘅名dataframe=pandas.read_csv(url,names=names)# 由網址嗰度攞數據。array=dataframe.values# 將數據擺入去屬於個程式一個 array 嗰度。X=array[:,0:8]# X 呢個 array 包含咗用嚟做預測嘅變數。Y=array[:,8]# Y 呢個 array 包含咗要預測嘅變數。# 將 X 入面嘅數字重新縮放。scaler=MinMaxScaler(feature_range=(0,1))rescaledX=scaler.fit_transform(X)# 將做完縮放嘅嗰柞數據 show 出嚟睇。numpy.set_printoptions(precision=3)print(rescaledX[0:5,:])# 跟住打後嘅碼就會開始做學習過程。
迴歸分析[e 7]係統計模型上嘅一類技術,用嚟預測兩個或者以上唔同變數之間嘅關係[20]:喺統計學上,研究者好多時會想用一個變數嘅數值嚟預測第啲變數嘅數值;喺最簡單嗰種情況下,個統計模型會涉及兩個連續嘅變數,當中一個係自變數(IV),而另一個就係應變數(DV),而個研究者會用個 IV 嘅數值嚟預測個 DV 嘅數值;對個研究者嚟講,一個可能嘅做法係搜集啲數據返嚟,用啲數據做迴歸分析,整個模型(即係畫條線)出嚟,個模型就能夠幫佢預測「當 IV 係呢個數值嗰陣,假設第啲因素不變,個 DV 嘅數值會傾向係幾多」[21][22]。迴歸模型有以下呢啲[23]:
(線性迴歸);
(多項式迴歸);
... 等等。
原則上,如果有個方法可以搵出 同埋 等參數嘅數值,就可以靠條式大致上用 IV 嘅值估計 DV 嘅值,而機械學習可以用一個迴歸模型做佢嘅數學模型,例如係以下呢段碼噉,做嘅嘢就係(攞到數據同做完啲事前處理之後)建立一個參數值係隨機設嘅線性迴歸模型,再按柞數據入面啲個案慢慢噉調較個模型[20]。
喺演算法上,一個最簡單嘅監督式學習神經網絡同一個用迴歸模型嘅機械學習演算法一個板,分別只係在於 y 同 x 之間嗰條式唔同咗。喺一個人工神經網絡嘅程式當中,會有若干粒細胞做輸出值,若干粒細胞做輸入值,每粒輸出層細胞嘅啟動程度會係佢之前嗰層細胞嘅啟動程度嘅函數,如此類推。喺程式編寫上,呢啲咁多嘅權重值同啟動值可以用矩陣輕易噉儲住。好似係以下呢段虛擬碼噉[27]:
X=[0,...];# 個 IV 層,呢個係一個 array(陣列)。...Y=A_1*H_1;# 輸出 Y 嘅啟動程度係之前嗰層嘅啟動程度嘅函數,當中 Y 同 H_1 係 array,而 A_1 係一個矩陣。H_1=A_2*H_2# 如此類推如此類推H_2=A_3*X# 隨機噉設啲權重嘅數值,噉做會整出一個唔準嘅迴歸模型。A_1=random(0,1);A_2=random(0,1);A_3=random(0,1);...
個設計者寫好程式之後,可以(例如)走去搵一大柞有關呢幾個變數之間嘅關係嘅數據俾個程式睇,跟住叫個程式用呢啲過往嘅數據,計出變數同變數之間嘅關係係點,而個程式就可以攞嚟預測未來[36]。貝葉斯式嘅人工智能有相當廣泛嘅用途,例如Xbox Live 噉,佢哋幫網上遊戲玩家搵比賽加入嗰陣,就會用到考慮嗰個玩家嘅贏率嘅貝葉斯網絡[38],並且寫個演算法搵出令到呢個機會率最接近 50% 嘅分隊法(即係盡可能令場比賽勢均力敵,一般認為勢均力敵嘅比賽會好玩啲)[38]。
支援向量機[e 14]係一類機械學習上會用嘅數學模型,用嚟做分類,多數係監督式學習之下先會用嘅。當一個支援向量機接到收有關一柞個案嘅數據嗰陣時,會將每個個案分類做兩個(事先指定咗嘅)類別嘅其中一個。例如係下圖入面噉,黑點同白點係兩類唔同嘅個案,每個個案喺 X 軸同 Y 軸呢個變數上有個數值,H1 呢條線唔能夠將個案清楚噉分類,H2 叫勉強做到分類,而 H3 就能夠清楚噉將個案分做兩類,係最理想嗰條線-而用多個兩個變數做分類嘅支援向量機可以按同一道理想像[39][40]。
非監督式學習最常見嘅用途係攞嚟做聚類分析。譬如話,家吓有個生態學家想研究吓一柵區域入面嗰啲樹傾向於聚集喺乜嘢位置,佢可以坐直昇機或者用人造衛星影啲相返嚟,再記錄嗮嗰柵區域入面每樖樹生喺邊個位(呢個過程會嘥唔少時間),噉樣得出一個數據庫,之記錄嗮每樖樹喺 X 軸同 Y 軸嗰度嘅坐標。跟手佢就可能會想睇吓:啲樹會唔會傾向於聚集喺個區域入面嘅某啲特定位置(呢啲資訊可能有助佢保育一啲靠樹生存嘅動物)。如果相對嚟講有某一柞、啲樹彼此之間距離近、又同佢哋以外嘅樹距離遠,噉就可以話佢係「聚埋一羣」。而聚類分析就正係用嚟分析一柞個案入面會唔會有幾羣個體係「彼此之間距離近,同羣以外啲個體距離遠」嘅[49][50]。
有一個已知嘅數學模型產生數據;# 例:# x = rand(100,1) (x 係一個向量,包含 100 個隨機產生嘅數字)# y = rand(100,1) (set y 做 100 個數字嘅隨機向量先)# for ii < 100 (for 每個 y 入面嘅數值,將嗰個數值設做 x 嘅相應數值嘅兩倍;y = x * 2 就係個已知嘅數學模型)# y(ii) = x(ii) * 2# ii = ii + 1用x同y做數據嘅輸入同輸出,將一個監督式學習嘅ML演算法行一次;最後個程式應該會有個由學習產生嘅數學模型,將個數學模型同個已知嘅數學模型比較;如果學習產生嘅數學模型同個已知數學模型相近,表示個演算法能夠有效噉做學習。# 然後研究者可以比較吓唔同演算法邊個最能夠準確噉學到個真嘅數學模型。
↑The definition "without being explicitly programmed" is often attributed to Arthur Samuel, who coined the term "machine learning" in 1959, but the phrase is not found verbatim in this publication, and may be a paraphrase that appeared later. Confer "Paraphrasing Arthur Samuel (1959), the question is: How can computers learn to solve problems without being explicitly programmed?" in Koza, John R.; Bennett, Forrest H.; Andre, David; Keane, Martin A. (1996). Automated Design of Both the Topology and Sizing of Analog Electrical Circuits Using Genetic Programming.Artificial Intelligence in Design '96. Springer, Dordrecht. pp. 151–170.
↑3.03.13.23.3Bishop, C. M. (2006),Pattern Recognition and Machine Learning, Springer.
↑Kononenko, I. (2001). Machine learning for medical diagnosis: history, state of the art and perspective.Artificial Intelligence in medicine, 23(1), 89-109.
↑Heaton, J. B., Polson, N. G., & Witte, J. H. (2017). Deep learning for finance: deep portfolios.Applied Stochastic Models in Business and Industry, 33(1), 3-12.
↑Ling, C. X., & Li, C. (1998, August).Data mining for direct marketing: Problems and solutions. In Kdd (Vol. 98, pp. 73-79).
↑8.08.18.2Friedman, Jerome H. (1998). "Data Mining and Statistics: What's the connection?".Computing Science and Statistics. 29 (1): 3-9.
↑Samuel, Arthur (1959). "Some Studies in Machine Learning Using the Game of Checkers".IBM Journal of Research and Development. 3 (3): 210-229.
↑10.010.1Mitchell, T. (1997).Machine Learning. McGraw Hill. p. 2,英文原文:"A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P if its performance at tasks in T, as measured by P, improves with experience E."
↑11.011.1Harnad, S. (2006). The annotation game: On Turing (1950) on computing, machinery, and intelligence. InThe Turing test sourcebook: philosophical and methodological issues in the quest for the thinking computer. Kluwer.
↑Vidyasagar, M. (2002).A theory of learning and generalization. Springer-Verlag.
↑14.014.1Mohri, Mehryar; Rostamizadeh, Afshin; Talwalkar, Ameet (2012).Foundations of Machine Learning. USA, Massachusetts: MIT Press.
↑Angluin, D. 1992. Computational learning theory: Survey and selected bibliography. InProceedings of the Twenty-Fourth Annual ACM Symposium on Theory of Computing (May 1992), pages 351–369.
↑Seber, G. A., & Lee, A. J. (2012).Linear regression analysis (Vol. 329). John Wiley & Sons.
↑YangJing Long (2009). "Human age estimation by metric learning for regression problems".Proc. International Conference on Computer Analysis of Images and Patterns: 74–82.
↑Gardner, M. W., & Dorling, S. R. (1998). Artificial neural networks (the multilayer perceptron)—a review of applications in the atmospheric sciences.Atmospheric environment, 32(14-15), 2627-2636.
↑Russell, Stuart J.; Norvig, Peter (2010).Artificial Intelligence A Modern Approach. Prentice Hall. p. 578.
↑28.028.1Honglak Lee, Roger Grosse, Rajesh Ranganath, Andrew Y. Ng. "Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hierarchical Representations"Proceedings of the 26th Annual International Conference on Machine Learning, 2009.
Luger & Stubblefield 2004, pp. ~182–190, ≈363–379,
Nilsson 1998, chpt. 19.3–4.
↑38.038.1Delalleau, O., Contal, E., Thibodeau-Laufer, E., Ferrari, R. C., Bengio, Y., & Zhang, F. (2012). Beyond skill rating: Advanced matchmaking in ghost recon online.IEEE Transactions on Computational Intelligence and AI in Games, 4(3), 167-177.
↑39.039.1Cortes, Corinna; Vapnik, Vladimir N. (1995). "Support-vector networks".Machine Learning. 20 (3): 273–297.
↑Ben-Hur, Asa; Horn, David; Siegelmann, Hava; and Vapnik, Vladimir N.; "Support vector clustering"; (2001);Journal of Machine Learning Research, 2: 125–137.
↑41.041.1Ojha, Varun Kumar; Abraham, Ajith; Snášel, Václav (2017-04-01). "Metaheuristic design of feedforward neural networks: A review of two decades of research".Engineering Applications of Artificial Intelligence. 60: 97–116.
↑Ting Qin, et al. "A learning algorithm of CMAC based on RLS."Neural Processing Letters 19.1 (2004): 49–61.
↑M.R. Smith and T. Martinez (2011). "Improving Classification Accuracy by Identifying and Removing Instances that Should Be Misclassified".Proceedings of International Joint Conference on Neural Networks (IJCNN 2011). pp. 2690–2697.
↑Looney, C. G. (1997).Pattern recognition using neural networks: theory and algorithms for engineers and scientists (pp. 171-172). New York: Oxford University Press.
↑Menéndez, L. Á., de Cos Juez, F. J., Lasheras, F. S., & Riesgo, J. Á. (2010). Artificial neural networks applied to cancer detection in a breast screening programme.Mathematical and Computer Modelling, 52(7-8), 983-991.
↑Milani, C., & Jadavji, N. M. (2017). Solving cancer: The use of artificial neural networks in cancer diagnosis and treatment.Journal of Young Investigators, 33(4).
↑Jordan, Michael I.; Bishop, Christopher M. (2004). "Neural Networks". In Allen B. Tucker (ed.).Computer Science Handbook, Second Edition (Section VII: Intelligent Systems). Boca Raton, Florida: Chapman & Hall/CRC Press LLC.
↑Dostál, P., & Pokorný, P. (2009). Cluster analysis and neural network. In17th Annual Conference Proceedings on Technical Computing Prague (pp. 131-57).
↑Dominic, S.; Das, R.; Whitley, D.; Anderson, C. (July 1991). "Genetic reinforcement learning for neural networks".IJCNN-91-Seattle International Joint Conference on Neural Networks. Seattle, Washington, USA: IEEE.
↑Hoskins, J.C.; Himmelblau, D.M. (1992). "Process control via artificial neural networks and reinforcement learning".Computers & Chemical Engineering. 16 (4): 241–251.
↑Bertsekas, D.P.; Tsitsiklis, J.N. (1996). Neuro-dynamic programming.Athena Scientific. p. 512.
↑Miller, W. T., Werbos, P. J., & Sutton, R. S. (Eds.). (1995).Neural networks for control. MIT press.
↑Goldberg, David E.; Holland, John H. (1988). "Genetic algorithms and machine learning".Machine Learning. 3 (2): 95-99.
↑Michie, D.; Spiegelhalter, D. J.; Taylor, C. C. (1994). "Machine Learning, Neural and Statistical Classification". Ellis Horwood Series in Artificial Intelligence.
↑62.062.1Kohavi, Ron (1995). "A Study of Cross-Validation and Bootstrap for Accuracy Estimation and Model Selection".International Joint Conference on Artificial Intelligence.
↑Rodriguez, J. D., Perez, A., & Lozano, J. A. (2009). Sensitivity analysis of k-fold cross validation in prediction error estimation.IEEE transactions on pattern analysis and machine intelligence, 32(3), 569-575.
↑Provost, Foster; Fawcett, Tom (2013).Data science for business: what you need to know about data mining and data-analytic thinking (1. ed., 2. release ed.). Beijing Köln: O'Reilly.
↑Ting, Kai Ming (2011). Sammut, Claude; Webb, Geoffrey I. (eds.).Encyclopedia of machine learning. Springer.
↑Altman DG, Bland JM (June 1994). "Diagnostic tests. 1: Sensitivity and specificity".BMJ. 308 (6943): 1552.
↑Pontius, Robert Gilmore; Si, Kangping (2014). "The total operating characteristic to measure diagnostic ability for multiple thresholds".International Journal of Geographical Information Science. 28 (3): 570-583.
↑Killourhy, K. S., & Maxion, R. A. (2009, June). Comparing anomaly-detection algorithms for keystroke dynamics. In 2009 IEEE/IFIP International Conference on Dependable Systems & Networks (pp. 125-134).IEEE.
↑Zimek, Arthur; Schubert, Erich (2017), "Outlier Detection",Encyclopedia of Database Systems, Springer New York, pp. 1–5.
↑74.074.1Hodge, V. J.; Austin, J. (2004). "A Survey of Outlier Detection Methodologies".Artificial Intelligence Review. 22 (2): 85–126.
↑Dokas, Paul; Ertoz, Levent; Kumar, Vipin; Lazarevic, Aleksandar; Srivastava, Jaideep; Tan, Pang-Ning (2002). "Data mining for network intrusion detection" (PDF).Proceedings NSF Workshop on Next Generation Data Mining.
↑Chandola, V.; Banerjee, A.; Kumar, V. (2009). "Anomaly detection: A survey".ACM Computing Surveys. 41 (3): 1–58.
↑Mahadevan, V., Li, W., Bhalodia, V., & Vasconcelos, N. (2010, June). Anomaly detection in crowded scenes. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (pp. 1975-1981).IEEE.
↑Davidson, J., Liebald, B., Liu, J., Nandy, P., Van Vleet, T., Gargi, U., ... & Sampath, D. (2010, September). The YouTube video recommendation system. InProceedings of the fourth ACM conference on Recommender systems (pp. 293-296).
↑Baluja, S., & Pomerleau, D. (1994). Non-intrusive gaze tracking using artificial neural networks. InAdvances in Neural Information Processing Systems (pp. 753-760).
↑Foody, G. M., McCulloch, M. B., & Yates, W. B. (1995). The effect of training set size and composition on artificial neural network classification.International Journal of Remote Sensing, 16(9), 1707-1723.
↑Lange, K. L., Little, R. J., & Taylor, J. M. (1989). Robust statistical modeling using the t distribution.Journal of the American Statistical Association, 84(408), 881-896.
↑Acerbi, L., & Ji, W. (2017). Practical Bayesian optimization for model fitting with Bayesian adaptive direct search. InAdvances in neural information processing systems (pp. 1836-1846).
↑Lüthi, M., Jud, C., & Vetter, T. (2013, September). A unified approach to shape model fitting and non-rigid registration. InInternational workshop on machine learning in medical imaging (pp. 66-73). Springer, Cham.
↑85.085.1"Why Machine Learning Models Often Fail to Learn: QuickTake Q&A".Bloomberg.com.
↑"IBM's Watson recommended 'unsafe and incorrect' cancer treatments - STAT".STAT.
↑Hernandez, Daniela; Greenwald, Ted (2018-08-11). "IBM Has a Watson Dilemma".Wall Street Journal.
↑Char, D. S.; Shah, N. H.; Magnus, D. (2018). "Implementing Machine Learning in Health Care—Addressing Ethical Challenges".New England Journal of Medicine. 378 (11): 981–983.