WBCHSE HS Artificial Intelligence & Data Science common mistakes
WBCHSE HS Artificial Intelligence & Data Science · Understand the traps and how to avoid them.
When asked to compare AI with conventional computing, writes that AI is simply 'faster' or 'more automated' software, or claims that every AI system learns from data.
Definitions are memorised as slogans, so the candidate never contrasts the two paradigms on inputs, rules and outputs, and cannot place rule-based systems such as early expert systems.
What to do instead
Frame the comparison explicitly: conventional programs encode hand-written rules and produce deterministic outputs from defined inputs; AI systems infer patterns or decisions from data, handle uncertainty and novel inputs, and may or may not learn. Illustrate with a rule-based tax calculator versus a trained spam classifier, then note that rule-based expert systems are still classed as AI.
Copies a nested list with b = a[:] or b = a.copy(), then modifies b[0][0] and expects the original list a to be unchanged.
Shallow copying duplicates only the outer container; the inner list objects are shared by reference, and the bug is invisible until nested data is mutated.
What to do instead
Use copy.deepcopy(a) whenever the structure is nested, or rebuild the inner lists explicitly. In the answer, state that a[:] and list.copy() create a new outer list but keep references to the same inner objects, and show a two-line example proving the aliasing.
Calls df.dropna() as the first cleaning step and continues the analysis without recording how many rows were removed or checking whether missingness is related to the target.
dropna() is the shortest code path, the notebook still runs, and the row loss is silent, so the candidate never notices that a large or biased subset has disappeared.
What to do instead
Report missing counts and percentages per column before and after cleaning, compare the target rate in rows kept versus dropped, and justify drop versus mean/median/mode versus model-based imputation. Keep a short cleaning log in the answer stating rows in, rows out and the reason.
Sees a Pearson correlation near zero and concludes that the two variables are unrelated or independent.
Pearson r measures only linear association, but candidates treat 'no linear correlation' as 'no relationship' and skip plotting.
What to do instead
Always produce a scatterplot before interpreting r, check for U-shaped or threshold patterns, outliers and restricted range, and use Spearman rank correlation or grouped summaries where appropriate. State precisely that r near zero means no linear association, not independence.
Fits a StandardScaler, imputer or feature selector on the full dataset before calling train_test_split.
It is convenient and the code runs without error, and the resulting leakage inflates the score in a way that is invisible without a proper hold-out comparison.
What to do instead
Split first, fit every transformer on the training data only, then transform validation and test sets; wrap the steps in a Pipeline so fitting happens inside each cross-validation fold. Explain in one sentence that leakage produces optimistic scores that will not survive deployment.
States that a single-layer perceptron can learn XOR, or that adding more linear layers without activations will eventually solve it.
The candidate confuses more training epochs or more layers with more representational power, and has not checked linear separability of the XOR truth table.
What to do instead
Write out the four XOR points, show that no single straight line separates the classes, and explain that a hidden layer with a non-linear activation (ReLU or sigmoid) creates the required boundary. Add that stacking linear layers without activations collapses mathematically into one linear map.
Removes all stopwords, including 'not', 'no', 'never' and 'but', before sentiment analysis.
Library default stopword lists are designed for topic retrieval, and candidates apply them blindly without checking whether the removed words carry polarity or contrast.
What to do instead
Use a custom stopword list that keeps negation and contrast terms, and preserve negation by marking it (for example turning 'not good' into a negated token) or by adding bigrams so the phrase survives vectorisation. Verify on two or three hand-checked sentences where removing 'not' flips the label.
Feeds raw uint8 pixel values in the range 0-255 directly into a neural network, or applies random augmentation to validation and test images.
Images load naturally as 0-255 arrays and training still runs, while augmentation is usually written before the split because it is convenient in the preprocessing block.
What to do instead
Convert to float32 and scale to [0,1], or standardise using statistics computed from the training set only; apply augmentation exclusively to training images and keep validation and test deterministic. Add a check that prints dtype, minimum and maximum before training begins.
Declares a dataset anonymised after deleting the name and ID columns while keeping age, PIN code, gender and visit date.
Anonymisation is treated as 'remove direct identifiers' rather than as a re-identification risk assessment, so quasi-identifiers and linkage attacks are never considered.
What to do instead
List the quasi-identifiers, test how unique their combinations are (k-anonymity), generalise or suppress them (age bands, partial PIN, month instead of date), and discuss linkage with an external voter or customer list. Document the residual risk instead of claiming the data is anonymous.
Reports the final model's score on the same rows used for tuning, or uses a random train/test split on time-ordered data such as sales or sensor readings.
The last notebook cell shows a high number and no untouched hold-out was reserved, while random splitting is the default in most tutorials even when rows are ordered by time.
What to do instead
Reserve a test set and touch it once at the end, tune on a validation set or via cross-validation, and for temporal data split by date and use forward-chaining validation. Report a naive baseline (majority class or last-value) next to the model so the improvement is measurable.