create_parameter_form = (dr_method) => {
switch (dr_method) {
case "ISOMAP":
case "LLE":
case "LTSA":
return html`<form>
<label><input name="neighbors" type="range" min=10 max=300 value=10 /> neighbors <i>neighbors</i></label>
</form>`;
break;
case "SAMMON":
return html`<form>
<label><input name="magic" type="range" min=0 max=1 value=0.1 step=0.1 /> magic <i>magic</i></label>
</form>`;
break;
case "TSNE":
return html`<form>
<label><input name="perplexity" type="range" min=2 max=100 value=50 /> <i>perplexity</i></label><br>
<label><input name="epsilon" type="range" min=1 max=100 value=5 /> <i>epsilon</i></label>
</form>`;
break;
case "UMAP":
return html`<form>
<label><input name="n_neighbors" type="range" min=2 max=100 value=20 /> number of neighbors <i>n_neighbors</i></label><br>
<label><input name="min_dist" type="range" min=0.05 max=1.5 step=.05 value=0.1 /> minimum distance <i>min_dist</i></label>
</form>`;
break;
case "TriMap":
return html`<form>
<label><input name="weight_adj" type="range" min=100 max=100000 value=100 /> scaling factor <i>weight_adj</i></label><br>
<label><input name="c" type="range" min=1 max=10 value=5 /> number of triplets multiplier <i>c</i></label>
</form>`;
break;
case "LSP":
return html`<form>
<label><input name="neighbors" type="range" min=10 max=300 value=30 /> number of neighbors to consider <i>k</i></label><br>
<label><input name="control_points" type="range" min=10 max=100 value=20 /> number of controlpoints <i>control_points</i></label>
</form>`;
break;
case "LDA":
return html`<form>
<label>
<select name="clusters">
<option value="islands">islands</option>
<option value="species">species</option>
</select>
<i>class labels</i>
</form>`;
break;
default:
return html`<form>
${dr_method} has no parameters!
</form>`;
break;
}
}