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

bookChallenge: Manual Feature Centering

Compito

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.

Soluzione

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 4
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

close

Awesome!

Completion rate improved to 5.26

bookChallenge: Manual Feature Centering

Scorri per mostrare il menu

Compito

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.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 4
single

single

some-alt