Answers.Body: <p>You're probably looking for <em>regression</em>, either <em>linear</em> or <em>non-linear</em>, which usually refers to a set of methods that can be used to predict a continuous (or numerical) value (the value of the so-called <em>dependent variable</em>), given one or more possibly numerical values (the values of the independent variables). (The other common task is called <em>classification</em>, where the outcome variable is discrete.)</p>
  
  <p>The dependent and independent variables can also be vectors. In that case, it is called <em>multivariate</em> linear or non-linear regression. If there is more than one independent variable (or, also called, <em>predictor</em>), then it is called <em>multivariable (or multiple) linear or non-linear regression</em>. See, for example, <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3518362/" rel="nofollow noreferrer">Multivariate or Multivariable Regression?</a> (2013), by Bertha Hidalgo and Melody Goodman.</p>
  
  <p>In <a href="https://en.wikipedia.org/wiki/Linear_regression" rel="nofollow noreferrer">linear regression</a>, the dependent variable is assumed to be a <a href="https://en.wikipedia.org/wiki/Linear_combination" rel="nofollow noreferrer">linear combination</a> of the independent variables, while, in <a href="https://en.wikipedia.org/wiki/Nonlinear_regression" rel="nofollow noreferrer">non-linear regression</a>, it is assumed to be a non-linear combination (which is any combination or relationship that is not linear).</p>
  
  <p>The independent variables (or predictors) do not actually need to be independent of each other and, of course, the dependent variable does not need to be independent of the predictors (otherwise you would not be able to predict the value of the dependent variable, given the predictors), so the expression <em>predictor</em> is possibly more appropriate than <em>independent variable</em>. See, for example, <a href="https://stats.stackexchange.com/a/357746/82135">In Regression Analysis, why do we call independent variables "independent"?</a>, by Frank Harrell. However, the dependent variable is assumed to be dependent on the independent variables, so you could think of the independent variables as the variables that are not the dependent variables (if this helps you to memorize the concept).</p>
  
  <p>There are more <a href="https://en.wikipedia.org/wiki/Dependent_and_independent_variables" rel="nofollow noreferrer">synonyms for the dependent and independent variables</a>, depending on the context or area. For example, the predictors (or independent variables) can also be called <em>covariates</em>, <em>regressors</em> or <em>explanatory variables</em>. The dependent variable can also be called <em>regressand, outcome variable</em>, or <em>explainable variable</em>.</p>
  
  <p>There are other types of regression models. In particular, there is the <a href="https://en.wikipedia.org/wiki/Generalized_linear_model" rel="nofollow noreferrer">generalized regression model</a> (GLM), which is (as the name suggests) a generalization of several regression models. The famous logistic regression (where the outcome is actually binomial or binary, so discrete) is an application of the generalized regression model, where the <em>link function</em> (which is a concept that is used in the context of GLMs) is the <a href="https://en.wikipedia.org/wiki/Logit" rel="nofollow noreferrer">logit function</a>. See, for example, <a href="https://stats.stackexchange.com/q/88603/82135">Why is logistic regression a linear model?</a>. Note that linear regression is also an application of a GLM. See also this article <a href="https://scikit-learn.org/stable/supervised_learning.html" rel="nofollow noreferrer">1.1. Generalized Linear Models</a>, which gives you an overview of different GLMs.</p>
  
  <p>Have also a look at this article <a href="https://statisticsbyjim.com/regression/choosing-regression-analysis/" rel="nofollow noreferrer">Choosing the Correct Type of Regression Analysis</a>, which provides a few guidelines to help you choose the most appropriate regression model for your task. </p>
  
  <p>In Python, you could use, for example, <a href="https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html" rel="nofollow noreferrer"><code>sklearn.linear_model.LinearRegression</code></a>. The Python library <a href="https://scikit-learn.org/stable/" rel="nofollow noreferrer"><code>sklearn</code></a> provides several other regressors. For example, <a href="https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.AdaBoostRegressor.html" rel="nofollow noreferrer"><code>sklearn.ensemble.AdaBoostRegressor</code></a> or <a href="https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestRegressor.html" rel="nofollow noreferrer"><code>sklearn.ensemble.RandomForestRegressor</code></a>. (Of course, you will need a training dataset to train these regressors, when calling their method <a href="https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html#sklearn.linear_model.LinearRegression.fit" rel="nofollow noreferrer"><code>fit</code></a>).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-12T23:12:56.077Z
Answers.LastActivityDate: 2019-07-13T13:55:58.717Z
Answers.LastEditDate: 2019-07-13T13:55:58.717Z
Answers.UserDisplayName: nbro
Body: <p>I need a model that will take in a few numerical parameters, and give back a numerical answer (Context: predicting a slope based on environmental factors without having to actually take measurements to find the slope). </p>
  
  <p>However, I am lost, given that I have not found (on the web) any model that is able to solve this task. If someone can suggest a type of model that would be able to solve this type of problem, I would greatly appreciate it. Resources and libraries would also be useful if you care to suggest any. I'm using Python.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-07-12T20:48:39.963Z
