A React-based web application for visualizing machine learning model predictions. Upload your dataset, select a model, and see the predictions visualized in real-time.
- 📊 Interactive data visualization using Chart.js
- 📁 JSON dataset upload with validation
- 🤖 Multiple ML model options (Linear Regression, Decision Tree, Random Forest)
- 🎨 Modern UI with Tailwind CSS
- 📱 Responsive design
- 🔒 Type-safe with TypeScript
- React 19
- TypeScript
- Chart.js & react-chartjs-2
- Tailwind CSS
- Webpack 5
- Node.js (v14 or higher)
- npm (v6 or higher)
- Clone the repository:
git clone https://github.com/yourusername/ml-visualizer.git
cd ml-visualizer- Install dependencies:
npm install- Start the development server:
npm start- Open http://localhost:3000 in your browser
Upload a JSON file with the following structure:
{
"features": number[][], // 2D array of numerical features
"labels": number[], // Array of target values
"featureNames": string[], // Array of feature names
"labelName": string // Name of the target variable
}A sample dataset (sample_data.json) is provided for testing. It contains house price prediction data with the following features:
- Square footage
- Number of bedrooms
- Number of bathrooms
- Distance to city center
- Year built
- Upload your dataset using the file uploader
- Select a machine learning model from the dropdown
- Click "Train Model" to generate predictions
- View the visualization comparing actual vs predicted values
ml-visualizer/
├── src/
│ ├── components/
│ │ ├── FileUploader.tsx # Dataset upload component
│ │ ├── ModelSelector.tsx # Model selection and training
│ │ └── Visualizer.tsx # Results visualization
│ ├── types.ts # TypeScript interfaces
│ ├── App.tsx # Main application component
│ └── index.tsx # Application entry point
├── public/
│ └── index.html # HTML template
└── sample_data.json # Sample dataset for testing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details