TWI787669B - System and method of automated machine learning based on model recipes - Google Patents

System and method of automated machine learning based on model recipes Download PDF

Info

Publication number
TWI787669B
TWI787669B TW109139863A TW109139863A TWI787669B TW I787669 B TWI787669 B TW I787669B TW 109139863 A TW109139863 A TW 109139863A TW 109139863 A TW109139863 A TW 109139863A TW I787669 B TWI787669 B TW I787669B
Authority
TW
Taiwan
Prior art keywords
project
machine learning
parameter space
pool
result
Prior art date
Application number
TW109139863A
Other languages
Chinese (zh)
Other versions
TW202221579A (en
Inventor
陳添福
吳浩平
陳建志
孫嘉妤
陳志勝
Original Assignee
國立陽明交通大學
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 國立陽明交通大學 filed Critical 國立陽明交通大學
Priority to TW109139863A priority Critical patent/TWI787669B/en
Publication of TW202221579A publication Critical patent/TW202221579A/en
Application granted granted Critical
Publication of TWI787669B publication Critical patent/TWI787669B/en

Links

Images

Landscapes

  • Feedback Control In General (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A machine learning system at least includes an application program interface, an optimization module, and atrial execution module. The optimization module is composed of database, recipe pool and advisor pool. The machine learning method selects the best recipe from the recipe pool by the user, recommends a project setting based on the selected recipe, and then selects an advisor from the advisor pool based on the project setting. The selected advisor generates an optimized hyperparameter combination, and provides user an optimized machine learning model.

Description

基於模型處方的自動機器學習之系統與方法 System and method for automatic machine learning based on model prescription

本發明是有關於一種機器學習之系統與方法,且特別是有關於一種自動優化機器學習之系統與方法。 The present invention relates to a system and method for machine learning, and in particular to a system and method for automatically optimizing machine learning.

由於資訊產業的蓬勃發展,近年來人工智慧已成為產業的顯學,特別是在工業4.0的產業應用上,人工智慧扮演著重要的角色。機器學習是人工智慧在產業應用上的重要分支,廣泛應用於資料探勘、電腦視覺、自然語言處理、生物特徵辨識、搜尋引擎、醫學診斷、檢測金融詐欺、證券市場分析、DNA定序、語音及手寫辨識、戰略遊戲及機器人等領域。一般來說,機器學習的流程主要包含七個步驟:收集資料(gathering data)、準備數據(preparing the data)、選擇模型(choosing model)、訓練機器(training)、評估分析(evaluation)、參數調校(hyperparameter tuning)以及預測推論(prediction)。其中,參數調校對機器學習的模型表現及成效有非常大的影響。 Due to the vigorous development of the information industry, artificial intelligence has become a prominent science in the industry in recent years, especially in the industrial application of Industry 4.0, artificial intelligence plays an important role. Machine learning is an important branch of artificial intelligence in industrial applications. It is widely used in data mining, computer vision, natural language processing, biometric identification, search engines, medical diagnosis, detection of financial fraud, securities market analysis, DNA sequencing, speech and Handwriting recognition, strategic games and robotics and other fields. Generally speaking, the process of machine learning mainly includes seven steps: gathering data, preparing the data, choosing model, training machine, evaluating and analyzing, and parameter tuning. Hyperparameter tuning and prediction. Among them, parameter tuning has a great impact on the performance and effectiveness of machine learning models.

目前常見之開源(open source)超參數調校工具包括Hyperopt、NNI、AutoKeras等;此外,Google、Microsoft、Amazon、SigOpt等軟體公司亦提供各自的超參數調校服務。無論哪一種超參數調校工具,使用者仍須針對機器學習標的決定一組合適的模型、相應參數搜尋範圍和演算法,才能得出優良 的超參數組合。除了模型/搜尋範圍/演算法的決定之外,使用者還需要建置模型後續的訓練、測試、部署(deploy)與維護。上述的每一個環節都需要使用者具備相當的專業知識及經驗累積;因此,將機器學習要導入實際場域應用是一個高門檻,長時程的過程。本發明透過開發經驗累積數值化、系統化和自動產生優化(optimized)超參數組合的機器學習系統與方法,來大幅降低機器學習的導入門檻與時程。 Common open source hyperparameter tuning tools include Hyperopt, NNI, AutoKeras, etc.; in addition, software companies such as Google, Microsoft, Amazon, and SigOpt also provide their own hyperparameter tuning services. Regardless of the hyperparameter tuning tool, the user still needs to determine a set of suitable models, corresponding parameter search ranges, and algorithms for the machine learning target in order to obtain an optimal combination of hyperparameters. In addition to the decision of the model/search scope/algorithm, the user also needs to build the model for subsequent training, testing, deployment (deploy) and maintenance. Each of the above-mentioned links requires users to have considerable professional knowledge and accumulated experience; therefore, it is a high-threshold and long-term process to introduce machine learning into actual field applications. The present invention greatly reduces the threshold and time for machine learning introduction by developing a machine learning system and method that accumulates numerical experience, systematizes, and automatically generates optimized (optimized) hyperparameter combinations.

本發明之一方面為提供一種機器學習的系統與方法,可以將開發經驗數值化儲存於資料庫中,並由處方池之處方提供機器學習的模型/搜尋空間/搜尋演算法組合。 One aspect of the present invention is to provide a machine learning system and method, which can store development experience numerically in a database, and provide a machine learning model/search space/search algorithm combination from the recipe pool.

本發明的另一方面為提供一種機器學習的系統與方法,可以自動產生優化超參數組合。 Another aspect of the present invention is to provide a machine learning system and method, which can automatically generate optimized hyperparameter combinations.

本發明的另一方面為提供一種機器學習的系統與方法,具有可執行函式庫,以進行模擬測試優化超參數組合,並可以導入場域裝置。 Another aspect of the present invention is to provide a machine learning system and method, which has an executable library for performing simulation tests to optimize hyperparameter combinations, and can be imported into field devices.

依據本發明一實施例,一種機器學習系統,包括:一應用程式介面,一優化模組,以及一測試執行模組。應用程式介面,用以輸入一專案設定;優化模組連接應用程式介面。優化模組更包括:一資料庫,用以儲存複數個專案資訊;一顧問池,用以儲存多個顧問;以及一處方池,用以儲存多個處方。測試執行模組連接應用程式介面及優化模組。其中優化模組接收專案需求後,根據專案需求自處方池選取一處方;處方產生建議專案設定並回傳給使用者;使用者調整確認專案設定後再經由應用程式介面提交給優化模組;優化模組根據專案設定自顧問池選取一顧問。機器學習系統執行步驟包括:A.優化模組依 據所選取的顧問,基於專案資訊產生一超參數組合;B.測試執行模組接收超參數組合,根據超參數組合執行一訓練測試流程,並產出一新的專案資訊,且儲存並更新資料庫;C.在一預定的迴圈區間,重複執行步驟A,B;D.輸出一優化專案結果。 According to an embodiment of the present invention, a machine learning system includes: an API, an optimization module, and a test execution module. API for inputting a project setting; optimized module connection API. The optimization module further includes: a database for storing multiple project information; a consultant pool for storing multiple consultants; and a prescription pool for storing multiple prescriptions. The test execution module connects the API and optimization modules. After the optimization module receives the project requirements, it selects a prescription from the prescription pool according to the project requirements; the prescription generates suggested project settings and sends them back to the user; the user adjusts and confirms the project settings and then submits them to the optimization module through the API; optimization The module selects a consultant from the consultant pool according to the project settings. The execution steps of the machine learning system include: A. Optimizing the module according to According to the selected consultant, a hyperparameter combination is generated based on the project information; B. The test execution module receives the hyperparameter combination, executes a training test process according to the hyperparameter combination, and generates a new project information, and stores and updates the data Library; C. Repeat steps A and B in a predetermined loop interval; D. Output an optimization project result.

優化模組選取處方的方法包括增強式學習法。機器學習系統,更包括一使用者入口介面,透過一網路連結連接應用程式介面,專案需求係經由使用者入口介面進行輸入。 The method of optimizing the module selection prescription includes the reinforcement learning method. The machine learning system further includes a user interface connected to the application programming interface through a network link, and project requirements are input through the user interface.

測試執行模組更至少包括多個可執行函式,測試執行模組係藉由可執行函式執行該訓練測試流程。 The test execution module further includes at least a plurality of executable functions, and the test execution module uses the executable functions to execute the training and testing process.

依據本發明另一實施例,一種機器學習方法,適用於產生優化超參數組合,其中機器學習方法係執行於一優化模組及一測試執行模組。優化模組包括:一資料庫,用以儲存多個專案資訊;一顧問池,用以儲存多個顧問;以及一處方池,用以儲存多個處方。機器學習方法包括下列步驟:A.接收一專案需求;B.根據專案需求,自處方池選取一處方,並根據處方產生一專案設定,且依據專案設定自顧問池選取一顧問;C.優化模組依據所選取的顧問,基於專案資訊產生一超參數組合;D.測試執行模組接收超參數組合,根據超參數組合執行一訓練測試流程,並產出一新的專案資訊,且儲存並更新資料庫;E.在一預定的迴圈區間,重複執行步驟C,D;F.產出優化超參數組合。 According to another embodiment of the present invention, a machine learning method is suitable for generating optimized hyperparameter combinations, wherein the machine learning method is executed in an optimization module and a test execution module. The optimization module includes: a database for storing multiple project information; a consultant pool for storing multiple consultants; and a prescription pool for storing multiple prescriptions. The machine learning method includes the following steps: A. receiving a project requirement; B. selecting a prescription from the prescription pool according to the project requirement, generating a project setting according to the prescription, and selecting a consultant from the consultant pool according to the project setting; C. optimizing the model The group generates a hyperparameter combination based on the project information based on the selected consultant; D. The test execution module receives the hyperparameter combination, executes a training test process according to the hyperparameter combination, and generates a new project information, and stores and updates it Database; E. Repeat steps C and D in a predetermined loop interval; F. Generate optimized hyperparameter combinations.

優化模組選取處方的方法至少包括增強式學習法。測試執行模組包括:多個可執行函式,測試執行模組係藉由可執行函式執行訓練測試流程。機器學習方法更包括:以可執行函式,及優化超參數組合,在一場域裝置執行機器學習。 The method for selecting a prescription by the optimization module at least includes a reinforcement learning method. The test execution module includes: a plurality of executable functions, and the test execution module uses the executable functions to execute the training and testing process. The machine learning method further includes: performing machine learning on a field device by using an executable function and optimizing a combination of hyperparameters.

上述發明內容旨在提供本揭示內容的簡化摘要,以使閱讀者對本揭示內容具備基本的理解。此發明內容並非本揭示內容的完整概述,且其用意並非在指出本發明實施例的重要/關鍵元件或界定本發明的範圍。在參閱下文實施方式後,本發明所屬技術領域中具有通常知識者當可輕易瞭解本發明之基本精神及其他發明目的,以及本發明所採用之技術手段與實施方面。 The above summary is intended to provide a simplified summary of the disclosure to provide readers with a basic understanding of the disclosure. This summary is not an extensive overview of the disclosure and it is not intended to identify key/critical elements of the embodiments of the invention or to delineate the scope of the invention. After referring to the following embodiments, those with ordinary knowledge in the technical field of the present invention can easily understand the basic spirit and other invention objectives of the present invention, as well as the technical means and implementation aspects adopted by the present invention.

100:機器學習系統 100: Machine Learning Systems

102:優化模組 102: Optimize the module

104:資料庫 104: Database

106:核心 106: Core

108:處方池 108: Prescription pool

110:顧問池 110: Consultant pool

112:應用程式介面 112:Application Programming Interface

114:測試執行模組 114:Test Execution Module

116:使用者入口介面 116: User Portal Interface

118:使用者 118: user

120:場域裝置 120: field device

200:機器學習方法 200: Machine Learning Methods

202,203,204,206,208,210,212,214,216,218,220:步驟 202, 203, 204, 206, 208, 210, 212, 214, 216, 218, 220: steps

圖1繪示依照本發明一實施方式之機器學習系統架構示意圖。 FIG. 1 shows a schematic diagram of a machine learning system architecture according to an embodiment of the present invention.

圖2繪示依照本發明另一實施方式之機器學習方法流程圖。 FIG. 2 shows a flowchart of a machine learning method according to another embodiment of the present invention.

在下面的敘述中,將會介紹上述之機器學習系統與方法的例示結構與其例示之執行方法。為了容易瞭解所述實施例之故,下面將會提供不少技術細節。當然,並不是所有的實施例皆需要這些技術細節。同時,一些廣為人知之結構或元件,僅會以示意的方式在附圖中繪出,以適當地簡化附圖內容。 In the following description, an example structure and an example execution method of the above-mentioned machine learning system and method will be introduced. For the sake of easy understanding of the described embodiments, a number of technical details will be provided below. Of course, not all embodiments require these technical details. Meanwhile, some well-known structures or elements are only drawn schematically in the drawings to appropriately simplify the contents of the drawings.

為了使本揭示內容的敘述更加詳盡與完備,下文針對本發明的實施方面與具體實施例提出了說明性的描述;但這並非實施或運用本發明具體實施例的唯一形式。實施方式中涵蓋了多個具體實施例的特徵以及用以建構與操作這些具體實施例的方法步驟與其順序。然而,亦可利用其他具體實施例來達成相同或均等的功能與步驟順序。 In order to make the description of the disclosure more detailed and complete, the following provides illustrative descriptions of the implementation aspects and specific embodiments of the present invention; but this is not the only form of implementing or using the specific embodiments of the present invention. The description covers features of various embodiments as well as method steps and their sequences for constructing and operating those embodiments. However, other embodiments can also be used to achieve the same or equivalent functions and step sequences.

參照圖1,其繪示依照本發明一實施方式之機器學習系統架構示意圖。根據所要解決之機器學習的問題,設定學習模型、搜尋空間、搜尋演算法,然後針對場域裝置(on-site devices)進行訓練、測試與部屬。本發明為了降低應用門檻及提高應用效率,提出一種機器學習系統100,包括優化模組102 (Optimizer Module)、應用程式介面112(Application Programing Interface,API),及測試執行模組114(Trial and Executing Module)。優化模組102主要由核心106(Kernel)所控制。核心106主要控制三個元件:資料庫104(Database)、處方池108(Recipe Pool)及顧問池110(Advisor Pool)。為方便說明,我們稱機器學習模型的建構過程為一個專案(Project)。資料庫104內儲存所有專案相關資料,包括但不限於專案編號、建立時間、擁有者、時間限制、次數限制、模型種類、模型預設參數、顧問種類、參數搜尋空間、測試參數組合、量化模型表現等。資料庫104儲存的資料提供核心106存取應用,以進行各種學習或優化運算。 Referring to FIG. 1 , it shows a schematic diagram of a machine learning system architecture according to an embodiment of the present invention. According to the machine learning problem to be solved, set the learning model, search space, and search algorithm, and then conduct training, testing and deployment for on-site devices. In order to reduce the application threshold and improve application efficiency, the present invention proposes a machine learning system 100, including an optimization module 102 (Optimizer Module), application program interface 112 (Application Programming Interface, API), and test execution module 114 (Trial and Executing Module). The optimization module 102 is mainly controlled by the kernel 106 (Kernel). The core 106 mainly controls three components: a database 104 (Database), a prescription pool 108 (Recipe Pool) and a consultant pool 110 (Advisor Pool). For the convenience of explanation, we call the construction process of the machine learning model a project. The database 104 stores all project-related information, including but not limited to project number, creation time, owner, time limit, number of times limit, model type, model default parameters, consultant type, parameter search space, test parameter combination, quantitative model performance etc. The data stored in the database 104 provides the core 106 with access to applications for various learning or optimization operations.

處方池108內儲存了多個處方。所謂處方係針對各個機器學習所要解決的問題之專案的基本設置(configuration),包括機器學習模型設定及參數空間設定等。使用者118透過使用者入口介面116輸入機器學習欲解決的問題,亦即專案需求,及一些基本資料。完成專案需求輸入後,核心106會依照使用者118輸入的專案需求,從處方池108提供較適合的處方給使用者選擇。處方池108內初始處方資料為過去專案的處方紀錄,也就是過去專案之問題對應機器學習模型、參數空間的紀錄。因此,核心106提供處方的方法包括二種:一種為既有專案處方之配對選定,若使用者118輸入的專案需求與處方池108中既有的專案符合,則直接將該專案之處方輸出,提供給使用者118。另一種方法為利用增強式學習法(Reinforcement Learning)產出一較佳處方,並儲存更新於處方池108中,以作為未來專案之參考。可處理之機器學習模型包括但不限於:監督式學習(線性迴歸、邏輯迴歸、決策樹、支援向量機、K-鄰近算法)、聚類分析、圖型識別(K-均值演算法,整合學習AdaBoost,貝葉斯分類器),降維與度量學習(主成分分析、自動編碼器、線性判別分析)、結構預測、異常 檢測、人工神經網路(前饋神經網路、放射狀基底函數網路、循環神經網路)、強化學習類型(瑪爾卡夫鏈、Q-學習、蒙地卡羅、SARSA(State Action Reward State Action Learning)、變分法)。 A plurality of prescriptions are stored in the prescription pool 108 . The so-called prescription refers to the basic configuration of the project for each problem to be solved by machine learning, including machine learning model setting and parameter space setting. The user 118 inputs the problem to be solved by the machine learning through the user interface 116 , that is, project requirements, and some basic information. After completing the project requirement input, the core 106 will provide a more suitable prescription from the prescription pool 108 for the user to choose according to the project requirement input by the user 118 . The initial prescription data in the prescription pool 108 is the prescription record of the past project, that is, the record of the machine learning model and parameter space corresponding to the problem of the past project. Therefore, there are two methods for the core 106 to provide prescriptions: one is to select the pairing of existing project prescriptions, if the project demand input by the user 118 matches the existing project in the prescription pool 108, then directly output the prescription of the project, provided to the user 118. Another method is to use Reinforcement Learning to generate a better prescription, and store and update it in the prescription pool 108 as a reference for future projects. Machine learning models that can be processed include but are not limited to: supervised learning (linear regression, logistic regression, decision tree, support vector machine, K-neighbor algorithm), cluster analysis, pattern recognition (K-means algorithm, integrated learning AdaBoost, Bayesian classifiers), dimensionality reduction and metric learning (PCA, autoencoders, linear discriminant analysis), structure prediction, anomalies Detection, artificial neural network (feedforward neural network, radial basis function network, recurrent neural network), reinforcement learning type (Markaff chain, Q-learning, Monte Carlo, SARSA (State Action Reward State Action Learning), variational method).

關於核心106對處方池108的增強式學習法流程,係舉例如下:1.核心106依據特定問題與機器學習模型,在處方池108中針對特定問題與機器學習模型歸納出初始的參數空間。2.定義所有可能參數空間,及每一參數空間可能的調整動作(例如:調升/調降/維持),並賦予每個可能調整動作相同的機率。3.以目前參數空間(第一參數空間)設定執行專案,並記錄模型量化表現(第一結果)。4.隨機進行上述的調整動作A1,得到新的參數空間(第二參數空間)。5.以第二參數空間設定執行專案,並記錄模型量化表現(第二結果)。6.比較第一結果與第二結果,若第一結果較佳,則調降調整動作A1的機率,若第二結果較佳,則調高調整動作A1的機率,若二個結果相同則維持不變。7.重複執行步驟3~6,則可以將參數空間收斂至一較佳值。核心106依據增強式學習法得到此較佳參數空間設定,即建立一新的處方儲存更新於處方池108中,並以此新處方提供給使用者。所選定的處方會提供使用者合適的專案設定,包括但不限於模型/搜尋空間/搜尋演算法組合,並透過應用程式介面112輸入優化模組102中。 An example of the enhanced learning process of the core 106 to the prescription pool 108 is as follows: 1. The core 106 summarizes the initial parameter space for the specific problem and the machine learning model in the prescription pool 108 according to the specific problem and the machine learning model. 2. Define all possible parameter spaces and possible adjustment actions (for example: increase/decrease/maintain) in each parameter space, and give each possible adjustment action the same probability. 3. Execute the project with the current parameter space (the first parameter space) setting, and record the quantitative performance of the model (the first result). 4. Randomly perform the above adjustment action A1 to obtain a new parameter space (second parameter space). 5. Execute the project with the second parameter space setting, and record the quantitative performance of the model (second result). 6. Compare the first result with the second result, if the first result is better, lower the probability of adjusting action A1, if the second result is better, increase the probability of adjusting action A1, if the two results are the same, keep it constant. 7. Repeat steps 3-6 to converge the parameter space to a better value. The core 106 obtains the optimal parameter space setting according to the reinforcement learning method, that is, a new prescription is created, stored and updated in the prescription pool 108, and the new prescription is provided to the user. The selected recipe provides the user with suitable project settings, including but not limited to model/search space/search algorithm combinations, and is input into the optimization module 102 through the API 112 .

顧問池110中則儲存多個顧問,所謂的顧問包括針對專案可能會使用的參數搜尋演算法及資源分配的策略,用以優化超參數組合。參數搜尋演算法包括但不限於:貝氏最佳化、基因演算法、退火法、樹狀結構Parzen估算法(Tree-structured Parzen Estimator,TPE)、連續減半過程、超頻法(Hyperband),貝氏優化超頻法(Bayesian Optimization Hyperband,BOHB),中位數停止法 (Median Stop),曲線擬合法(Curve Fitting)等。在本發明的一實施例中,顧問池110中的上述的參數搜尋演算法,係由C語言,Python語言編寫成可執行函式,提供給核心106進行超參數組合的優化。 A plurality of consultants are stored in the consultant pool 110 , and the so-called consultants include parameter search algorithms and resource allocation strategies that may be used for the project, so as to optimize the combination of hyperparameters. Parameter search algorithms include but are not limited to: Bayesian optimization, genetic algorithm, annealing method, tree-structured Parzen Estimator (TPE), continuous halving process, overfrequency method (Hyperband), Bayesian The optimized overclocking method (Bayesian Optimization Hyperband, BOHB), the median stop method (Median Stop), curve fitting method (Curve Fitting), etc. In an embodiment of the present invention, the above-mentioned parameter search algorithm in the consultant pool 110 is written as an executable function in C language or Python language, and provided to the core 106 to optimize the combination of hyperparameters.

在本發明的一實施例中,核心106會依據使用者118所選擇處方建議輸入的專案設定,自顧問池110中選擇適當的顧問(即超參數搜尋演算法及資源分配策略)。舉例來說,當核心106依據使用者118輸入的專案設定,選擇了基因演算法的顧問,則超參數的搜尋流程包括:1.從處方池108提供的處方中之參數空間,選取一組固定數量的起始超參數組合,並加入待測清單中。2.依照待測清單中的超參數組合,以及處方池108提供的機器學習模型,進行訓練及測試,並記錄表現結果(performance)。3.基於表現結果選擇一定比例的優良超參數組合。4.將優良超參數組合的數值重新混合排列,產生新的超參數組合。5.將新的超參數組合經過一定程度的變異(例如:給予特定之超參數些微的上下擾動)並加入待測清單。6.在一定的迴圈區間重複步驟2~5。最後選取得到最佳結果之超參數組合。 In one embodiment of the present invention, the core 106 selects an appropriate consultant (ie hyperparameter search algorithm and resource allocation strategy) from the consultant pool 110 according to the project settings selected by the user 118 and input by the prescription suggestion. For example, when the core 106 selects the consultant of the genetic algorithm according to the project setting input by the user 118, the hyperparameter search process includes: 1. Select a set of fixed parameters from the parameter space in the prescription provided by the prescription pool 108 The number of starting hyperparameter combinations to add to the list to be tested. 2. Perform training and testing according to the combination of hyperparameters in the test list and the machine learning model provided by the prescription pool 108, and record the performance results (performance). 3. Select a certain proportion of excellent hyperparameter combinations based on performance results. 4. Remix and arrange the values of excellent hyperparameter combinations to generate new hyperparameter combinations. 5. Put the new hyperparameter combination through a certain degree of variation (for example: give a specific hyperparameter a slight up and down perturbation) and add it to the list to be tested. 6. Repeat steps 2~5 in a certain loop interval. Finally, select the combination of hyperparameters that yields the best results.

測試執行模組114包含了多個可執行函式,這些可執行函式係包括上述各種機器學習模型的函式庫,而依據各種專案設置,以二進位執行檔、虛擬機器映像檔或虛擬化容器進行封裝,構成可執行函式,可以在使用者的運算裝置上進行訓練測試運算,也可以用於場域裝置120上執行。測試執行模組係透過應用程式介面112與優化模組102溝通,並雙向傳遞資料,依據核心106提供的超參數組合及專案設置,搭配適當的可執行函式,可進行訓練測試流程,並回傳量化的測試結果,用以儲存並更新資料庫104。 The test execution module 114 includes a plurality of executable functions, these executable functions include the library of the above-mentioned various machine learning models, and according to various project settings, the binary execution file, virtual machine image file or virtualization The container is packaged to form an executable function, which can be used for training and testing calculations on the user's computing device, and can also be used for execution on the field device 120 . The test execution module communicates with the optimization module 102 through the application programming interface 112, and transmits data in both directions. According to the hyperparameter combination and project settings provided by the core 106, with appropriate executable functions, the training and testing process can be carried out, and feedback The quantified test results are transmitted to store and update the database 104 .

在本發明的一實施例中,應用程式介面112可以由表現層狀態轉移應用程式介面(Representational State Transfer API)所構成,利用HTTP/HTTPS協定建立使用者118與優化模組102之間的網路連結,包括虛擬網路、區域網路或網際網路。具體來說,使用者118透過應用程式介面112定義的有限數量溝通模式來傳遞請求(request)及接收回饋訊息。這些溝通模式包括:專案的新增、刪除、執行、復原,優化模組回傳的專案設定建議,超參數組合的請求與建議結果,訓練測試的量化表現回饋,錯誤訊息及代碼回報等。 In an embodiment of the present invention, the API 112 may be composed of a Representational State Transfer API, which uses the HTTP/HTTPS protocol to establish a network between the user 118 and the optimization module 102 Connections, including virtual networks, local area networks, or the Internet. Specifically, the user 118 sends requests and receives feedback messages through a limited number of communication modes defined by the API 112 . These communication modes include: adding, deleting, executing, and restoring projects, project setting suggestions returned by optimization modules, hyperparameter combination requests and suggested results, quantitative performance feedback of training tests, error messages and code reports, etc.

使用者入口介面116係用來1.接收使用者118專案需求並回傳使用者118建議專案設定,2.匯整專案結果並視覺方式呈現。如圖1所示,使用者118可以直接連接應用程式介面,使用者118透過使用者入口介面116輸入專案需求後,優化模組102回傳建議專案設置。另一方面,透過應用程式介面112,使用者118可提交專案設定,並透過測試執行模組114執行訓練測試流程,再回傳其訓練測試結果。優化模組102無須對使用者118的訓練測試相關資料進行存取,可以保證使用者118資料的隱密性。此外,使用者入口介面116可以將訓練測試結果以視覺化(visualization)介面呈現,比如:將超參數組合與訓練測試的量化結果,以折線圖、分佈長條圖、二維座標關係圖、平行座標圖、三維點圖及曲面圖等方式呈現。 The user portal interface 116 is used to 1. receive the project requirements from the user 118 and return the suggested project settings to the user 118, and 2. collect the project results and present them visually. As shown in FIG. 1 , the user 118 can directly connect to the application programming interface. After the user 118 inputs the project requirements through the user interface 116 , the optimization module 102 returns the suggested project settings. On the other hand, through the application programming interface 112 , the user 118 can submit project settings, execute the training and testing process through the test execution module 114 , and then return the training and testing results. The optimization module 102 does not need to access the data related to training and testing of the user 118, which can ensure the confidentiality of the data of the user 118. In addition, the user interface 116 can present the training and test results in a visualization interface, for example: combining the hyperparameters with the quantified results of the training and testing, using line graphs, distribution bar graphs, two-dimensional coordinate relationship graphs, parallel Coordinate diagrams, 3D point diagrams and surface diagrams are presented.

請參照圖2,圖2繪示依照本發明另一實施方式之機器學習方法流程圖。本發明的機器學習方法係在上述的機器學習系統中執行,請同時參照圖1,本發明的機器學習方法200包括下列步驟: Please refer to FIG. 2 , which shows a flowchart of a machine learning method according to another embodiment of the present invention. Machine learning method of the present invention is carried out in above-mentioned machine learning system, please refer to Fig. 1 simultaneously, machine learning method 200 of the present invention comprises the following steps:

步驟202,為方法開始,當使用者118欲建構一機器學習模型,即開啟一個專案,如前所述,使用者建立專案需求。使用者118透過使用者入 口介面116將專案需求傳遞給優化模組102。步驟203,優化模組102會依據使用者輸入的專案需求,提供適合的處方給使用者選取。核心106選取處方的方法包括二種:一種為既有專案處方之配對選定,若使用者118輸入的專案需求與處方池108中既有的專案符合,則直接將該專案之處方輸出,提供給使用者118。另一種方法為利用增強式學習法產出一較佳處方,並儲存更新於處方池108中,以作為未來專案之參考。增強式學習法如前所述,於此不再贅述。步驟204,根據使用者所選取的處方,會提供建議的專案設定,並透過應用程式介面112輸入,由優化模組102的核心106接收此專案設定。專案設定內容包括但不限於:模型/搜尋空間/搜尋演算法組合、專案編號、建立時間、擁有者、時間限制、次數限制、專案類別、專案問題描述等。接著進行步驟206,根據專案設定,自顧問池110選取一顧問。 Step 202 is the beginning of the method. When the user 118 wants to construct a machine learning model, a project is opened. As mentioned above, the user creates project requirements. User 118 enters the The port interface 116 transmits the project requirements to the optimization module 102 . In step 203, the optimization module 102 will provide a suitable prescription for the user to select according to the project requirement input by the user. There are two methods for the core 106 to select prescriptions: one is to select the matching of existing project prescriptions. If the project requirements input by the user 118 match the existing project in the prescription pool 108, the prescription of the project will be directly output and provided to User 118. Another method is to use the reinforcement learning method to generate a better prescription, and store and update it in the prescription pool 108 as a reference for future projects. The reinforcement learning method is as mentioned above, and will not be repeated here. Step 204 , according to the prescription selected by the user, a suggested project setting is provided and input through the API 112 , and the core 106 of the optimization module 102 receives the project setting. Project settings include but not limited to: model/search space/search algorithm combination, project number, creation time, owner, time limit, number of times limit, project category, project problem description, etc. Then proceed to step 206 , select a consultant from the consultant pool 110 according to the project setting.

步驟208,優化模組102依據所選取的顧問,基於資料庫104中的專案資訊產生一超參數組合。如前所述,核心106使用所選取顧問從專案設定中定義的參數空間搜尋較佳的超參數組合。詳細步驟如前所述依照超參數的搜尋演算法進行超參數優化流程。 Step 208 , the optimization module 102 generates a hyperparameter combination based on the project information in the database 104 according to the selected consultant. As previously mentioned, the core 106 uses the selected consultant to search for a better combination of hyperparameters from the parameter space defined in the project settings. The detailed steps are as mentioned above to carry out the hyperparameter optimization process according to the hyperparameter search algorithm.

步驟210,測試執行模組114接收超參數組合,根據超參數組合執行一訓練測試流程。步驟212,根據訓練測試結果,產出一新的專案資訊,亦即量化測試結果。步驟214,將此測試結果儲存並更新資料庫104。舉例來說,根據使用者118輸入的專案設定,測試執行模組可以選取適當的可執行函式,如前所述,依據核心106提供的超參數組合及專案設置,搭配適當的可執行函式,可進行訓練測試流程,並回傳量化的測試結果,用以儲存並更新資料庫104。由於資料庫104的專案資訊已更新,並納入上述訓練測試結果,所以可以產生 較佳的超參數組合。相關實施方法已描述於上述的基因演算法實施例中,然熟習該技術者應知,本發明並不限於使用基因演算法,亦可以採用其他的超參數搜尋演算法,甚至若系統資源充裕,更可以採用顧問池中多個顧問,進行超參數搜尋,以達到更好的優化效果。 In step 210, the test execution module 114 receives the hyperparameter combination, and executes a training and testing process according to the hyperparameter combination. Step 212 , according to the training and testing results, a new project information is produced, that is, the quantitative testing results. Step 214 , store the test result and update the database 104 . For example, according to the project settings input by the user 118, the test execution module can select an appropriate executable function. As mentioned above, according to the hyperparameter combination and project settings provided by the core 106, the appropriate executable function can be matched. , the training and testing process can be carried out, and the quantified test results can be returned to store and update the database 104 . Since the project information in the database 104 has been updated and incorporated into the above training and test results, it is possible to generate A better combination of hyperparameters. Relevant implementation methods have been described in the above-mentioned genetic algorithm embodiment, but those skilled in the art should know that the present invention is not limited to the use of genetic algorithm, and other hyperparameter search algorithms can also be used. Even if the system resources are sufficient, It is also possible to use multiple consultants in the consultant pool to search for hyperparameters to achieve better optimization results.

步驟216,在預定的迴圈區間,重複執行步驟208,210,212,214。迴圈區間的設定可以是迴圈執行次數、迴圈執行時間或迴圈執行耗費資源的上限等。步驟218,產出優化超參數組合。如上所述,執行步驟208,210,212,214時,所選取的顧問會篩選較佳測試結果的超參數組合,並儲存更新於資料庫104中,因此依據更新後的資料庫104再產生的最佳超參數組合,其表現將會優於更新前資料庫104產生之最佳超參數組合。經過多次迴圈執行後,將會產出優化超參數組合。步驟220,本發明機器學習方法至此完成,使用者118可以獲得欲建構專案的優化超參數組合,搭配測試執行模組114的可執行函式,及可以直接應用於場域裝置120中,而得到較佳的機器學習模型。 Step 216 , repeatedly execute steps 208 , 210 , 212 , and 214 in predetermined loop intervals. The setting of the loop interval may be the number of loop executions, the loop execution time, or the upper limit of the resources consumed by the loop execution. In step 218, an optimized hyperparameter combination is produced. As mentioned above, when executing steps 208, 210, 212, 214, the selected consultant will filter the hyperparameter combination with better test results, and store and update it in the database 104, so the optimal hyperparameter combination generated according to the updated database 104, It will outperform the best combination of hyperparameters produced by the database 104 before the update. After multiple rounds of execution, an optimized hyperparameter combination will be produced. Step 220, the machine learning method of the present invention is completed so far, the user 118 can obtain the optimized hyperparameter combination of the project to be constructed, which can be matched with the executable function of the test execution module 114, and can be directly applied to the field device 120 to obtain Better machine learning models.

綜上所述,本發明的優化模組,可以透過有經驗的專家建構初始的處方池,並透過優化模組可以自動產生較佳的處方提供給使用者,且透過本發明的機器學習方法可以產生優化超參數組合,並搭配可執行函式,可以獲得完整優化的機器學習模型,輕易地導入場域裝置中執行機器學習。 In summary, the optimization module of the present invention can construct an initial prescription pool through experienced experts, and can automatically generate better prescriptions for users through the optimization module, and the machine learning method of the present invention can Generate an optimized hyperparameter combination and match it with an executable function to obtain a complete and optimized machine learning model, which can be easily imported into the field device to perform machine learning.

雖然本發明已以實施方式揭露如上,然其並非用以限定本發明,任何熟習此技藝者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed above in terms of implementation, it is not intended to limit the present invention. Anyone skilled in this art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection of the present invention The scope shall be defined by the appended patent application scope.

100:機器學習系統 100: Machine Learning Systems

102:優化模組 102: Optimize the module

104:資料庫 104: Database

106:核心 106: Core

108:處方池 108: Prescription pool

110:顧問池 110: Consultant pool

112:應用程式介面 112:Application Programming Interface

114:測試執行模組 114:Test Execution Module

116:使用者入口介面 116: User Portal Interface

118:使用者 118: user

120:場域裝置 120: field device

Claims (8)

一種機器學習系統,至少包括:一應用程式介面,用以輸入一專案設定;一優化模組,連接該應用程式介面,該優化模組更至少包括:一資料庫,用以儲存複數個專案資訊;一顧問池,用以儲存複數個顧問;以及一處方池,用以儲存複數個處方;以及一測試執行模組,連接該應用程式介面及該優化模組,其中該優化模組接收一專案需求後執行下列步驟:(e)該優化模組根據該專案需求,在處方池中歸納出初始的參數空間;(f)定義一第一參數空間,及該第一參數空間的調整動作,並賦予每個調整動作具有相同機率;(g)以該第一參數空間設定執行專案,並記錄模型量化表現得到一第一結果;(h)隨機執行上述步驟(e)~(g),得到一第二參數空間;(i)以該第二參數空間設定執行專案,並記錄模型量化表現,得到一第二結果;(j)比較該第一結果與該第二結果,若該第一結果較佳,則調降每個調整動作的機率,若該第二結果較佳,則調高每個調整動作的機率,若二個結果相同則維持不變;(k)重複執行步驟(g)~(j),將該第一參數空間收斂至一較佳值;(l)該優化模組將收斂至較佳值之該第一參數空間以作為一顧問,並將該顧問儲存於該顧問池; 該機器學習系統包括執行下列步驟:(a)該優化模組依據所選取的該顧問,基於該些專案資訊產生一超參數組合;(b)該測試執行模組接收該超參數組合,根據該超參數組合執行一訓練測試流程,並產出一新的專案資訊,且儲存並更新該資料庫;(c)在一預定的迴圈區間,重複執行步驟(a)、(b);以及(d)輸出一優化專案結果。 A machine learning system at least includes: an application programming interface for inputting a project setting; an optimization module connected to the application programming interface, and the optimization module at least includes: a database for storing a plurality of project information ; a consultant pool for storing a plurality of consultants; and a prescription pool for storing a plurality of prescriptions; and a test execution module connected to the application programming interface and the optimization module, wherein the optimization module receives a project After the requirement, perform the following steps: (e) the optimization module summarizes the initial parameter space in the prescription pool according to the project requirement; (f) defines a first parameter space and the adjustment action of the first parameter space, and Give each adjustment action the same probability; (g) execute the project with the first parameter space setting, and record the model quantitative performance to obtain a first result; (h) randomly execute the above steps (e)~(g) to obtain a The second parameter space; (i) execute the project with the setting of the second parameter space, and record the quantitative performance of the model to obtain a second result; (j) compare the first result with the second result, if the first result is relatively If the second result is better, the probability of each adjustment action is lowered, and if the second result is better, the probability of each adjustment action is increased, and if the two results are the same, it remains unchanged; (k) Repeat steps (g)~ (j), converging the first parameter space to a better value; (l) the optimization module will converge to the first parameter space of a better value as a consultant, and store the consultant in the consultant pool ; The machine learning system includes performing the following steps: (a) the optimization module generates a hyperparameter combination based on the project information according to the selected consultant; (b) the test execution module receives the hyperparameter combination, and according to the The combination of hyperparameters executes a training and testing process, and generates a new project information, and stores and updates the database; (c) repeatedly execute steps (a) and (b) in a predetermined loop interval; and ( d) Outputting an optimization project result. 如請求項1所述之機器學習系統,其中該優化模組選取該些處方其中之一的方法至少包括增強式學習法。 The machine learning system as claimed in claim 1, wherein the method for selecting one of the prescriptions by the optimization module includes at least a reinforcement learning method. 如請求項1所述之機器學習系統,更至少包括:一使用者入口介面,透過一網路連結連接該應用程式介面,該專案需求係經由該使用者入口介面進行輸入。 The machine learning system as described in claim 1 further includes at least: a user interface connected to the application program interface through a network link, and the project requirement is input through the user interface. 如請求項1所述之機器學習系統,其中該測試執行模組更至少包括:複數個可執行函式,該測試執行模組係藉由該些可執行函式至少其中之一,執行該訓練測試流程。 The machine learning system as described in Claim 1, wherein the test execution module further includes: a plurality of executable functions, and the test execution module executes the training by at least one of the executable functions test process. 一種機器學習方法,適用於產生一優化超參數組合,其中該機器學習方法係執行於一優化模組及一測試執行模組,該優化模組更至少包括:一資料庫,用以儲存複數個專案資訊;一顧問池,用以儲存複數個顧問;以及一處方池,用以儲存複數個處方;其中該機器學習方法至少包括:(a)接收一專案需求; (b)根據該專案需求,執行下列步驟(g)~(n)後,再執行步驟(c);(g)在處方池中歸納出初始的參數空間;(h)定義一第一參數空間,及該第一參數空間的調整動作,並賦予每個調整動作具有相同機率;(i)以該第一參數空間設定執行專案,並記錄模型量化表現得到一第一結果;(j)隨機執行上述步驟(g)~(i),得到一第二參數空間;(k)以該第二參數空間設定執行專案,並記錄模型量化表現,得到一第二結果;(l)比較該第一結果與該第二結果,若該第一結果較佳,則調降每個調整動作的機率,若該第二結果較佳,則調高每個調整動作的機率,若二個結果相同則維持不變;(m)重複執行步驟(i)~(l),將該第一參數空間收斂至一較佳值;(n)將收斂至較佳值之該第一參數空間以作為一顧問,並將該顧問儲存於該顧問池;(c)該優化模組依據所選取的該顧問,基於該些專案資訊產生一超參數組合;(d)該測試執行模組接收該超參數組合,根據該超參數組合執行一訓練測試流程,並產出一新的專案資訊,且儲存並更新該資料庫;(e)在一預定的迴圈區間,重複執行步驟(c)、(d);以及(f)產出該優化超參數組合。 A machine learning method suitable for generating an optimized hyperparameter combination, wherein the machine learning method is executed in an optimization module and a test execution module, and the optimization module further includes: a database for storing a plurality of project information; a consultant pool for storing a plurality of consultants; and a prescription pool for storing a plurality of prescriptions; wherein the machine learning method at least includes: (a) receiving a project requirement; (b) According to the project requirements, perform the following steps (g)~(n), and then perform step (c); (g) summarize the initial parameter space in the prescription pool; (h) define a first parameter space , and the adjustment actions in the first parameter space, and give each adjustment action the same probability; (i) execute the project with the first parameter space settings, and record the model quantification performance to obtain a first result; (j) execute randomly The above steps (g)~(i) obtain a second parameter space; (k) execute the project with the setting of the second parameter space, and record the quantitative performance of the model to obtain a second result; (l) compare the first result With the second result, if the first result is better, the probability of each adjustment action is lowered, if the second result is better, the probability of each adjustment action is increased, and if the two results are the same, the probability of each adjustment action is maintained. (m) repeat steps (i)~(l) to converge the first parameter space to a better value; (n) use the first parameter space converged to a better value as a consultant, and storing the consultant in the consultant pool; (c) the optimization module generates a hyperparameter combination based on the project information according to the selected consultant; (d) the test execution module receives the hyperparameter combination, and according to the The combination of hyperparameters executes a training and testing process, and generates a new project information, and stores and updates the database; (e) repeatedly executes steps (c) and (d) in a predetermined loop interval; and ( f) Output the optimized hyperparameter combination. 如請求項5所述之機器學習方法,其中該優化模組選取該些處方其中之一的方法至少包括增強式學習法。 The machine learning method as claimed in claim 5, wherein the method for selecting one of the prescriptions by the optimization module includes at least a reinforcement learning method. 如請求項5所述之機器學習方法,其中該測試執行模組更至少包括:複數個可執行函式,該測試執行模組係藉由該些可執行函式至少其中之一,執行該訓練測試流程。 The machine learning method as described in Claim 5, wherein the test execution module further includes: a plurality of executable functions, and the test execution module uses at least one of the executable functions to execute the training test process. 如請求項7所述之機器學習方法,更包括:以該可執行函式,及該優化超參數組合,在一場域裝置執行機器學習。 The machine learning method as described in Claim 7 further includes: using the executable function and the optimized hyperparameter combination to execute machine learning on a field device.
TW109139863A 2020-11-16 2020-11-16 System and method of automated machine learning based on model recipes TWI787669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109139863A TWI787669B (en) 2020-11-16 2020-11-16 System and method of automated machine learning based on model recipes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109139863A TWI787669B (en) 2020-11-16 2020-11-16 System and method of automated machine learning based on model recipes

Publications (2)

Publication Number Publication Date
TW202221579A TW202221579A (en) 2022-06-01
TWI787669B true TWI787669B (en) 2022-12-21

Family

ID=83062457

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109139863A TWI787669B (en) 2020-11-16 2020-11-16 System and method of automated machine learning based on model recipes

Country Status (1)

Country Link
TW (1) TWI787669B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110210624A (en) * 2018-07-05 2019-09-06 第四范式(北京)技术有限公司 Execute method, apparatus, equipment and the storage medium of machine-learning process
CN111782637A (en) * 2020-07-03 2020-10-16 支付宝(杭州)信息技术有限公司 Model construction method, device and equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110210624A (en) * 2018-07-05 2019-09-06 第四范式(北京)技术有限公司 Execute method, apparatus, equipment and the storage medium of machine-learning process
CN111782637A (en) * 2020-07-03 2020-10-16 支付宝(杭州)信息技术有限公司 Model construction method, device and equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
期刊 Qianwen Wang, Yao Ming, Zhihua Jin, Qiaomu Shen, Dongyu Liu, Micah J. Smith, Kalyan Veeramachaneni and Huamin Qu ATMSeer: Increasing Transparency and Controllability in Automated Machine Learning 681 2019 CHI Conference on Human Factors in Computing Systems 2019 https://arxiv.org/pdf/1902.05009.pdf *
網路文獻 (DeepTech深科技 ATMSeer拯救工程師的髮際線 微文庫 2019年06月24日 https://www.gushiciku.cn/dc_tw/200980482; *

Also Published As

Publication number Publication date
TW202221579A (en) 2022-06-01

Similar Documents

Publication Publication Date Title
Maturana et al. Autonomous operator management for evolutionary algorithms
Ghattas et al. Improving business process decision making based on past experience
CN111861020A (en) Model deployment method, device, equipment and storage medium
US20070112609A1 (en) Methods and apparatus to incorporate user feedback during planning
US7562054B2 (en) Method and apparatus for automated feature selection
KR20060044772A (en) Using tables to learn trees
US20090037153A1 (en) Product design optimization method and system
US20200125945A1 (en) Automated hyper-parameterization for image-based deep model learning
Georgoulakos et al. Evolutionary multi-objective optimization of business process designs with pre-processing
US20070179917A1 (en) Intelligent design optimization method and system
Gunaratne et al. Alternate social theory discovery using genetic programming: towards better understanding the artificial anasazi
CN115689443A (en) Supply chain management method and system based on volatility clustering and block chain
Werth et al. Simulation-based optimization of material requirements planning parameters
Thamarai et al. An evolutionary computation approach for project selection in analogy based software effort estimation
Rodriguez et al. Multi-objective information retrieval-based NSGA-II optimization for requirements traceability recovery
TWI787669B (en) System and method of automated machine learning based on model recipes
Karlsson et al. Online knowledge extraction and preference guided multi-objective optimization in manufacturing
Nguyen et al. A genetic programming approach for evolving variable selectors in constraint programming
Mantovani Use of meta-learning for hyperparameter tuning of classification problems
Mu et al. Assassin: an automatic classification system based on algorithm selection
US11803464B2 (en) System for automatic identification and selection of optimization metrics and accompanying models in experimentation platforms
Silva et al. A simulated imo-drsa approach for cognitive reduction in multiobjective financial portfolio interactive optimization
CN110858504A (en) Method of generating chemical structure, neural network device, and non-transitory computer-readable recording medium
US20220391750A1 (en) System for harnessing knowledge and expertise to improve machine learning
Bissoli et al. A hybrid iterated local search metaheuristic for the flexible job shop scheduling problem