Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import { Progress } from "@/components/ui/progress"
import { Separator } from "@/components/ui/separator"
import { format } from "date-fns"
import {ModelMetadataType} from "@/lib/types/stock_prediction";
Expand Down Expand Up @@ -55,7 +54,7 @@ export default function ModelMetadata({ metadata }: ModelMetadataProps) {
<Card>
<CardHeader>
<CardTitle>Model Performance</CardTitle>
<CardDescription>Accuracy and error metrics</CardDescription>
<CardDescription>error metrics</CardDescription>
</CardHeader>
<CardContent className="space-y-6">
{/* <div>
Expand All @@ -70,19 +69,9 @@ export default function ModelMetadata({ metadata }: ModelMetadataProps) {
<p className="text-sm font-medium">Mean Absolute Error (MAE)</p>
<p className="text-sm font-medium">{metadata.maeScore.toFixed(5)}</p>
</div>
<Progress value={100 - metadata.maeScore * 10} className="h-2" />
{/* <Progress value={100 - metadata.maeScore * 10} className="h-2" /> */}
<p className="text-xs text-muted-foreground mt-1">Average error in price predictions</p>
</div>
<div>
<div className="flex items-center justify-between mb-2">
<p className="text-sm font-medium">R² Score</p>
{/* <p className="text-sm font-medium">{metadata.r2Score.toFixed(2)}</p> */}
</div>
{/* <Progress value={metadata.r2Score * 100} className="h-2" /> */}
<p className="text-xs text-muted-foreground mt-1">
Proportion of variance explained by the model (1.0 is perfect)
</p>
</div>
</CardContent>
</Card>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default function StockDashboard() {
<div className="flex flex-col items-center justify-center h-[70vh]">
<div
className="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500 mb-4"></div>
<p className="text-gray-300">Predicting stock close prices...</p>
<p className="text-gray-300">Getting Predictions for {selectedCompany} </p>
</div>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export default function StockPredictionChart({historicalData, predictionData}: S
if (value === null) return ["-", name]
return name === "Price" || name === "Predicted" ? [`$${value}`, name] : [`$${value}`, name]
}}
labelFormatter={(label) => `Date: ${label}`}
labelFormatter={(label) => (
<span style={{ color: "blue" }}>{`Date: ${label}`}</span>
)}
/>
<Legend/>
<Line
Expand Down
2 changes: 1 addition & 1 deletion src/lib/const.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const BACKEND_BASE_URL = "http://localhost:8000";
export const BACKEND_BASE_URL = "http://localhost:8000";