FishingPredictor-MLNET is a lightweight ML.NET console application that uses a small fishing dataset to predict fishing patterns/outcomes based on environmental conditions.
The goal of the project is to demonstrate how to:
- Load data from CSV
- Define an ML.NET data model
- Build and train an ML pipeline
- Evaluate the model
- Make predictions from new input values
Itβs a compact, easy-to-read example of using ML.NET in C# on a real-world themed problem (fishing).
- β ML.NET regression / prediction model for fishing-related data
- β
Reads training data from
simple_data.csv - β
Strongly-typed input model (
FishingLiteData) - β Builds an ML pipeline, trains, and evaluates the model
- β Console output showing predictions for sample scenarios
- β Clean, minimal code suitable for teaching or portfolio use
(If you later change the task to classification or a different label, you can easily tweak this section.)
The sample dataset simple_data.csv is a small synthetic dataset representing fishing trips.
Examples of features you might include:
- Time of day
- Weather / cloud cover
- Water temperature
- Lure / bait type
- Location or depth category
- Recent catch activity
The target value might be:
- A catch score (0β10)
- Number of fish caught
- Probability of success
You can expand the CSV to include more features and records over time.
A typical ML.NET pipeline in this project looks like:
- Load data from
simple_data.csv - Map CSV columns to the
FishingLiteDataC# class - Process features (e.g., handle numeric and categorical data)
- Train a model using an ML.NET trainer (e.g., regression)
- Evaluate the model on a test split
- Use the model to make predictions for new fishing conditions
The core logic for this lives in:
Program.csβ app entry point, training, evaluation, predictionFishingLiteData.csβ model that defines the input schema
FishingPredictor/
β
βββ FishingPredictor.sln # Solution file
βββ FishingPredictor.csproj # Project file
βββ Program.cs # Main console app (training + prediction)
βββ FishingLiteData.cs # ML.NET input model class
βββ simple_data.csv # Sample fishing dataset (training data)
Prerequisites .NET 6+ SDK Visual Studio 2022 or dotnet CLI ML.NET packages (added via NuGet in the project)
Run the app Clone the repository and run:
git clone https://github.com/Maxtheflash/FishingPredictor-MLNET.git cd FishingPredictor-MLNET dotnet run
You should see console output for: Training / evaluation results Sample prediction(s) based on hard-coded input in Program.cs
- Replace the small CSV with a larger real-world fishing log
- Add more features (moon phase, pressure, water clarity, season)
- Save and load the trained model to/from disk
- Build a small API or UI on top of the model
- Integrate with Catch Keeper as a βsuggested patternβ engine
Branden Maxwell Software Developer (.NET | ML.NET | SQL) GitHub: @Maxtheflash