added user status and prediction user
This commit is contained in:
@ -14,17 +14,20 @@
|
||||
<ng-container *ngIf="multipleSamples; else singleSampleResult">
|
||||
<h4 *ngFor="let prediction of result.predictions; index as i">
|
||||
{{spectrumNames[i]}}: {{prediction}} {{activeGroup.models[activeModelIndex].label}}
|
||||
<a [routerLink]='"."' fragment="disclaimer"><sup>#</sup></a>
|
||||
</h4>
|
||||
</ng-container>
|
||||
<ng-template #singleSampleResult>
|
||||
<h4>
|
||||
Average result: {{result.meanPrediction}} {{activeGroup.models[activeModelIndex].label}},
|
||||
standard deviation: {{result.std}}
|
||||
Average result: {{result.meanPrediction}} {{activeGroup.models[activeModelIndex].label}}
|
||||
<a [routerLink]='"."' fragment="disclaimer"><sup>#</sup></a>,
|
||||
standard deviation: {{result.std}}<a [routerLink]='"."' fragment="disclaimer"><sup>#</sup></a>
|
||||
</h4>
|
||||
<a href="javascript:" class="rb-details-toggle" rbDetailsToggle #triggerDetails="rbDetailsToggle">Details</a>
|
||||
<div *ngIf="triggerDetails.open" class="space-below">
|
||||
<p *ngFor="let prediction of result.predictions; index as i">
|
||||
{{spectrumNames[i]}}: {{prediction}} {{activeGroup.models[activeModelIndex].label}}
|
||||
<a [routerLink]='"."' fragment="disclaimer"><sup>#</sup></a>
|
||||
</p>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -53,7 +56,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dpt-chart">
|
||||
<div class="dpt-chart space-below">
|
||||
<canvas baseChart
|
||||
class="dpt-chart"
|
||||
[datasets]="chart"
|
||||
@ -63,3 +66,12 @@
|
||||
chartType="scatter">
|
||||
</canvas>
|
||||
</div>
|
||||
|
||||
<div class="shaded-container" id="disclaimer">
|
||||
<h4><sup>#</sup>Disclaimer: This tool is still under development</h4>
|
||||
<p>
|
||||
The prediction and classification of material parameters are validated only for certain conditions.
|
||||
These results may therefore under no circumstances be used to evaluate quality-relevant issues. <br>
|
||||
For more details please contact <a [href]="'mailto:' + d.contact.mail">{{d.contact.name}}</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
@ -1,6 +1,7 @@
|
||||
.dpt-chart {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.file-input {
|
||||
|
@ -5,6 +5,7 @@ import {animate, style, transition, trigger} from '@angular/animations';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import {DataService} from '../services/data.service';
|
||||
import {ModelItemModel} from '../models/model-item.model';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
|
||||
interface PredictionResult {
|
||||
meanPrediction: string;
|
||||
@ -86,7 +87,8 @@ export class PredictionComponent implements OnInit {
|
||||
if (files.hasOwnProperty(i)) {
|
||||
const fileReader = new FileReader();
|
||||
fileReader.onload = () => {
|
||||
this.spectrum = fileReader.result.toString().split('\r\n').map(e => e.split(',').map(el => parseFloat(el))) as any;
|
||||
this.spectrum = fileReader.result.toString().split('\r\n').map(e => e.split(',').map(el => parseFloat(el)))
|
||||
.filter(el => el.length === 2) as any;
|
||||
this.flattenedSpectra[i] = {labels: this.spectrum.map(e => e[0]), values: this.spectrum.map(e => e[1])};
|
||||
this.chart[i] = cloneDeep(this.chartInit);
|
||||
this.chart[i].data = this.spectrum.map(e => ({x: parseFloat(e[0]), y: parseFloat(e[1])}));
|
||||
|
Reference in New Issue
Block a user