concept model parameter in category R

appears as: model parameters, model parameters, model parameter, The model parameters
R in Action, Third Edition

This is an excerpt from Manning's book R in Action, Third Edition.

Our goal is to select model parameters (intercept and slopes) that minimize the difference between actual response values and those predicted by the model. Specifically, model parameters are selected to minimize the sum of squared residuals:

Table 13.2 Functions that support glm()

Function

Description

summary()

Displays detailed results for the fitted model

coefficients(), coef()

Lists the model parameters (intercept and slopes) for the fitted model

confint()

Provides confidence intervals for the model parameters (95% by default)

residuals()

Lists the residual values in a fitted model

anova()

Generates an ANOVA table comparing two fitted models

plot()

Generates diagnostic plots for evaluating the fit of a model

predict()

Uses a fitted model to predict response values for a new dataset

deviance()

Deviance for the fitted model

df.residual()

Residual degrees of freedom for the fitted model

Machine Learning with R, the tidyverse, and mlr

This is an excerpt from Manning's book Machine Learning with R, the tidyverse, and mlr.

Machine learning models often have parameters associated with them. A parameter is a variable or value that is estimated from the data and that is internal to the model and controls how it makes predictions on new data. An example of a model parameter is the slope of a regression line.

  • The model parameters are very interpretable.
  • Listing 4.13. Converting model parameters into odds ratios
    exp(cbind(Odds_Ratio = coef(logRegModelData), confint(logRegModelData)))
    
    Waiting for profiling to be done…
                 Odds_Ratio       2.5 %       97.5 %
    (Intercept) 45.13516691 19.14718874 109.72483921
    Pclass2      0.36775262  0.20650392   0.65220841
    Pclass3      0.11854901  0.06700311   0.20885220
    Sexmale      0.06229163  0.04182164   0.09116657
    Age          0.96192148  0.94700049   0.97652950
    Fare         1.00322362  0.99872001   1.00863263
    FamSize      0.78424868  0.68315465   0.89110044
    R in Action, Second Edition: Data analysis and graphics with R

    This is an excerpt from Manning's book R in Action, Second Edition: Data analysis and graphics with R.

    By definition, regression techniques obtain model parameters that are optimal for a given set of data. In OLS regression, the model parameters are selected to minimize the sum of squared errors of prediction (residuals) and, conversely, maximize the amount of variance accounted for in the response variable (R-squared). Because the equation has been optimized for the given set of data, it won’t perform as well with a new set of data.

    We began this chapter with an example involving a research physiologist who wanted to predict the number of calories an individual will burn from the duration and intensity of their exercise, age, gender, and BMI. If you fit an OLS regression equation to this data, you’ll obtain model parameters that uniquely maximize the R-squared for this particular set of observations. But our researcher wants to use this equation to predict the calories burned by individuals in general, not only those in the original study. You know that the equation won’t perform as well with a new sample of observations, but how much will you lose? Cross-validation is a useful method for evaluating the generalizability of a regression equation.

    In cross-validation, a portion of the data is selected as the training sample, and a portion is selected as the hold-out sample. A regression equation is developed on the training sample and then applied to the hold-out sample. Because the hold-out sample wasn’t involved in the selection of the model parameters, the performance on this sample is a more accurate estimate of the operating characteristics of the model with new data.

    Table 13.2. Functions that support glm()

    Function

    Description

    summary() Displays detailed results for the fitted model
    coefficients(), coef() Lists the model parameters (intercept and slopes) for the fitted model
    confint() Provides confidence intervals for the model parameters (95% by default)
    residuals() Lists the residual values in a fitted model
    anova() Generates an ANOVA table comparing two fitted models
    plot() Generates diagnostic plots for evaluating the fit of a model
    predict() Uses a fitted model to predict response values for a new dataset
    deviance() Deviance for the fitted model
    df.residual() Residual degrees of freedom for the fitted model