Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Manual Feature Centering | Foundations of Feature Scaling
Feature Scaling and Normalization Deep Dive

bookChallenge: Manual Feature Centering

Tehtävä

Swipe to start coding

You are given a small dataset X as a NumPy array of shape (n_samples, n_features). Your goal is to manually center each feature (column) by subtracting its mean, without using scikit-learn. Use vectorized NumPy operations.

  1. Compute the per-feature means as a 1D array feature_means of shape (n_features,).
  2. Create X_centered = X - feature_means using broadcasting.
  3. Compute column means of X_centered to verify they are approximately zero.
  4. Do not use loops and do not modify X in place.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 4
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

close

Awesome!

Completion rate improved to 5.26

bookChallenge: Manual Feature Centering

Pyyhkäise näyttääksesi valikon

Tehtävä

Swipe to start coding

You are given a small dataset X as a NumPy array of shape (n_samples, n_features). Your goal is to manually center each feature (column) by subtracting its mean, without using scikit-learn. Use vectorized NumPy operations.

  1. Compute the per-feature means as a 1D array feature_means of shape (n_features,).
  2. Create X_centered = X - feature_means using broadcasting.
  3. Compute column means of X_centered to verify they are approximately zero.
  4. Do not use loops and do not modify X in place.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 4
single

single

some-alt