MulaiMulai sekarang secara gratis

Validation of normalization

For this exercise, we will perform a z-score normalization and verify that it was performed correctly.

A distinct characteristic of normalized values is that they have a mean equal to zero and standard deviation equal to one.

After you apply the normalization transformation, you can group again on the same variable, and then check the mean and the standard deviation of each group.

You will apply the normalization transformation to every numeric variable in the poker_grouped dataset, which is the poker_hands dataset grouped by Class.

Latihan ini adalah bagian dari kursus

Writing Efficient Code with pandas

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

zscore = lambda x: (x - x.mean()) / x.std()

# Apply the transformation
poker_trans = ____.____(____)
print(poker_trans.head())
Edit dan Jalankan Kode