Vector Motion
AI/ML

Sensitivity Card - Model Responsiveness

Monitor model sensitivity metrics and response characteristics. Analyze model behavior changes and system responsiveness.

Sensitivity Card

The Sensitivity Card displays model sensitivity (recall) metrics, showing the model's ability to correctly identify positive cases.

Preview

Installation

npx shadcn@latest add https://vectormotion.vercel.app/registry/sensitivity-card.json
Sensitivity Card
'use client'import React from 'react';import { Microscope } from 'lucide-react';import { motion } from 'motion/react';import { clsx, type ClassValue } from "clsx"import { twMerge } from "tailwind-merge"import { ResponsiveContainer, RadarChart, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar, Tooltip } from 'recharts';function cn(...inputs: ClassValue[]) {   return twMerge(clsx(inputs))}interface SensitivityData {   param: string;   sens: number;   fullMark: number;   [key: string]: any;}interface SensitivityCardProps {   className?: string;   title?: string;   subtitle?: string;   data?: SensitivityData[];}const DEFAULT_DATA: SensitivityData[] = [   { param: 'Input A', sens: 85, fullMark: 100 },   { param: 'Input B', sens: 45, fullMark: 100 },   { param: 'Input C', sens: 60, fullMark: 100 },   { param: 'Input D', sens: 90, fullMark: 100 },   { param: 'Input E', sens: 30, fullMark: 100 },];const DEFAULT_TITLE = "Sensitivity";const DEFAULT_SUBTITLE = "Parameter Impact";export const SensitivityCard: React.FC<SensitivityCardProps> = ({   className = "",   title = DEFAULT_TITLE,   subtitle = DEFAULT_SUBTITLE,   data = DEFAULT_DATA,}) => {   return (      <motion.div         initial={{ opacity: 0, y: 20 }}         animate={{ opacity: 1, y: 0 }}         transition={{ duration: 0.5, delay: 0.3 }}         className={cn(            "relative overflow-hidden rounded-2xl border border-border bg-card text-card-foreground shadow-sm transition-all hover:border-pink-300 dark:hover:border-pink-700 hover:shadow-md flex flex-col h-full",            className         )}      >         <div className="p-5 flex flex-col h-full relative z-10">            <div className="mb-4 flex items-start justify-between">               <div>                  <h3 className="font-bold text-lg text-foreground">                     {title}                  </h3>                  <p className="text-sm text-muted-foreground font-medium">                     {subtitle}                  </p>               </div>               <div className="rounded-lg border-2 border-pink-100 dark:border-pink-800 p-2 text-pink-500 dark:text-pink-400 flex items-center justify-center">                  <Microscope className="h-5 w-5" />               </div>            </div>            <div className="flex-1 w-full min-h-[160px] relative -ml-2">               <ResponsiveContainer width="100%" height="100%">                  <RadarChart cx="50%" cy="50%" outerRadius="70%" data={data}>                     <PolarGrid stroke="#e4e4e7" strokeOpacity={0.5} />                     <PolarAngleAxis                        dataKey="param"                        tick={{ fontSize: 9, fill: '#71717a', fontWeight: 600 }}                     />                     <PolarRadiusAxis angle={30} domain={[0, 100]} tick={false} axisLine={false} />                     <Radar                        name="Sensitivity"                        dataKey="sens"                        stroke="#ec4899"                        strokeWidth={2}                        fill="#ec4899"                        fillOpacity={0.3}                     />                     <Tooltip                        cursor={false}                        content={() => null}                     />                  </RadarChart>               </ResponsiveContainer>            </div>            <div className="absolute -bottom-4 -right-4 z-0 opacity-5 pointer-events-none">               <Microscope className="w-40 h-40 text-pink-500" />            </div>         </div>      </motion.div>   );};

Props

Prop

Type

Usage

This component is a demo card displaying sensitivity metrics with animated visualizations and dark mode support.