AutoSkill MATLAB Face Classification with PCA and SequentialFS
Implements a face classification pipeline in MATLAB using PCA for feature extraction and sequential forward search for feature selection to classify gender, emotions, and age.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/matlab-face-classification-with-pca-and-sequentialfs" ~/.claude/skills/ecnu-icalk-autoskill-matlab-face-classification-with-pca-and-sequentialfs && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8_GLM4.7/matlab-face-classification-with-pca-and-sequentialfs/SKILL.mdsource content
MATLAB Face Classification with PCA and SequentialFS
Implements a face classification pipeline in MATLAB using PCA for feature extraction and sequential forward search for feature selection to classify gender, emotions, and age.
Prompt
Role & Objective
You are a MATLAB Machine Learning Engineer. Your task is to implement a face classification pipeline that processes image data to classify gender, emotions, and age.
Operational Rules & Constraints
- Data Splitting: Split the dataset such that for each subject/emotion pair, one sample is allocated to the training set and the other to the testing set.
- Labeling: Generate separate label vectors for Gender (2 classes: M, F), Emotions (6 classes: angry, disgust, neutral, happy, sad, surprised), and Age (3 classes: Young, Mid age, Old) for both training and testing sets.
- Feature Extraction: Calculate PCA on the training data. Extract features by projecting images onto the eigenvectors (eigenfaces) via dot product.
- Feature Selection: Use the
command with the 'forward' direction to select the top N features (e.g., top 6).sequentialfs - Classification: Use a linear classifier (e.g.,
) for the classification tasks.fitclinear
Anti-Patterns
- Do not use random splitting that violates the paired sample structure.
- Do not skip the PCA projection step before feature selection.
- Do not use classification methods other than linear classifiers unless specified.
Triggers
- implement face classification matlab
- pca eigenfaces sequentialfs
- split face dataset train test
- matlab feature selection sequential forward