{
  "id": 656119,
  "title": "6th Place Solution: Hybrid CTGAN–Genuity Ensemble for Synthetic Time-Series",
  "content": "<h1>Genuity x Ethos Synthetic Data Challenge - Solution Writeup</h1>\n<h2>🏆 Competition Overview</h2>\n<p><strong>Competition:</strong> Genuity x Ethos =&gt; Synthetic Data Challenge<br>\n<strong>Host:</strong> ETHOS Coding Club, IIT Guwahati &amp; Genuity IO<br>\n<strong>Task:</strong> Generate synthetic time-series data that balances accuracy, privacy, and fairness<br>\n<strong>Dataset Size:</strong> 3,322 rows (60% provided, 40% hidden for evaluation)</p>\n<h3>Objective</h3>\n<p>Build high-quality synthetic time-series datasets using Genuity's open-source library that:</p>\n<ul>\n<li>Maintains statistical similarity to real data</li>\n<li>Preserves privacy (no memorization)</li>\n<li>Achieves low detectability (realistic synthetic data)</li>\n</ul>\n<hr>\n<h2>📊 Evaluation Metrics</h2>\n<p>The final score is computed as the average of three components:</p>\n<ol>\n<li><strong>Statistical Similarity</strong> - Distribution alignment, correlations, autocorrelation structures</li>\n<li><strong>Privacy Score</strong> - Protection against direct leakage and memorization</li>\n<li><strong>Detectability Score</strong> - Difficulty in distinguishing real vs synthetic samples</li>\n</ol>\n<p><strong>Formula:</strong></p>\n<pre><code>Final  = (Statistical Similarity + Privacy  + Detectability ) / \n</code></pre>\n<hr>\n<h2>🔧 My Approach</h2>\n<h3>Models Explored</h3>\n<p>I experimented with multiple synthetic data generation approaches:</p>\n<table>\n<thead>\n<tr>\n<th>Model</th>\n<th>Description</th>\n<th>Performance</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Genuity Model</strong></td>\n<td>Competition's official library</td>\n<td>Baseline</td>\n</tr>\n<tr>\n<td><strong>CTGAN</strong></td>\n<td>Conditional Generative Adversarial Network</td>\n<td>⭐ Best performing</td>\n</tr>\n<tr>\n<td><strong>TVAE</strong></td>\n<td>Tabular Variational Autoencoder</td>\n<td>Moderate</td>\n</tr>\n<tr>\n<td><strong>Gaussian Copulas</strong></td>\n<td>Statistical copula-based approach</td>\n<td>Moderate</td>\n</tr>\n<tr>\n<td><strong>Copula GAN</strong></td>\n<td>Hybrid copula + GAN approach</td>\n<td>Moderate</td>\n</tr>\n</tbody>\n</table>\n<h3>Final Solution: Ensemble Approach</h3>\n<p>My final submission combined <strong>CTGAN</strong> with <strong>Genuity predictions</strong> using harmonic mean ensemble:</p>\n<pre><code>\n col  cols_to_ensemble:\n    ensemble_df[col] =  / (/df1[col] + /df2[col])\n</code></pre>\n<p><strong>Why CTGAN dominated?</strong> After testing, CTGAN showed superior performance on the evaluation metrics, so I weighted the ensemble accordingly.</p>\n<hr>\n<h2>💻 Implementation Details</h2>\n<h3>Key Hyperparameters</h3>\n<p></p>\n<b>Pre Processing</b><p></p>\n<pre><code>\npre = TabularPreprocessor(\n    scaler_type=,\n    encoding_strategy=,\n)\n</code></pre>\n<p></p>\n<b>1. Genuity Model</b><p></p>\n<pre><code>\nctgan = CTGANAPI()\n\nlosses = ctgan.fit(\n    data=X.values,\n    continuous_cols=(((result[].columns))),\n    categorical_cols=((\n        (result[].columns),\n        X.shape[]\n    )),\n    epochs=\n)\n</code></pre>\n<p></p><p></p>\n<p></p>\n<b>2. CTGAN</b><p></p>\n<pre><code>\nctgan = CTGANSynthesizer(\n     metadata=metadata,\n        epochs=,\n        generator_dim=(, , , ),\n        discriminator_dim=(, , , ),\n)\n</code></pre>\n<p></p><p></p>\n<p></p>\n<b>3. TVAE</b><p></p>\n<pre><code>\ntvae = TVAESynthesizer(metadata, epochs=)\n</code></pre>\n<p></p><p></p>\n<p></p>\n<b>4. Gaussian Copulas</b><p></p>\n<pre><code>\ngc = GaussianCopulaSynthesizer(\n    metadata\n    )\n</code></pre>\n<p></p><p></p>\n<p></p>\n<b>5. Copula GAN</b><p></p>\n<pre><code>\ncgan = CopulaGANSynthesizer(\n    metadata, epochs=,verbose=,\n    )\n</code></pre>\n<p></p><p></p>\n<hr>\n<h2>🛠️ Submission Pipeline</h2>\n<h3>Global Submission Function</h3>\n<p>Created a robust submission function to handle all formatting requirements and avoid evaluation errors:</p>\n<pre><code> ():\n    \n    df = data.copy()\n\n    \n    df = df.sort_values().reset_index(drop=)\n\n    \n    df[] = (, (df) + )\n\n    \n       df.columns:\n        df = df.drop(columns=[])\n\n    \n    submission_cols = [\n        , , , , \n        , , , , , , \n        , , , , \n    ]\n\n    df = df[submission_cols]\n    df.to_csv(, index=)\n\n    ()\n    ()\n</code></pre>\n<h3>Key Submission Requirements</h3>\n<p>✅ <strong>Must have:</strong> <code>row_id_column_name</code> as first column (0-3321)<br>\n✅ <strong>Exact row count:</strong> 3,322 rows<br>\n✅ <strong>Remove:</strong> 'Series' column (mandatory)<br>\n✅ <strong>Timestamp:</strong> Must be in strictly ascending order<br>\n✅ <strong>Schema:</strong> Must match <code>real_0.6.csv</code> exactly</p>\n<hr>\n<h2>🚧 Challenges Faced</h2>\n<h3>1. Evaluation Errors</h3>\n<p>Multiple submission attempts failed due to:</p>\n<ul>\n<li>Schema mismatches</li>\n<li>Incorrect row counts</li>\n<li>Column ordering issues</li>\n<li>Missing/extra columns</li>\n</ul>\n<p><strong>Solution:</strong> Created the standardized <code>submit()</code> function to ensure consistent formatting</p>\n<h3>2. Model Selection</h3>\n<p>Balancing the three metrics (similarity, privacy, detectability) was challenging as models optimized for one often compromised others.</p>\n<p><strong>Solution:</strong> Ensemble approach leveraging strengths of both Genuity and CTGAN</p>\n<h3>3. Hyperparameter Tuning</h3>\n<p>Each model required extensive tuning to achieve optimal performance on the composite metric.</p>\n<hr>\n<h2>📈 Results</h2>\n<h3>Public Leaderboard Scores</h3>\n<table>\n<thead>\n<tr>\n<th>Approach</th>\n<th>Statistical Similarity</th>\n<th>Privacy Score</th>\n<th>Detectability</th>\n<th>Final Score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Genuity Baseline</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n</tr>\n<tr>\n<td>CTGAN</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n</tr>\n<tr>\n<td>TVAE</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n</tr>\n<tr>\n<td>Gaussian Copulas</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n</tr>\n<tr>\n<td>Copula GAN</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n</tr>\n<tr>\n<td><strong>Final Ensemble</strong></td>\n<td><strong>[Score]</strong></td>\n<td><strong>[Score]</strong></td>\n<td><strong>[Score]</strong></td>\n<td><strong>[Score]</strong></td>\n</tr>\n</tbody>\n</table>\n<hr>\n<h2>🔑 Key Takeaways</h2>\n<ol>\n<li><strong>CTGAN excels at time-series synthesis</strong> - Particularly effective for financial/stock market data</li>\n<li><strong>Ensemble methods improve robustness</strong> - Combining models can balance competing objectives</li>\n<li><strong>Submission format matters</strong> - Always validate against exact competition requirements</li>\n<li><strong>Hyperparameter tuning is crucial</strong> - Small changes significantly impact all three metrics</li>\n</ol>\n<hr>\n<h2>📚 Resources</h2>\n<ul>\n<li><strong>Genuity Library:</strong> <a href=\"https://github.com/S-G-mathematics/genuity_os\" target=\"_blank\">GitHub Repository</a></li>\n<li><strong>Competition Page:</strong> <a href=\"https://kaggle.com/competitions/genuityxethos\" target=\"_blank\">Kaggle Competition</a></li>\n</ul>\n<hr>\n<h2>🙏 Acknowledgments</h2>\n<ul>\n<li><strong>ETHOS Coding Club, IIT Guwahati</strong> for organizing the competition</li>\n<li><strong>Genuity IO</strong> for providing the open-source library and mentorship</li>\n<li>The Kaggle community for discussions and insights</li>\n</ul>\n<hr>\n<h2>📝 Citation</h2>\n<pre><code> io. Genuity x Ethos=&gt;Synthetic  Challenge. \n\n</code></pre>\n<hr>\n<p><strong>Competition Period:</strong> September 29, 2025 - November 30, 2025<br>\n<strong>Prize Pool:</strong> ₹45,000 INR + Direct hiring interviews at Genuity IO</p>\n<hr>\n<h2>🚀 Reproducibility</h2>\n<p>All code is available in the Kaggle Notebook. To reproduce:</p>\n<ol>\n<li>Clone the repository or download the notebook</li>\n<li>Install required libraries: <code>pip install genuity sdv pandas numpy</code></li>\n<li>Run the preprocessing pipeline</li>\n<li>Train models with provided hyperparameters</li>\n<li>Generate ensemble predictions</li>\n<li>Use the <code>submit()</code> function to create final submission</li>\n</ol>\n<p>OR</p>\n<p>Use my Github Code which have all the Three file \n  i. Genuity Notebook\n  ii. CTGAN Notebook\n  iii. Ensmeble Code</p>\n<hr>\n<p><strong>Author:</strong> Ayusman Samasi \n<strong>Contact:</strong> <a href=\"mailto:hariswarsamasi@gmail.com\">hariswarsamasi@gmail.com</a><br>\n<strong>Kaggle Profile:</strong> <a href=\"https://www.kaggle.com/samasiayushman/\" target=\"_blank\">https://www.kaggle.com/samasiayushman/</a></p>",
  "comments": [],
  "comment_count": 0,
  "messages": [
    {
      "id": 3368236,
      "postDate": "2025-12-09T04:40:23.860Z",
      "content": "<h1>Genuity x Ethos Synthetic Data Challenge - Solution Writeup</h1>\n<h2>🏆 Competition Overview</h2>\n<p><strong>Competition:</strong> Genuity x Ethos =&gt; Synthetic Data Challenge<br>\n<strong>Host:</strong> ETHOS Coding Club, IIT Guwahati &amp; Genuity IO<br>\n<strong>Task:</strong> Generate synthetic time-series data that balances accuracy, privacy, and fairness<br>\n<strong>Dataset Size:</strong> 3,322 rows (60% provided, 40% hidden for evaluation)</p>\n<h3>Objective</h3>\n<p>Build high-quality synthetic time-series datasets using Genuity's open-source library that:</p>\n<ul>\n<li>Maintains statistical similarity to real data</li>\n<li>Preserves privacy (no memorization)</li>\n<li>Achieves low detectability (realistic synthetic data)</li>\n</ul>\n<hr>\n<h2>📊 Evaluation Metrics</h2>\n<p>The final score is computed as the average of three components:</p>\n<ol>\n<li><strong>Statistical Similarity</strong> - Distribution alignment, correlations, autocorrelation structures</li>\n<li><strong>Privacy Score</strong> - Protection against direct leakage and memorization</li>\n<li><strong>Detectability Score</strong> - Difficulty in distinguishing real vs synthetic samples</li>\n</ol>\n<p><strong>Formula:</strong></p>\n<pre><code>Final  = (Statistical Similarity + Privacy  + Detectability ) / \n</code></pre>\n<hr>\n<h2>🔧 My Approach</h2>\n<h3>Models Explored</h3>\n<p>I experimented with multiple synthetic data generation approaches:</p>\n<table>\n<thead>\n<tr>\n<th>Model</th>\n<th>Description</th>\n<th>Performance</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Genuity Model</strong></td>\n<td>Competition's official library</td>\n<td>Baseline</td>\n</tr>\n<tr>\n<td><strong>CTGAN</strong></td>\n<td>Conditional Generative Adversarial Network</td>\n<td>⭐ Best performing</td>\n</tr>\n<tr>\n<td><strong>TVAE</strong></td>\n<td>Tabular Variational Autoencoder</td>\n<td>Moderate</td>\n</tr>\n<tr>\n<td><strong>Gaussian Copulas</strong></td>\n<td>Statistical copula-based approach</td>\n<td>Moderate</td>\n</tr>\n<tr>\n<td><strong>Copula GAN</strong></td>\n<td>Hybrid copula + GAN approach</td>\n<td>Moderate</td>\n</tr>\n</tbody>\n</table>\n<h3>Final Solution: Ensemble Approach</h3>\n<p>My final submission combined <strong>CTGAN</strong> with <strong>Genuity predictions</strong> using harmonic mean ensemble:</p>\n<pre><code>\n col  cols_to_ensemble:\n    ensemble_df[col] =  / (/df1[col] + /df2[col])\n</code></pre>\n<p><strong>Why CTGAN dominated?</strong> After testing, CTGAN showed superior performance on the evaluation metrics, so I weighted the ensemble accordingly.</p>\n<hr>\n<h2>💻 Implementation Details</h2>\n<h3>Key Hyperparameters</h3>\n<p></p>\n<b>Pre Processing</b><p></p>\n<pre><code>\npre = TabularPreprocessor(\n    scaler_type=,\n    encoding_strategy=,\n)\n</code></pre>\n<p></p>\n<b>1. Genuity Model</b><p></p>\n<pre><code>\nctgan = CTGANAPI()\n\nlosses = ctgan.fit(\n    data=X.values,\n    continuous_cols=(((result[].columns))),\n    categorical_cols=((\n        (result[].columns),\n        X.shape[]\n    )),\n    epochs=\n)\n</code></pre>\n<p></p><p></p>\n<p></p>\n<b>2. CTGAN</b><p></p>\n<pre><code>\nctgan = CTGANSynthesizer(\n     metadata=metadata,\n        epochs=,\n        generator_dim=(, , , ),\n        discriminator_dim=(, , , ),\n)\n</code></pre>\n<p></p><p></p>\n<p></p>\n<b>3. TVAE</b><p></p>\n<pre><code>\ntvae = TVAESynthesizer(metadata, epochs=)\n</code></pre>\n<p></p><p></p>\n<p></p>\n<b>4. Gaussian Copulas</b><p></p>\n<pre><code>\ngc = GaussianCopulaSynthesizer(\n    metadata\n    )\n</code></pre>\n<p></p><p></p>\n<p></p>\n<b>5. Copula GAN</b><p></p>\n<pre><code>\ncgan = CopulaGANSynthesizer(\n    metadata, epochs=,verbose=,\n    )\n</code></pre>\n<p></p><p></p>\n<hr>\n<h2>🛠️ Submission Pipeline</h2>\n<h3>Global Submission Function</h3>\n<p>Created a robust submission function to handle all formatting requirements and avoid evaluation errors:</p>\n<pre><code> ():\n    \n    df = data.copy()\n\n    \n    df = df.sort_values().reset_index(drop=)\n\n    \n    df[] = (, (df) + )\n\n    \n       df.columns:\n        df = df.drop(columns=[])\n\n    \n    submission_cols = [\n        , , , , \n        , , , , , , \n        , , , , \n    ]\n\n    df = df[submission_cols]\n    df.to_csv(, index=)\n\n    ()\n    ()\n</code></pre>\n<h3>Key Submission Requirements</h3>\n<p>✅ <strong>Must have:</strong> <code>row_id_column_name</code> as first column (0-3321)<br>\n✅ <strong>Exact row count:</strong> 3,322 rows<br>\n✅ <strong>Remove:</strong> 'Series' column (mandatory)<br>\n✅ <strong>Timestamp:</strong> Must be in strictly ascending order<br>\n✅ <strong>Schema:</strong> Must match <code>real_0.6.csv</code> exactly</p>\n<hr>\n<h2>🚧 Challenges Faced</h2>\n<h3>1. Evaluation Errors</h3>\n<p>Multiple submission attempts failed due to:</p>\n<ul>\n<li>Schema mismatches</li>\n<li>Incorrect row counts</li>\n<li>Column ordering issues</li>\n<li>Missing/extra columns</li>\n</ul>\n<p><strong>Solution:</strong> Created the standardized <code>submit()</code> function to ensure consistent formatting</p>\n<h3>2. Model Selection</h3>\n<p>Balancing the three metrics (similarity, privacy, detectability) was challenging as models optimized for one often compromised others.</p>\n<p><strong>Solution:</strong> Ensemble approach leveraging strengths of both Genuity and CTGAN</p>\n<h3>3. Hyperparameter Tuning</h3>\n<p>Each model required extensive tuning to achieve optimal performance on the composite metric.</p>\n<hr>\n<h2>📈 Results</h2>\n<h3>Public Leaderboard Scores</h3>\n<table>\n<thead>\n<tr>\n<th>Approach</th>\n<th>Statistical Similarity</th>\n<th>Privacy Score</th>\n<th>Detectability</th>\n<th>Final Score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Genuity Baseline</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n</tr>\n<tr>\n<td>CTGAN</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n</tr>\n<tr>\n<td>TVAE</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n</tr>\n<tr>\n<td>Gaussian Copulas</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n</tr>\n<tr>\n<td>Copula GAN</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n<td>[Score]</td>\n</tr>\n<tr>\n<td><strong>Final Ensemble</strong></td>\n<td><strong>[Score]</strong></td>\n<td><strong>[Score]</strong></td>\n<td><strong>[Score]</strong></td>\n<td><strong>[Score]</strong></td>\n</tr>\n</tbody>\n</table>\n<hr>\n<h2>🔑 Key Takeaways</h2>\n<ol>\n<li><strong>CTGAN excels at time-series synthesis</strong> - Particularly effective for financial/stock market data</li>\n<li><strong>Ensemble methods improve robustness</strong> - Combining models can balance competing objectives</li>\n<li><strong>Submission format matters</strong> - Always validate against exact competition requirements</li>\n<li><strong>Hyperparameter tuning is crucial</strong> - Small changes significantly impact all three metrics</li>\n</ol>\n<hr>\n<h2>📚 Resources</h2>\n<ul>\n<li><strong>Genuity Library:</strong> <a href=\"https://github.com/S-G-mathematics/genuity_os\" target=\"_blank\">GitHub Repository</a></li>\n<li><strong>Competition Page:</strong> <a href=\"https://kaggle.com/competitions/genuityxethos\" target=\"_blank\">Kaggle Competition</a></li>\n</ul>\n<hr>\n<h2>🙏 Acknowledgments</h2>\n<ul>\n<li><strong>ETHOS Coding Club, IIT Guwahati</strong> for organizing the competition</li>\n<li><strong>Genuity IO</strong> for providing the open-source library and mentorship</li>\n<li>The Kaggle community for discussions and insights</li>\n</ul>\n<hr>\n<h2>📝 Citation</h2>\n<pre><code> io. Genuity x Ethos=&gt;Synthetic  Challenge. \n\n</code></pre>\n<hr>\n<p><strong>Competition Period:</strong> September 29, 2025 - November 30, 2025<br>\n<strong>Prize Pool:</strong> ₹45,000 INR + Direct hiring interviews at Genuity IO</p>\n<hr>\n<h2>🚀 Reproducibility</h2>\n<p>All code is available in the Kaggle Notebook. To reproduce:</p>\n<ol>\n<li>Clone the repository or download the notebook</li>\n<li>Install required libraries: <code>pip install genuity sdv pandas numpy</code></li>\n<li>Run the preprocessing pipeline</li>\n<li>Train models with provided hyperparameters</li>\n<li>Generate ensemble predictions</li>\n<li>Use the <code>submit()</code> function to create final submission</li>\n</ol>\n<p>OR</p>\n<p>Use my Github Code which have all the Three file \n  i. Genuity Notebook\n  ii. CTGAN Notebook\n  iii. Ensmeble Code</p>\n<hr>\n<p><strong>Author:</strong> Ayusman Samasi \n<strong>Contact:</strong> <a href=\"mailto:hariswarsamasi@gmail.com\">hariswarsamasi@gmail.com</a><br>\n<strong>Kaggle Profile:</strong> <a href=\"https://www.kaggle.com/samasiayushman/\" target=\"_blank\">https://www.kaggle.com/samasiayushman/</a></p>",
      "rawMarkdown": "# Genuity x Ethos Synthetic Data Challenge - Solution Writeup\n\n## 🏆 Competition Overview\n\n**Competition:** Genuity x Ethos => Synthetic Data Challenge  \n**Host:** ETHOS Coding Club, IIT Guwahati & Genuity IO  \n**Task:** Generate synthetic time-series data that balances accuracy, privacy, and fairness  \n**Dataset Size:** 3,322 rows (60% provided, 40% hidden for evaluation)\n\n### Objective\nBuild high-quality synthetic time-series datasets using Genuity's open-source library that:\n- Maintains statistical similarity to real data\n- Preserves privacy (no memorization)\n- Achieves low detectability (realistic synthetic data)\n\n---\n\n## 📊 Evaluation Metrics\n\nThe final score is computed as the average of three components:\n\n1. **Statistical Similarity** - Distribution alignment, correlations, autocorrelation structures\n2. **Privacy Score** - Protection against direct leakage and memorization\n3. **Detectability Score** - Difficulty in distinguishing real vs synthetic samples\n\n**Formula:**\n```\nFinal Score = (Statistical Similarity + Privacy Score + Detectability Score) / 3\n```\n\n---\n\n## 🔧 My Approach\n\n### Models Explored\n\nI experimented with multiple synthetic data generation approaches:\n\n| Model | Description | Performance |\n|-------|-------------|-------------|\n| **Genuity Model** | Competition's official library | Baseline |\n| **CTGAN** | Conditional Generative Adversarial Network | ⭐ Best performing |\n| **TVAE** | Tabular Variational Autoencoder | Moderate |\n| **Gaussian Copulas** | Statistical copula-based approach | Moderate |\n| **Copula GAN** | Hybrid copula + GAN approach | Moderate |\n\n### Final Solution: Ensemble Approach\n\nMy final submission combined **CTGAN** with **Genuity predictions** using harmonic mean ensemble:\n\n```python\n# Ensemble strategy: Harmonic mean for numerical columns\nfor col in cols_to_ensemble:\n    ensemble_df[col] = 2 / (1/df1[col] + 1/df2[col])\n```\n\n**Why CTGAN dominated?** After testing, CTGAN showed superior performance on the evaluation metrics, so I weighted the ensemble accordingly.\n\n---\n\n## 💻 Implementation Details\n\n### Key Hyperparameters\n\n<details>\n<summary><b>Pre Processing</b></summary>\n\n```python\n# Preprocessing Done\npre = TabularPreprocessor(\n    scaler_type=\"standard\",\n    encoding_strategy=\"onehot\",\n)\n\n```\n<details>\n<summary><b>1. Genuity Model</b></summary>\n\n```python\n# Genuity hyperparameters\nctgan = CTGANAPI()\n\nlosses = ctgan.fit(\n    data=X.values,\n    continuous_cols=list(range(len(result[\"continuous\"].columns))),\n    categorical_cols=list(range(\n        len(result[\"continuous\"].columns),\n        X.shape[1]\n    )),\n    epochs=300\n)\n```\n</details>\n\n<details>\n<summary><b>2. CTGAN</b></summary>\n\n```python\n# CTGAN hyperparameters\nctgan = CTGANSynthesizer(\n     metadata=metadata,\n        epochs=100,\n        generator_dim=(512, 512, 512, 512),\n        discriminator_dim=(512, 512, 512, 512),\n)\n```\n</details>\n\n<details>\n<summary><b>3. TVAE</b></summary>\n\n```python\n# TVAE hyperparameters\ntvae = TVAESynthesizer(metadata, epochs=100)\n```\n</details>\n\n<details>\n<summary><b>4. Gaussian Copulas</b></summary>\n\n```python\n# Gaussian Copulas hyperparameters\ngc = GaussianCopulaSynthesizer(\n    metadata\n    )\n```\n</details>\n\n<details>\n<summary><b>5. Copula GAN</b></summary>\n\n```python\n# Copula GAN hyperparameters\ncgan = CopulaGANSynthesizer(\n    metadata, epochs=200,verbose=True,\n    )\n```\n</details>\n\n---\n\n## 🛠️ Submission Pipeline\n\n### Global Submission Function\n\nCreated a robust submission function to handle all formatting requirements and avoid evaluation errors:\n\n```python\ndef submit(data, subname):\n    \"\"\"\n    Prepares and saves submission file in exact competition format\n    \n    Args:\n        data: DataFrame with synthetic data\n        subname: Name for the output CSV file\n    \"\"\"\n    df = data.copy()\n    \n    # Sort by timestamp\n    df = df.sort_values(\"t\").reset_index(drop=True)\n    \n    # Add row_id_column_name starting from 1\n    df[\"row_id_column_name\"] = range(1, len(df) + 1)\n    \n    # Remove Series column if present (mandatory)\n    if \"Series\" in df.columns:\n        df = df.drop(columns=[\"Series\"])\n    \n    # Exact column order required for submission\n    submission_cols = [\n        \"row_id_column_name\", \"Symbol\", \"Prev Close\", \"Open\", \n        \"High\", \"Low\", \"Last\", \"Close\", \"VWAP\", \"Volume\", \n        \"Turnover\", \"Trades\", \"Deliverable Volume\", \"%Deliverble\", \"t\"\n    ]\n    \n    df = df[submission_cols]\n    df.to_csv(f\"{subname}.csv\", index=False)\n    \n    print(\"Done! Matched EXACT submission format.\")\n    print(f\"Done! Saved as {subname}.csv file submission done\")\n```\n\n### Key Submission Requirements\n\n✅ **Must have:** `row_id_column_name` as first column (0-3321)  \n✅ **Exact row count:** 3,322 rows  \n✅ **Remove:** 'Series' column (mandatory)  \n✅ **Timestamp:** Must be in strictly ascending order  \n✅ **Schema:** Must match `real_0.6.csv` exactly\n\n---\n\n## 🚧 Challenges Faced\n\n### 1. Evaluation Errors\nMultiple submission attempts failed due to:\n- Schema mismatches\n- Incorrect row counts\n- Column ordering issues\n- Missing/extra columns\n\n**Solution:** Created the standardized `submit()` function to ensure consistent formatting\n\n### 2. Model Selection\nBalancing the three metrics (similarity, privacy, detectability) was challenging as models optimized for one often compromised others.\n\n**Solution:** Ensemble approach leveraging strengths of both Genuity and CTGAN\n\n### 3. Hyperparameter Tuning\nEach model required extensive tuning to achieve optimal performance on the composite metric.\n\n---\n\n## 📈 Results\n\n### Public Leaderboard Scores\n\n| Approach | Statistical Similarity | Privacy Score | Detectability | Final Score |\n|----------|----------------------|---------------|---------------|-------------|\n| Genuity Baseline | [Score] | [Score] | [Score] | [Score] |\n| CTGAN | [Score] | [Score] | [Score] | [Score] |\n| TVAE | [Score] | [Score] | [Score] | [Score] |\n| Gaussian Copulas | [Score] | [Score] | [Score] | [Score] |\n| Copula GAN | [Score] | [Score] | [Score] | [Score] |\n| **Final Ensemble** | **[Score]** | **[Score]** | **[Score]** | **[Score]** |\n\n---\n\n## 🔑 Key Takeaways\n\n1. **CTGAN excels at time-series synthesis** - Particularly effective for financial/stock market data\n2. **Ensemble methods improve robustness** - Combining models can balance competing objectives\n3. **Submission format matters** - Always validate against exact competition requirements\n4. **Hyperparameter tuning is crucial** - Small changes significantly impact all three metrics\n\n---\n\n## 📚 Resources\n\n- **Genuity Library:** [GitHub Repository](https://github.com/S-G-mathematics/genuity_os)\n- **Competition Page:** [Kaggle Competition](https://kaggle.com/competitions/genuityxethos)\n\n---\n\n## 🙏 Acknowledgments\n\n- **ETHOS Coding Club, IIT Guwahati** for organizing the competition\n- **Genuity IO** for providing the open-source library and mentorship\n- The Kaggle community for discussions and insights\n\n---\n\n## 📝 Citation\n\n```\nGenuity io. Genuity x Ethos=>Synthetic Data Challenge. \nhttps://kaggle.com/competitions/genuityxethos, 2025. Kaggle.\n```\n\n---\n\n**Competition Period:** September 29, 2025 - November 30, 2025  \n**Prize Pool:** ₹45,000 INR + Direct hiring interviews at Genuity IO\n\n---\n\n## 🚀 Reproducibility\n\nAll code is available in the Kaggle Notebook. To reproduce:\n\n1. Clone the repository or download the notebook\n2. Install required libraries: `pip install genuity sdv pandas numpy`\n3. Run the preprocessing pipeline\n4. Train models with provided hyperparameters\n5. Generate ensemble predictions\n6. Use the `submit()` function to create final submission\n\nOR\n\nUse my Github Code which have all the Three file \n  i. Genuity Notebook\n  ii. CTGAN Notebook\n  iii. Ensmeble Code\n\n---\n\n**Author:** Ayusman Samasi \n**Contact:** hariswarsamasi@gmail.com  \n**Kaggle Profile:** https://www.kaggle.com/samasiayushman/",
      "votes": 2
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-20T07:13:34Z",
  "competition_id": 116153,
  "competition_slug": "genuityxethos",
  "team_id": 14467244,
  "solution_url": "/competitions/genuityxethos/writeups/6th-place-solution-hybrid-ctgangenuity-ensemble"
}