ワンクリックで
pareto-frontier-analysis
Identify Pareto-optimal solutions from multi-objective optimization results.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Identify Pareto-optimal solutions from multi-objective optimization results.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | pareto-frontier-analysis |
| description | Identify Pareto-optimal solutions from multi-objective optimization results. |
The Pareto frontier identifies non-dominated solutions where you cannot improve one objective without worsening another. For this task: maximize F1 score and minimize delta distance.
import numpy as np
import pandas as pd
def compute_pareto_frontier(results_df):
"""
Find Pareto-optimal solutions from results.
Args:
results_df: DataFrame with columns 'f1' and 'delta'
Returns:
pareto_indices: Boolean array marking Pareto-optimal solutions
"""
f1_scores = results_df['f1'].values
deltas = results_df['delta'].values
n = len(results_df)
is_pareto = np.ones(n, dtype=bool)
for i in range(n):
# Check if solution i is dominated
for j in range(n):
if i == j:
continue
# Solution j dominates solution i if:
# - j has better F1 (higher) AND
# - j has better delta (lower)
if f1_scores[j] > f1_scores[i] and deltas[j] < deltas[i]:
is_pareto[i] = False
break
return is_pareto
def compute_pareto_frontier_fast(f1_scores, deltas):
"""Fast vectorized computation of Pareto frontier."""
n = len(f1_scores)
is_pareto = np.ones(n, dtype=bool)
# For each solution, check if any other solution dominates it
for i in range(n):
dominated = (f1_scores > f1_scores[i]) & (deltas < deltas[i])
if np.any(dominated):
is_pareto[i] = False
return is_pareto
import matplotlib.pyplot as plt
def plot_pareto_frontier(results_df, pareto_mask):
"""Visualize the Pareto frontier."""
plt.figure(figsize=(10, 6))
# Plot all points
plt.scatter(results_df[~pareto_mask]['delta'],
results_df[~pareto_mask]['f1'],
alpha=0.3, label='Dominated', s=30)
# Plot Pareto points
pareto_df = results_df[pareto_mask]
plt.scatter(pareto_df['delta'], pareto_df['f1'],
color='red', label='Pareto-optimal', s=100, marker='*')
plt.xlabel('Delta (Average Distance)')
plt.ylabel('F1 Score')
plt.title('Pareto Frontier')
plt.legend()
plt.grid(True, alpha=0.3)
plt.show()
Handles reading, populating, and saving .docx files using the python-docx library. Use this skill for any tasks involving template filling or modifying Word documents.
Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
This skill includes search capability in 13F, such as fuzzy search a fund information using possibly inaccurate name, or fuzzy search a stock cusip info using its name.
A comprehensive PDF toolkit for advanced data extraction and document analysis. Beyond text and table extraction, this tool is optimized for visual layout reasoning: it can map graphical elements to coordinates (such as determining appointment times based on their position on a calendar timeline) and identify color-coded features (e.g., distinguishing high-priority blocks from flexible blue-colored entries). Use this skill when the task requires interpreting schedule layouts, calculating durations from visual spans, or resolving scheduling conflicts based on the spatial and color properties of a PDF document.
Build deterministic, verifiable data visualizations with D3.js (v6). Generate standalone HTML/SVG (and optional PNG) from local data files without external network dependencies. Use when tasks require charts, plots, axes/scales, legends, tooltips, or data-driven SVG output.
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.