An open API service indexing awesome lists of open source software.

https://github.com/dunningkrueg/machine-learning-2.0

hmzmmzmzmzmz
https://github.com/dunningkrueg/machine-learning-2.0

analysis clang cpp machine-learning project

Last synced: 2 days ago
JSON representation

hmzmmzmzmzmz

Awesome Lists containing this project

README

        

# Machine Learning Framework

A C++ Machine Learning Framework with "modern" implementations of Decision Trees and Neural Networks.

## Features

### Core Models
- **Decision Tree**
- Advanced Gini impurity implementation
- Feature importance analysis
- Efficient model serialization
- Optimized splitting algorithm

- **Neural Network**
- Multi-layer perceptron architecture
- Sigmoid activation function
- Backpropagation with momentum
- Early stopping mechanism
- Batch processing support

### Utilities
- **Cross Validation**
- K-Fold implementation
- Stratified sampling
- Performance metrics

- **Data Processing**
- CSV data loading
- Automatic normalization
- Train/test splitting
- Data validation

- **Visualization**
- Learning curve plotting
- Model performance analysis
- Feature importance visualization

## Requirements

- C++17 compatible compiler
- CMake 3.14 or higher
- Visual Studio 2019/2022 (Windows) or GCC/Clang (Linux/Mac)

## Quick Start

### Building the Project

```bash
mkdir build
cd build
cmake ..
cmake --build .
```

### Running the Example

```bash
cd build/Debug # or Release
./MLExample
```

### Basic Usage Example

```cpp
#include "MLFramework.hpp"
int main() {
// Load and prepare data
ml::Dataset dataset;
dataset.loadFromCSV("data.csv");
dataset.normalize();
// Split dataset
auto split = dataset.split(0.8);
// Create and train model
ml::NeuralNetwork model({split.trainFeatures[0].size(), 10, 5, 1});
model.fit(split.trainFeatures, split.trainLabels);
// Make predictions
auto predictions = model.predict(split.testFeatures);
// Evaluate performance
double mse = ml::metrics::meanSquaredError(predictions, split.testLabels);
std::cout << "Model MSE: " << mse << std::endl;
return 0;
}
```

### Contributing

1. Fork the repository
2. Create feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit changes (`git commit -m 'Add AmazingFeature'`)
4. Push to branch (`git push origin feature/AmazingFeature`)
5. Open Pull Request

### License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.