# - Model Application

Using logistic regression in MLlib to fit the training dataframe.

## We'll cover the following

## Logistic regression

Now that we have prepared our training and test datasets, we can use the logistic regression algorithm provided by MLlib to fit the training dataframe.

- We first create a logistic regression object and define the columns to use as labels and features.
- Next, we use the
`fit`

function to train the model on the training dataset. - In the last step in the snippet below, we use the
`transform`

function to apply the model to our test dataset.

Get hands-on with 1200+ tech skills courses.