machine learning in matlab -凯发k8网页登录

main content

machine learning in matlab

what is machine learning?

machine learning teaches computers to do what comes naturally to humans: learn from experience. machine learning algorithms use computational methods to “learn” information directly from data without relying on a predetermined equation as a model. the algorithms adaptively improve their performance as the number of samples available for learning increases.

machine learning uses two types of techniques: supervised learning (such as classification and regression), which trains a model on known input and output data so that it can predict future outputs, and unsupervised learning (such as clustering), which finds hidden patterns or intrinsic structures in input data.

categorization of machine learning techniques

the aim of supervised machine learning is to build a model that makes predictions based on evidence in the presence of uncertainty. a supervised learning algorithm takes a known set of input data and known responses to the data (output) and trains a model to generate reasonable predictions for the response to new data. supervised learning uses classification and regression techniques to develop predictive models.

  • classification techniques predict categorical responses, for example, whether an email is genuine or spam, or whether a tumor is cancerous or benign. classification models classify input data into categories. typical applications include medical imaging, image and speech recognition, and credit scoring.

  • regression techniques predict continuous responses, for example, changes in temperature or fluctuations in power demand. typical applications include electricity load forecasting and algorithmic trading.

unsupervised learning finds hidden patterns or intrinsic structures in data. it is used to draw inferences from datasets consisting of input data without labeled responses. clustering is the most common unsupervised learning technique. it is used for exploratory data analysis to find hidden patterns or groupings in data. applications for clustering include gene sequence analysis, market research, and object recognition.

selecting the right algorithm

choosing the right algorithm can seem overwhelming—there are dozens of supervised and unsupervised machine learning algorithms, and each takes a different approach to learning. there is no best method or one size fits all. finding the right algorithm is partly based on trial and error—even highly experienced data scientists cannot tell whether an algorithm will work without trying it out. highly flexible models tend to overfit data by modeling minor variations that could be noise. simple models are easier to interpret but might have lower accuracy. therefore, choosing the right algorithm requires trading off one benefit against another, including model speed, accuracy, and complexity. trial and error is at the core of machine learning—if one approach or algorithm does not work, you try another. matlab® provides tools to help you try out a variety of machine learning models and choose the best.

examples of machine learning algorithms. classification algorithms include support vector machines, discriminant analysis, naive bayes, nearest neighbor, and neural networks. regression algorithms include linear regression, glm, svr, gpr, ensemble methods, decision trees, and neural networks. clustering algorithms include k-means, k-medoids, fuzzy c-means, hierarchical, gaussian mixture, hidden markov model, and neural networks.

to find matlab apps and functions to help you solve machine learning tasks, consult the following table. some machine learning tasks are made easier by using apps, and others use command-line features.

taskmatlab apps and functionsproductlearn more
classification to predict categorical responses

use the classification learner app to automatically train a selection of models and help you choose the best. you can generate matlab code to work with scripts.

for more options, you can use the command-line interface.

statistics and machine learning toolbox™

train classification models in classification learner app

classification functions

regression to predict continuous responses

use the regression learner app to automatically train a selection of models and help you choose the best. you can generate matlab code to work with scripts and other function options.

for more options, you can use the command-line interface.

statistics and machine learning toolbox

train regression models in regression learner app

regression functions

clusteringuse cluster analysis functions.statistics and machine learning toolboxcluster analysis
computational finance tasks such as credit scoringuse tools for modeling credit risk analysis.financial toolbox™ and risk management toolbox™credit risk (financial toolbox)
deep learning with neural networks for classification and regressionuse pretrained networks and functions to train convolutional neural networks.deep learning toolbox™deep learning in matlab (deep learning toolbox)
facial recognition, motion detection, and object detectionuse deep learning tools for image processing and computer vision.deep learning toolbox and computer vision toolbox™recognition, object detection, and semantic segmentation (computer vision toolbox)

the following systematic machine learning workflow can help you tackle machine learning challenges. you can complete the entire workflow in matlab.

machine learning workflow. step 1: access and load the data. step 2: preprocess the data. step 3: derive features using the preprocessed data. step 4: train models using the features derived in step 3. step 5: iterate to find the best model. step 6. integrate the best-trained model into a production system.

to integrate the best trained model into a production system, you can deploy statistics and machine learning toolbox machine learning models using matlab compiler™. for many models, you can generate c-code for prediction using matlab coder™.

train classification models in classification learner app

use the classification learner app to train models to classify data using supervised machine learning. the app lets you explore supervised machine learning interactively using various classifiers.

  • automatically train a selection of models to help you choose the best model. model types include decision trees, discriminant analysis, support vector machines, logistic regression, nearest neighbors, naive bayes, kernel approximation, ensemble, and neural network classifiers.

  • explore your data, specify validation schemes, select features, and visualize results. by default, the app protects against overfitting by applying cross-validation. alternatively, you can select holdout validation. validation results help you choose the best model for your data. plots and performance measures reflect the validated model results.

  • export models to the workspace to make predictions with new data. the app always trains a model on full data in addition to a model with the specified validation scheme, and the full model is the model you export.

  • generate matlab code from the app to create scripts, train with new data, work with huge data sets, or modify the code for further analysis.

to learn more, see train classification models in classification learner app.

classification learner app

for more options, you can use the command-line interface. see classification.

train regression models in regression learner app

use the regression learner app to train models to predict continuous data using supervised machine learning. the app lets you explore supervised machine learning interactively using various regression models.

  • automatically train a selection of models to help you choose the best model. model types include linear regression models, regression trees, gaussian process regression models, support vector machines, kernel approximation models, ensembles of regression trees, and neural network regression models.

  • explore your data, select features, and visualize results. similar to classification learner, the regression learner applies cross-validation by default. the results and visualizations reflect the validated model. use the results to choose the best model for your data.

  • export models to the workspace to make predictions with new data. the app always trains a model on full data in addition to a model with the specified validation scheme, and the full model is the model you export.

  • generate matlab code from the app to create scripts, train with new data, work with huge data sets, or modify the code for further analysis.

to learn more, see train regression models in regression learner app.

regression learner app

for more options, you can use the command-line interface. see regression.

train neural networks for deep learning

deep learning toolbox enables you to perform deep learning with convolutional neural networks for classification, regression, feature extraction, and transfer learning. the toolbox provides simple matlab commands for creating and interconnecting the layers of a deep neural network. examples and pretrained networks make it easy to use matlab for deep learning, even without extensive knowledge of advanced computer vision algorithms or neural networks.

to learn more, see deep learning in matlab (deep learning toolbox).

related topics

external websites

    网站地图