Aan de slagBegin gratis

Specify ALS hyperparameters

You're now going to build your first implicit rating recommendation engine using ALS. To do this, you will first tell Spark what values you want it to try when finding the best model.

Four empty lists are provided below. You will fill them with specific values that Spark can use to build several different ALS models. In the next exercise, you'll tell Spark to build out these models using the lists below.

Deze oefening maakt deel uit van de cursus

Building Recommendation Engines with PySpark

Bekijk cursus

Oefeninstructies

  • Fill in the following lists with the following values:
    • ranks = [10, 20, 30, 40]
    • maxIters = [10, 20, 30, 40]
    • regParams = [.05, .1, .15]
    • alphas = [20, 40, 60, 80]

Interactieve oefening met praktijkervaring

Probeer deze oefening door deze voorbeeldcode aan te vullen.

# Complete the lists below
ranks = [____, ____, ____, ____]
maxIters = [____, ____, ____, ____]
regParams = [____, ____, ____]
alphas = [____, ____, ____, ____]
Code bewerken en uitvoeren