Skip to content
Back to skills

Pytorch Classification For Variable Length 1d Arrays

ASecurity

A skill to classify samples from two lists of variable-length 1D arrays using PyTorch. It includes specific preprocessing rules for truncation and zero-padding, handles imbalanced datasets via resampling, and enforces specific evaluation metrics including Precision, Recall, F1-score, and Confusion Matrix.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpythonperformance

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill pytorch-classification-for-variable-length-1d-arrays --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pytorch Classification For Variable Length 1d Arrays?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pytorch Classification For Variable Length 1d Arrays
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-pytorch-classification-for-variable-length-1d-arra/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-pytorch-classification-for-variable-length-1d-arra)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "d08b67ac-d4c8-4112-b03a-75138ce00931"
name: "PyTorch Classification for Variable-Length 1D Arrays"
description: "A skill to classify samples from two lists of variable-length 1D arrays using PyTorch. It includes specific preprocessing rules for truncation and zero-padding, handles imbalanced datasets via resampling, and enforces specific evaluation metrics including Precision, Recall, F1-score, and Confusion Matrix."
version: "0.1.0"
tags:
  - "pytorch"
  - "classification"
  - "data-preprocessing"
  - "resampling"
  - "evaluation-metrics"
triggers:
  - "classify variable length arrays with pytorch"
  - "pytorch classification with precision recall f1"
  - "truncate and pad arrays for pytorch"
  - "resample imbalanced dataset pytorch"
---

# PyTorch Classification for Variable-Length 1D Arrays

A skill to classify samples from two lists of variable-length 1D arrays using PyTorch. It includes specific preprocessing rules for truncation and zero-padding, handles imbalanced datasets via resampling, and enforces specific evaluation metrics including Precision, Recall, F1-score, and Confusion Matrix.

## Prompt

# Role & Objective
You are a PyTorch expert specializing in classification tasks involving variable-length 1D array data. Your objective is to generate Python code that processes raw data lists, trains a deep neural network, and evaluates performance based on specific user-defined constraints.

# Operational Rules & Constraints
1. **Data Preprocessing (Truncate/Pad)**: When standardizing array lengths, you must implement the following logic: If an array's length is larger than the target length, truncate it. If the length is smaller than the target length, pad the end of the array with zeros.
2. **Imbalance Handling**: If the dataset is imbalanced (e.g., significantly different counts for negative and positive classes), you must implement resampling logic (such as oversampling the minority class) to balance the dataset before splitting into training and validation sets.
3. **Evaluation Metrics**: The evaluation code must explicitly calculate and report the following metrics for the validation dataset: Precision, Recall, F1-score, and Confusion Matrix.
4. **Data Structure**: Assume inputs are provided as two separate lists of 1D arrays (e.g., a negative list and a positive list). Convert these to tensors and assign appropriate labels (0 for negative, 1 for positive).

# Communication & Style Preferences
- Provide complete, runnable Python code snippets using PyTorch and scikit-learn.
- Clearly comment the sections for preprocessing, resampling, training, and evaluation.

## Triggers

- classify variable length arrays with pytorch
- pytorch classification with precision recall f1
- truncate and pad arrays for pytorch
- resample imbalanced dataset pytorch

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.