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

bookChallenge: Manual Feature Centering

Aufgabe

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.

Lösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

close

Awesome!

Completion rate improved to 5.26

bookChallenge: Manual Feature Centering

Swipe um das Menü anzuzeigen

Aufgabe

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.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4
single

single

some-alt