liveBook · Manning

Objective function

As explained in Statistics Slam Dunk

An objective function is the mathematical function or criterion that an optimization procedure seeks to minimize or maximize.

An objective function is the function an optimization procedure seeks to minimize or maximize. Constraints limit which solutions the procedure may choose. section 4.1 section 4.8

For an NBA roster decision, the objective is total win shares. The optimization must still satisfy roster, salary, and age requirements. section 4.8 section 4.0

co_object <-
 lp(const.mat = constraint_matrix,
    objective = free_agents_sort$win_shares,
    direction = "max",
    const.rhs = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 90000000, 150), 
    const.dir = c("<=", ">=","<=", ">=", "<=", ">=", 
                  "<=", ">=", "<=", ">=", "<=", "<=", "<="), 
    int.vec = 1:24, all.bin = TRUE)

Set the objective to free-agent win shares and maximize it while passing the roster constraints to lp(). section 4.8

Selecting the five free agents

The solution selects five players with one player at each position, 25.5 expected win shares, $89.5 million in salaries, and an average age of 28.4.

How Statistics Slam Dunk covers it

How deep it goes
Defines the objective and demonstrates its lp() implementation, but does not develop the underlying optimization mathematics.
Examples
Uses an NBA free-agent roster, an lp() call, selected-player output, total win shares, salary, and average age.
What it assumes
Assumes a defined function, candidate variables, and constraints, while introducing constrained optimization through a practical roster problem.
What you can do after
Apply it via lpSolve to maximize win shares for a roster that satisfies explicitly specified constraints.
How it connects
Connects objective functions with constrained optimization, linear programming, constraints, and win shares.

Also explained in

Compare how 30 books explain objective function →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.