| | <!DOCTYPE html> |
| | <html lang="en"> |
| | <head> |
| | <meta charset="UTF-8"> |
| | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | <title>Interactive Report: Marathi Sentence Similarity</title> |
| | -- |
| | <script src="https://cdn.tailwindcss.com"></script> |
| | <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> |
| | <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet"> |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | <style> |
| | body { |
| | font-family: 'Inter', sans-serif; |
| | background-color: #121212; |
| | color: #E0E0E0; |
| | } |
| | p { |
| | text-align: justify; |
| | } |
| | .text-center p { |
| | text-align: center; |
| | } |
| | .nav-button { |
| | transition: all 0.3s ease; |
| | border-bottom: 2px solid transparent; |
| | } |
| | .nav-button.active { |
| | border-bottom-color: #80BFFF; |
| | color: #80BFFF; |
| | } |
| | .card { |
| | background-color: #1E1E1E; |
| | border-radius: 0.75rem; |
| | box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2); |
| | transition: transform 0.3s ease, box-shadow 0.3s ease; |
| | } |
| | .chart-container { |
| | position: relative; |
| | width: 100%; |
| | max-width: 800px; |
| | margin-left: auto; |
| | margin-right: auto; |
| | height: 400px; |
| | max-height: 50vh; |
| | } |
| | |
| | .metric-btn { |
| | padding: 0.75rem 1.5rem; |
| | border-radius: 0.5rem; |
| | font-weight: 600; |
| | transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; |
| | border: 1px solid #4B5563; |
| | background-color: #374151; |
| | color: #E0E0E0; |
| | cursor: pointer; |
| | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); |
| | } |
| | .metric-btn:hover { |
| | background-color: #4B5563; |
| | color: #FFFFFF; |
| | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); |
| | } |
| | .metric-btn.active { |
| | background-color: #80BFFF; |
| | color: #121212; |
| | border-color: #80BFFF; |
| | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); |
| | } |
| | .feature-box, .insight-box { |
| | background-color: #2A2A2A; |
| | border-radius: 0.5rem; |
| | padding: 1.5rem; |
| | box-shadow: 0 2px 4px -1px rgb(0 0 0 / 0.2), 0 1px 2px -1px rgb(0 0 0 / 0.1); |
| | display: flex; |
| | flex-direction: column; |
| | justify-content: flex-start; |
| | align-items: flex-start; |
| | text-align: justify; |
| | } |
| | .feature-box strong, .insight-box strong { |
| | color: #80BFFF; |
| | margin-bottom: 0.5rem; |
| | font-size: 1.125rem; |
| | text-align: left; |
| | width: 100%; |
| | } |
| | .feature-box p, .insight-box p { |
| | font-size: 0.95rem; |
| | color: #C0C0C0; |
| | text-align: justify; |
| | } |
| | .gradio-iframe { |
| | width: 100%; |
| | height: 500px; |
| | border: 1px solid #4B5563; |
| | border-radius: 0.75rem; |
| | } |
| | </style> |
| | </head> |
| | <body class="antialiased"> |
| | <div class="container mx-auto px-4 py-8 sm:px-6 lg:px-8"> |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | <main> |
| | <div id="overview" class="page-section space-y-8"> |
| | <div class="card p-6 md:p-8"> |
| | <h2 class="text-2xl font-bold text-gray-50 mb-4 text-center">Project Summary</h2> |
| | <p class="text-gray-300 leading-relaxed mb-6"> |
| | Natural Language Processing (NLP) has made incredible strides, but many advancements are for high-resource languages like English. This project addresses the challenge of building effective tools for Marathi, a language spoken by over 99 million people. The goal was to find and enhance the best AI model for understanding semantic similarity between Marathi sentences. This interactive report walks you through the process, from benchmarking existing models to fine-tuning a champion and testing its resilience. |
| | </p> |
| | <div class="grid grid-cols-1 md:grid-cols-3 gap-6 text-center"> |
| | <div class="bg-blue-900 rounded-lg p-6"> |
| | <span class="text-4xl font-bold text-blue-200">6</span> |
| | <p class="text-gray-200 mt-2">Models Benchmarked</p> |
| | </div> |
| | <div class="bg-green-900 rounded-lg p-6"> |
| | <span class="text-4xl font-bold text-green-200">92%</span> |
| | <p class="text-gray-200 mt-2">Accuracy</p> |
| | </div> |
| | <div class="bg-orange-900 rounded-lg p-6"> |
| | <span class="text-4xl font-bold text-orange-200">0.98</span> |
| | <p class="text-gray-200 mt-2">Final Pearson Correlation</p> |
| | </div> |
| | </div> |
| | </div> |
| |
|
| | <div class="card p-6 md:p-8"> |
| | <h2 class="text-2xl font-bold text-gray-50 mb-4 text-center">The Research Journey</h2> |
| | <p class="text-gray-300 leading-relaxed mb-6"> |
| | This research followed a structured, three-phase approach to systematically identify and improve upon the best model for the task. This visual guide outlines the steps we will explore in detail throughout this report. |
| | </p> |
| | <div class="flex flex-col md:flex-row items-center justify-center space-y-4 md:space-y-0 md:space-x-4 text-center"> |
| | <div class="flex-1 p-4 bg-gray-800 rounded-lg"> |
| | <div class="text-2xl font-bold text-blue-400 mb-2">1</div> |
| | <h3 class="font-semibold text-gray-100">Benchmark</h3> |
| | <p class="text-sm text-gray-300">Compared six pre-trained models to find the best baseline.</p> |
| | </div> |
| | <div class="text-2xl text-gray-500 font-light hidden md:block">→</div> |
| | <div class="flex-1 p-4 bg-gray-800 rounded-lg"> |
| | <div class="text-2xl font-bold text-blue-400 mb-2">2</div> |
| | <h3 class="font-semibold text-gray-100">Enhance</h3> |
| | <p class="text-sm text-gray-300">Fine-tuned the top model on a larger Marathi dataset.</p> |
| | </div> |
| | <div class="text-2xl text-gray-500 font-light hidden md:block">→</div> |
| | <div class="flex-1 p-4 bg-gray-800 rounded-lg"> |
| | <div class="text-2xl font-bold text-blue-400 mb-2">3</div> |
| | <h3 class="font-semibold text-gray-100">Test Robustness</h3> |
| | <p class="text-sm text-gray-300">Evaluated performance on grammatically flawed text.</p> |
| | </div> |
| | </div> |
| | </div> |
| |
|
| | <div class="card p-6 md:p-8"> |
| | <h2 class="text-2xl font-bold text-gray-50 mb-2 text-center">Phase 1: Finding the Best Baseline Model</h2> |
| | <p class="text-gray-300 leading-relaxed mb-6"> |
| | The first step was to establish a performance baseline. We evaluated six different pre-trained transformer models on a standard set of 200 human-annotated Marathi sentence pairs. The models included both multilingual options and one specifically pre-trained on Marathi text (L3Cube-MahaBERT). The chart below shows their performance across different metrics. Use the buttons to switch between Pearson Correlation (higher is better), Mean Squared Error (lower is better), and Accuracy. |
| | </p> |
| | <div class="text-center mb-6"> |
| | <button id="btn-pearson" class="metric-btn active">Pearson Correlation</button> |
| | <button id="btn-mse" class="metric-btn ml-2">Mean Squared Error</button> |
| | <button id="btn-accuracy" class="metric-btn ml-2">Accuracy</button> |
| | </div> |
| | <div class="chart-container"> |
| | <canvas id="benchmarkChart"></canvas> |
| | </div> |
| | <p id="benchmark-context" class="mt-4 text-center text-gray-300">The results clearly show that L3Cube-MahaBERT, the monolingual Marathi model, significantly outperforms the multilingual models, achieving the highest correlation with human judgments.</p> |
| | </div> |
| |
|
| | <div class="card p-6 md:p-8"> |
| | <h2 class="text-2xl font-bold text-gray-50 mb-2 text-center">Phase 2: Enhancing the Champion with Fine-Tuning</h2> |
| | <p class="text-gray-300 leading-relaxed mb-6"> |
| | After identifying L3Cube-MahaBERT as the strongest baseline model, the next step was to enhance its performance further. We fine-tuned the model on a larger dataset of approximately 5,700 Marathi sentence pairs. This process adapts the model's general language understanding to the specific task of semantic similarity. The chart below illustrates the significant performance improvement across all six key evaluation metrics after this fine-tuning process. |
| | </p> |
| | <div class="chart-container"> |
| | <canvas id="finetuneChart"></canvas> |
| | </div> |
| | </div> |
| |
|
| | <div class="card p-6 md:p-8"> |
| | <h2 class="text-2xl font-bold text-gray-50 mb-2 text-center">Phase 3: The Ultimate Test of Robustness</h2> |
| | <p class="text-gray-300 leading-relaxed mb-6"> |
| | A good model should not only be accurate but also robust. Real-world text is often imperfect, containing typos or grammatical errors. To test this, we evaluated the baseline L3Cube model and our new fine-tuned version on three different datasets: a clean one, one with basic grammatical errors, and one with more advanced errors. The results demonstrate that fine-tuning not only boosts accuracy on clean data but dramatically improves the model's resilience to noisy, imperfect input. |
| | </p> |
| | <div class="chart-container"> |
| | <canvas id="robustnessChart"></canvas> |
| | </div> |
| | </div> |
| |
|
| | <div class="card p-6 md:p-8"> |
| | <h2 class="text-2xl font-bold text-gray-50 mb-4 text-center">Key Features of our Marathi NLP Project - Sentence Similarity Analysis</h2> |
| | <p class="text-gray-300 leading-relaxed mb-6"> |
| | Our project focuses on advancing Natural Language Processing for Marathi, a low-resource language. We address the crucial task of sentence similarity detection using state-of-the-art transformer models. Key features include: |
| | </p> |
| | <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-4 gap-4"> |
| | <div class="feature-box"> |
| | <strong>Systematic Model Evaluation</strong> |
| | <p>We benchmarked six diverse transformer models, including the Marathi-specific L3Cube-MahaBERT and several multilingual options, to identify the most effective baseline.</p> |
| | </div> |
| | <div class="feature-box"> |
| | <strong>Performance Enhancement through Fine-tuning</strong> |
| | <p>We significantly improved the top-performing model by fine-tuning it on a large Marathi sentence pair dataset, demonstrating substantial gains in accuracy and correlation.</p> |
| | </div> |
| | <div class="feature-box"> |
| | <strong>Robustness to Real-world Noise</strong> |
| | <p>A unique aspect of our research is the rigorous testing of models on grammatically erroneous datasets, proving the fine-tuned model's superior resilience to imperfect text inputs.</p> |
| | </div> |
| | <div class="feature-box"> |
| | <strong>Practical Implications</strong> |
| | <p>Our findings provide a clear roadmap for developing high-accuracy and robust NLP tools for Marathi and other low-resource languages, contributing to broader AI inclusivity.</p> |
| | </div> |
| | </div> |
| | </div> |
| |
|
| | <div class="card p-6 md:p-8"> |
| | <h2 class="text-2xl font-bold text-gray-50 mb-4 text-center">Research Insights</h2> |
| | <p class="text-gray-300 leading-relaxed mb-6"> |
| | The study yielded several critical insights into effective NLP development for low-resource languages: |
| | </p> |
| | <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-4 gap-4"> |
| | <div class="insight-box"> |
| | <strong>Monolingual Models Excel</strong> |
| | <p>Language-specific pre-training (e.g., L3Cube-MahaBERT) is crucial for capturing the semantic nuances of Marathi, outperforming general multilingual models lacking task-specific optimization.</p> |
| | </div> |
| | <div class="insight-box"> |
| | <strong>Fine-tuning is Transformative</strong> |
| | <p>Task-specific fine-tuning, even on relatively smaller datasets, dramatically boosts performance, making models highly accurate and reliable for real-world applications.</p> |
| | </div> |
| | <div class="insight-box"> |
| | <strong>Robustness is Key</strong> |
| | <p>Fine-tuning not only improves accuracy on clean data but also significantly enhances a model's ability to handle noisy, grammatically incorrect text, a common challenge in practical scenarios.</p> |
| | </div> |
| | <div class="insight-box"> |
| | <strong>SBERT Paradigm & Data Quality</strong> |
| | <p>The Sentence-BERT (SBERT) fine-tuning approach is a dominant factor, and the careful curation and expansion of human-annotated datasets are foundational for successful model development.</p> |
| | </div> |
| | </div> |
| | </div> |
| |
|
| | <div class="card p-6 md:p-8"> |
| | <h2 class="text-2xl font-bold text-gray-50 mb-4 text-center">Practical Applications in Real-World Scenarios</h2> |
| | <p class="text-gray-300 leading-relaxed mb-6"> |
| | This Marathi Sentence Similarity project has several practical applications in real-world scenarios, especially given its focus on a low-resource language and its robustness to errors. These applications can significantly enhance various Marathi-language services and tools: |
| | </p> |
| | <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-4 gap-4"> |
| | <div class="feature-box"> |
| | <strong>Improved Search & Information Retrieval</strong> |
| | <p>Enhances search engines and databases for Marathi content by understanding the semantic meaning of queries, rather than just keywords. This leads to more accurate and relevant search results, even if the exact words don't match.</p> |
| | </div> |
| | <div class="feature-box"> |
| | <strong>Enhanced Chatbots & Virtual Assistants</strong> |
| | <p>Enables more natural interactions with chatbots and virtual assistants for Marathi speakers, improving user experience in customer service, educational platforms, and general information retrieval.</p> |
| | </div> |
| | <div class="feature-box"> |
| | <strong>Content Moderation & Analysis</strong> |
| | <p>Useful for identifying duplicate content, detecting plagiarism, and flagging inappropriate or abusive texts in Marathi, even if rephrased. This aids in maintaining healthier online environments.</p> |
| | </div> |
| | <div class="feature-box"> |
| | <strong>Education & Language Learning</strong> |
| | <p>Can be used to develop tools that assess understanding in Marathi by comparing student answers to correct ones, or to provide feedback on sentence construction for language learners, facilitating better learning outcomes.</p> |
| | </div> |
| | </div> |
| | </div> |
| |
|
| | <div class="card p-6 md:p-8 text-center"> |
| | <h2 class="text-2xl font-bold text-gray-50 mb-4">Key Conclusion</h2> |
| | <p class="text-gray-300 leading-relaxed max-w-3xl mx-auto"> |
| | This research demonstrates a clear and effective path for developing NLP tools for low-resource languages like Marathi. The most successful strategy is to start with a language-specific pre-trained model and then fine-tune it on a task-specific dataset. This approach yields a model that is not only highly accurate but also robust enough to handle the complexities of real-world text, paving the way for more inclusive and capable AI. |
| | </p> |
| | </div> |
| | </div> |
| | </main> |
| | |
| | <footer class="text-center mt-12 text-gray-400"> |
| | <p>Interactive Report created from the research by Sangam Sanjay Bhamare.</p> |
| | </footer> |
| | </div> |
| |
|
| | <script> |
| | const benchmarkData = { |
| | models: ['L3Cube', 'MuRIL', 'MiniLM', 'DistilUSE', 'BERT', 'E5'], |
| | pearson: [0.8635, 0.4327, 0.8661, 0.1342, 0.3568, 0.4465], |
| | mse: [0.0294, 0.3785, 0.0353, 0.3166, 0.2139, 0.3196], |
| | accuracy: [0.4650, 0.1050, 0.4600, 0.1500, 0.2050, 0.1250] |
| | }; |
| | |
| | const finetuneData = { |
| | metrics: ['MSE', 'MAE', 'Pearson', 'Spearman', 'Accuracy (±0.1)', 'Collision Rate'], |
| | baseline: [0.0232, 0.1181, 0.8722, 0.8549, 0.5249, 0.2712], |
| | finetuned: [0.0036, 0.0457, 0.983, 0.9802, 0.9134, 0.2503] |
| | }; |
| | |
| | const robustnessData = { |
| | datasets: ['Clean Data', 'Basic Errors', 'Advanced Errors'], |
| | baseline: [0.4673, 0.4623, 0.4121], |
| | finetuned: [0.5226, 0.5477, 0.4774] |
| | }; |
| | |
| | let benchmarkChart, finetuneChart, robustnessChart; |
| | |
| | |
| | const chartColors = { |
| | accent: '#80BFFF', |
| | accentLight: 'rgba(128, 191, 255, 0.6)', |
| | secondary: '#98DF8A', |
| | secondaryLight: 'rgba(152, 223, 138, 0.6)', |
| | gray: '#CCCCCC', |
| | grayLight: 'rgba(204, 204, 204, 0.2)' |
| | }; |
| | |
| | function formatLabel(str, maxLen = 16) { |
| | if (str.length <= maxLen) return str; |
| | const parts = str.split(' '); |
| | let lines = []; |
| | let currentLine = ''; |
| | for (const part of parts) { |
| | if (currentLine.length + part.length + 1 <= maxLen) { |
| | currentLine += (currentLine ? ' ' : '') + part; |
| | } else { |
| | lines.push(currentLine); |
| | currentLine = part; |
| | } |
| | } |
| | if (currentLine) lines.push(currentLine); |
| | return lines; |
| | } |
| | |
| | |
| | document.addEventListener('DOMContentLoaded', () => { |
| | |
| | Chart.defaults.color = chartColors.gray; |
| | Chart.defaults.borderColor = chartColors.grayLight; |
| | |
| | const benchmarkCtx = document.getElementById('benchmarkChart').getContext('2d'); |
| | const finetuneCtx = document.getElementById('finetuneChart').getContext('2d'); |
| | const robustnessCtx = document.getElementById('robustnessChart').getContext('2d'); |
| | |
| | function createBenchmarkChart(metric) { |
| | if (benchmarkChart) { |
| | benchmarkChart.destroy(); |
| | } |
| | const higherIsBetter = metric !== 'mse'; |
| | benchmarkChart = new Chart(benchmarkCtx, { |
| | type: 'bar', |
| | data: { |
| | labels: benchmarkData.models, |
| | datasets: [{ |
| | label: metric.toUpperCase(), |
| | data: benchmarkData[metric], |
| | backgroundColor: chartColors.accentLight, |
| | borderColor: chartColors.accent, |
| | borderWidth: 1 |
| | }] |
| | }, |
| | options: { |
| | responsive: true, |
| | maintainAspectRatio: false, |
| | scales: { |
| | y: { |
| | beginAtZero: true, |
| | title: { |
| | display: true, |
| | text: `Score (${higherIsBetter ? 'Higher is Better' : 'Lower is Better'})`, |
| | color: chartColors.gray |
| | }, |
| | ticks: { |
| | color: chartColors.gray |
| | }, |
| | grid: { |
| | color: chartColors.grayLight |
| | } |
| | }, |
| | x: { |
| | ticks: { |
| | color: chartColors.gray |
| | }, |
| | grid: { |
| | color: chartColors.grayLight |
| | } |
| | } |
| | }, |
| | plugins: { |
| | legend: { |
| | display: false |
| | }, |
| | tooltip: { |
| | callbacks: { |
| | title: (tooltipItems) => { |
| | return `Model: ${tooltipItems[0].label}`; |
| | }, |
| | label: (context) => { |
| | return `${context.dataset.label}: ${context.raw.toFixed(4)}`; |
| | } |
| | } |
| | } |
| | } |
| | } |
| | }); |
| | } |
| | |
| | createBenchmarkChart('pearson'); |
| | |
| | document.querySelectorAll('.metric-btn').forEach(button => { |
| | button.addEventListener('click', (e) => { |
| | const metric = e.target.id.split('-')[1]; |
| | createBenchmarkChart(metric); |
| | |
| | |
| | document.querySelectorAll('.metric-btn').forEach(btn => { |
| | btn.classList.remove('active'); |
| | }); |
| | |
| | e.target.classList.add('active'); |
| | |
| | const contextText = document.getElementById('benchmark-context'); |
| | if (metric === 'pearson') { |
| | contextText.innerText = "The results clearly show that L3Cube-MahaBERT, the monolingual Marathi model, significantly outperforms the multilingual models, achieving the highest correlation with human judgments."; |
| | } else if (metric === 'mse') { |
| | contextText.innerText = "In terms of Mean Squared Error, L3Cube-MahaBERT achieves the lowest score, indicating its predictions are closest to the human-annotated ground truth."; |
| | } else { |
| | contextText.innerText = "With the highest accuracy, L3Cube-MahaBERT proves to be the most reliable model for correctly identifying sentence similarity within the defined tolerance."; |
| | } |
| | }); |
| | }); |
| | |
| | |
| | finetuneChart = new Chart(finetuneCtx, { |
| | type: 'bar', |
| | data: { |
| | labels: finetuneData.metrics.map(m => formatLabel(m)), |
| | datasets: [ |
| | { |
| | label: 'Baseline', |
| | data: finetuneData.baseline, |
| | backgroundColor: chartColors.grayLight, |
| | borderColor: chartColors.gray, |
| | borderWidth: 1 |
| | }, |
| | { |
| | label: 'Fine-tuned', |
| | data: finetuneData.finetuned, |
| | backgroundColor: chartColors.secondaryLight, |
| | borderColor: chartColors.secondary, |
| | borderWidth: 1 |
| | } |
| | ] |
| | }, |
| | options: { |
| | responsive: true, |
| | maintainAspectRatio: false, |
| | scales: { |
| | y: { |
| | beginAtZero: true, |
| | title: { display: true, text: 'Performance Score', color: chartColors.gray }, |
| | ticks: { |
| | color: chartColors.gray |
| | }, |
| | grid: { |
| | color: chartColors.grayLight |
| | } |
| | }, |
| | x: { |
| | ticks: { |
| | color: chartColors.gray |
| | }, |
| | grid: { |
| | color: chartColors.grayLight |
| | } |
| | } |
| | }, |
| | plugins: { |
| | title: { display: true, text: 'Performance: Baseline vs. Fine-tuned', color: chartColors.gray }, |
| | legend: { |
| | position: 'top', |
| | labels: { |
| | color: chartColors.gray |
| | } |
| | }, |
| | tooltip: { |
| | callbacks: { |
| | label: (context) => { |
| | let label = context.dataset.label || ''; |
| | if (label) { |
| | label += ': '; |
| | } |
| | if (context.parsed.y !== null) { |
| | |
| | if (context.label.includes('Accuracy') || context.label.includes('Collision')) { |
| | return `${label}${(context.raw * 100).toFixed(2)}%`; |
| | } |
| | return `${label}${context.raw.toFixed(4)}`; |
| | } |
| | return label; |
| | } |
| | } |
| | } |
| | } |
| | } |
| | }); |
| | |
| | |
| | robustnessChart = new Chart(robustnessCtx, { |
| | type: 'bar', |
| | data: { |
| | labels: robustnessData.datasets.map(d => formatLabel(d)), |
| | datasets: [ |
| | { |
| | label: 'Baseline Model', |
| | data: robustnessData.baseline, |
| | backgroundColor: chartColors.grayLight, |
| | borderColor: chartColors.gray, |
| | borderWidth: 1 |
| | }, |
| | { |
| | label: 'Fine-tuned Model', |
| | data: robustnessData.finetuned, |
| | backgroundColor: chartColors.secondaryLight, |
| | borderColor: chartColors.secondary, |
| | borderWidth: 1 |
| | } |
| | ] |
| | }, |
| | options: { |
| | responsive: true, |
| | maintainAspectRatio: false, |
| | scales: { |
| | y: { |
| | beginAtZero: true, |
| | title: { display: true, text: 'Accuracy Score (Higher is Better)', color: chartColors.gray }, |
| | ticks: { |
| | color: chartColors.gray |
| | }, |
| | grid: { |
| | color: chartColors.grayLight |
| | } |
| | }, |
| | x: { |
| | ticks: { |
| | color: chartColors.gray |
| | }, |
| | grid: { |
| | color: chartColors.grayLight |
| | } |
| | } |
| | }, |
| | plugins: { |
| | title: { display: true, text: 'Model Accuracy on Clean vs. Noisy Data', color: chartColors.gray }, |
| | legend: { |
| | position: 'top', |
| | labels: { |
| | color: chartColors.gray |
| | } |
| | }, |
| | tooltip: { |
| | callbacks: { |
| | label: (context) => { |
| | let label = context.dataset.label || ''; |
| | if (label) { |
| | label += ': '; |
| | } |
| | if (context.parsed.y !== null) { |
| | label += `${(context.parsed.y * 100).toFixed(1)}%`; |
| | } |
| | return label; |
| | } |
| | } |
| | } |
| | } |
| | } |
| | }); |
| | }); |
| | </script> |
| | </body> |
| | </html> |
| |
|