Comments.Text: Welcome to SE:AI!  It would be ideal if we could mention the problem in the question header.  (Better for search and should help attract answers.)
Comments.UserDisplayName: DukeZhou
Tags: <machine-learning><python><definitions><regression>
Title: Which models accept numerical parameters and produce a numerical output?
UserDisplayName: cjm333
ThreadText: # Which models accept numerical parameters and produce a numerical output?
  
  (Asked by: username_0 on 2019-07-12)
  
  I need a model that will take in a few numerical parameters, and give back a numerical answer (Context: predicting a slope based on environmental factors without having to actually take measurements to find the slope).
  
  However, I am lost, given that I have not found (on the web) any model that is able to solve this task. If someone can suggest a type of model that would be able to solve this type of problem, I would greatly appreciate it. Resources and libraries would also be useful if you care to suggest any. I'm using Python.
  
  **Tags:** machine-learning, python, definitions, regression
  > **Comments:**
  > **username_1**: Welcome to SE:AI!  It would be ideal if we could mention the problem in the question header.  (Better for search and should help attract answers.)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-07-12. Score: 2 | Accepted answer
  
  You're probably looking for *regression*, either *linear* or *non-linear*, which usually refers to a set of methods that can be used to predict a continuous (or numerical) value (the value of the so-called *dependent variable*), given one or more possibly numerical values (the values of the independent variables). (The other common task is called *classification*, where the outcome variable is discrete.)
  
  The dependent and independent variables can also be vectors. In that case, it is called *multivariate* linear or non-linear regression. If there is more than one independent variable (or, also called, *predictor*), then it is called *multivariable (or multiple) linear or non-linear regression*. See, for example, [Multivariate or Multivariable Regression?](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3518362/) (2013), by Bertha Hidalgo and Melody Goodman.
  
  In [linear regression](https://en.wikipedia.org/wiki/Linear_regression), the dependent variable is assumed to be a [linear combination](https://en.wikipedia.org/wiki/Linear_combination) of the independent variables, while, in [non-linear regression](https://en.wikipedia.org/wiki/Nonlinear_regression), it is assumed to be a non-linear combination (which is any combination or relationship that is not linear).
  
  The independent variables (or predictors) do not actually need to be independent of each other and, of course, the dependent variable does not need to be independent of the predictors (otherwise you would not be able to predict the value of the dependent variable, given the predictors), so the expression *predictor* is possibly more appropriate than *independent variable*. See, for example, [In Regression Analysis, why do we call independent variables "independent"?](https://stats.stackexchange.com/a/357746/82135), by Frank Harrell. However, the dependent variable is assumed to be dependent on the independent variables, so you could think of the independent variables as the variables that are not the dependent variables (if this helps you to memorize the concept).
  
  There are more [synonyms for the dependent and independent variables](https://en.wikipedia.org/wiki/Dependent_and_independent_variables), depending on the context or area. For example, the predictors (or independent variables) can also be called *covariates*, *regressors* or *explanatory variables*. The dependent variable can also be called *regressand, outcome variable*, or *explainable variable*.
  
  There are other types of regression models. In particular, there is the [generalized regression model](https://en.wikipedia.org/wiki/Generalized_linear_model) (GLM), which is (as the name suggests) a generalization of several regression models. The famous logistic regression (where the outcome is actually binomial or binary, so discrete) is an application of the generalized regression model, where the *link function* (which is a concept that is used in the context of GLMs) is the [logit function](https://en.wikipedia.org/wiki/Logit). See, for example, [Why is logistic regression a linear model?](https://stats.stackexchange.com/q/88603/82135). Note that linear regression is also an application of a GLM. See also this article [1.1. Generalized Linear Models](https://scikit-learn.org/stable/supervised_learning.html), which gives you an overview of different GLMs.
  
  Have also a look at this article [Choosing the Correct Type of Regression Analysis](https://statisticsbyjim.com/regression/choosing-regression-analysis/), which provides a few guidelines to help you choose the most appropriate regression model for your task.
  
  In Python, you could use, for example, [`sklearn.linear_model.LinearRegression`](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html). The Python library [`sklearn`](https://scikit-learn.org/stable/) provides several other regressors. For example, [`sklearn.ensemble.AdaBoostRegressor`](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.AdaBoostRegressor.html) or [`sklearn.ensemble.RandomForestRegressor`](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestRegressor.html). (Of course, you will need a training dataset to train these regressors, when calling their method [`fit`](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html#sklearn.linear_model.LinearRegression.fit)).
  
  
  ---
  
  