grg's picture
Adding additional descriptions (improving the text) and adding link to the huggingface dataset.
d7c0630
raw
history blame
12.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stick To Your Role!: {{ model_name }}</title>
<!-- Include Bootstrap CSS for styling -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.1.3/css/bootstrap.min.css">
<!-- Include DataTables CSS -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.11.5/css/dataTables.bootstrap5.min.css">
<!-- Custom CSS for additional styling -->
<style>
body {
background-color: #f8f9fa;
font-family: 'Arial', sans-serif;
}
.container {
max-width: 1200px; /* Limit the width of the container */
margin: auto; /* Center the container */
padding: 20px; /* Add some padding */
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
h1 {
text-align: center;
}
.model-name {
font-size: 24px;
font-weight: bold;
text-align: center;
margin-top: 40px;
margin-bottom: 40px;
padding: 20px; /* Add padding for more margin around text */
background-color: #610b5d;
color: #fff; /* Ensure text is readable on dark background */
border-radius: 15px; /* Rounded edges */
}
.table-responsive {
margin-top: 20px;
max-width: 800px; /* Adjust the width as needed */
margin: auto; /* Center the table */
font-size: 15px
}
table {
border-collapse: separate;
border-spacing: 0;
width: 800px;
margin: auto;
border: none; /* Remove any default border */
}
table thead th {
background-color: #610b5d;
color: white;
border: 1px solid #dee2e6;
text-align: left;
}
table tbody tr {
background-color: #fff;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
table tbody tr:hover {
background-color: #f1f1f1;
}
table td, table th {
padding: 5px; /* Reduce padding */
border: 1px solid #dee2e6;
}
table th:first-child {
border-top-left-radius: 10px;
}
table th:last-child {
border-top-right-radius: 10px;
}
/* Hide default sorting arrows */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after {
display: none;
}
table.dataTable thead .sorting_asc {
background-image: url("{{ url_for('static', filename='icons/sort_asc_gray.png') }}");
background-repeat: no-repeat;
background-position: center right;
}
table.dataTable thead .sorting_desc {
background-image: url("{{ url_for('static', filename='icons/sort_desc_gray.png') }}");
background-repeat: no-repeat;
background-position: center right;
}
/* Override DataTables padding for sorting icons */
table.dataTable > thead > tr > th:not(.sorting_disabled),
table.dataTable > thead > tr > td:not(.sorting_disabled) {
padding-right: 5px; /* Adjust as needed to center the text */
}
/* Align first two columns to the left */
table.dataTable tbody td:first-child,
table.dataTable tbody td:nth-child(2),
table.dataTable thead th:first-child,
table.dataTable thead th:nth-child(2) {
text-align: left;
}
/* Align all other columns to the center */
table.dataTable tbody td:not(:first-child):not(:nth-child(2)),
table.dataTable thead th:not(:first-child):not(:nth-child(2)) {
text-align: center;
}
/* Tooltip styling */
.tooltip-inner {
max-width: none;
}
th[title] {
position: relative;
cursor: help;
}
th[title]:hover::after {
content: attr(title);
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
background-color: #333;
color: white;
padding: 5px 10px;
border-radius: 4px;
white-space: nowrap;
z-index: 1;
font-weight: normal;
font-size: 14px;
}
.section {
text-align: center;
margin-top: 40px;
}
.section h2 {
font-size: 30px;
margin-bottom: 20px;
}
.section p {
margin: auto;
padding-left: 150px;
padding-right: 150px;
margin-bottom: 20px;
text-align: left;
text-indent: 2em;
}
.image-container {
width: 100%;
margin-bottom: 40px;
}
.image-container img {
max-width: 100%;
height: auto;
display: block;
margin: auto;
border: 1px solid #dee2e6;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.matrix-image-container img {
max-width: 50%;
height: auto;
display: block;
margin: auto;
border: 1px solid #dee2e6;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.back-button {
text-align: center;
margin-top: 20px;
}
.custom-button {
background-color: #610b5d;
color: #fff; /* Set white text color */
border-radius: 15px; /* Rounded edges */
padding: 10px 20px; /* Padding for the button */
font-size: 18px; /* Increase font size */
text-decoration: none; /* Remove underline */
}
.custom-button:hover {
background-color: #812b7d;
color: #fff;
}
</style>
</head>
<body>
<div class="container">
<h1 class="mt-5">Stick To Your Role! Leaderboard</h1>
<div class="model-name">Model: {{ model_name }}</div>
<div class="section">
<h1>Model details</h1>
{{ model_detail|safe }}
</div>
<div class="section">
<h1>Detailed results</h1>
<p>
Below we show detailed results and visualizations for each metric in each context chunk.
We are scoring the expressed values of a simulated participant in a context.
The population is simulated 9 times, once for each context chunk.
A context chunk is a set of 50 contexts - one context for each individual.
For instance, chunks_0-4 contain reddit posts (longest in chunk_0, shortest in chunk_4).
When comparing chunk_0 and chunk_4, the conversations with the participants are initialized first with posts from chunk_0 and then with posts form chunk_4.
Metrics and chunks are explained in more detail on the <a href="{{ url_for('about') }}">Motivation and Methodology page</a>.
</p>
</div>
<div class="section">
<h2>Structure</h2>
<p>
This image shows the circular value structure projected on a 2D plane.
This was done by computing the intercorrelations between different values this space was then reduced with a SVD-based approach and varimax rotation (`FactorAnalysis` object from `scikit-learn`).
The theoretical order (shown in the top left figure) was used to initialize the SVD.
Stress denotes the fit quality.
<!-- The distance is computed as the average distance of each value to it's rank in the theoretical order.-->
<!-- The minimal distance with the theoretical order in the clockwise and counter-clockwise direction was taken as the final distance.-->
</p>
<div class="image-container">
<a href="{{ url_for('static', filename='models_data/' + model_name + '/structure.svg') }}" target="_blank">
<img src="{{ url_for('static', filename='models_data/' + model_name + '/structure.svg') }}" alt="Structure">
</a>
</div>
</div>
<div class="section">
<h2>Confirmatory Factor Analysis metrics</h2>
<p>
This tables show the metrics resulting from the Magnifying class CFA procedure:
for each context chunk four CFA models are fit (one for each high level value).
The average of the metrics for those four CFA models are shown for each context chunk.
</p>
<div class="table-responsive">
{{ cfa_table_html|safe }}
</div>
</div>
<div class="section">
<h2>Pairwise Rank-Order stability</h2>
<p>
This image shows the Rank-Order stability between each pair of context chunks.
Rank-Order stability is computed by ordering the personas based on their expression of some value,
and then computing the correlation between their orders in two different context chunks.
The stability estimates for the ten values are then averaged to get the final Rank-Order stability measure.
Refer to our <a href="https://arxiv.org/abs/2402.14846">paper</a> for details.
</p>
<div class="matrix-image-container">
<a href="{{ url_for('static', filename='models_data/' + model_name + '/matrix.svg') }}" target="_blank">
<img src="{{ url_for('static', filename='models_data/' + model_name + '/matrix.svg') }}" alt="Matrix" >
</a>
</div>
</div>
<div class="section">
<h2>Visualizing the order of simulated personas</h2>
<p>
This image shows the order of personas in each context chunk for each value.
For each value (row), the personas are ordered on the x-axis by their expression of this value in the `no_conv` setting (gray).
Therefore, the Rank-Order stability between the `no_conv` chunk and some chunk corresponds to the extent to which the curve is increasing in that chunk.
</p>
<div class="image-container">
<a href="{{ url_for('static', filename='models_data/' + model_name + '/ranks.svg') }}" target="_blank">
<img src="{{ url_for('static', filename='models_data/' + model_name + '/ranks.svg') }}" alt="Ranks">
</a>
</div>
</div>
<div class="back-button">
<a href="{{ url_for('index') }}" class="custom-button mt-3">Main page</a>
</div>
</div>
<!-- Include Bootstrap JS -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
<!-- Include jQuery -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Include Bootstrap JS -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
<!-- Include DataTables JS -->
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.11.5/js/dataTables.bootstrap5.min.js"></script>
<!-- Initialize DataTables -->
<script>
$(document).ready(function() {
const table = $('table').DataTable({
"paging": false,
"info": false,
"columnDefs": [
{ "orderable": false, "targets": 0 },
{ "searchable": false, "targets": 0 }
],
"order": [[ 2, 'desc' ]],
"drawCallback": function(settings) {
var api = this.api();
api.column(0, {order:'applied'}).nodes().each(function(cell, i) {
cell.innerHTML = i + 1;
});
}
});
});
</script>
</body>
</html>