🔒
International Scientific Platform
Serving Researchers Since 2012

Offline Fish Price Prediction Using Embedded Linear Regression in a Flutter Mobile Application

DOI : 10.17577/IJERTCONV14IS010019
Download Full-Text PDF Cite this Publication

Text Only Version

Offline Fish Price Prediction Using Embedded Linear Regression in a Flutter Mobile Application

Deeksha Tharanath

Department of Computer Applications St Joseph Engineering College Mangalore

Abstract- The price of fish often changes depending on supply, demand, seasons, and the location where the fish are sold. These changes make it difficult for fishermen and boat owners to plan properly. This project presents a fish price prediction tool that works fully offline. It runs inside a mobile app made with Flutter. A Linear Regression model was trained using actual fish catch data like species, quantity, date, and region.

Most prediction systems rely on the internet or servers. But this one does not. Instead, the trained model and encoders are saved in a JSON file and used directly in the Flutter app. That way, the prediction works on the device itself, with no need for internet. Its fast, lightweight, and keeps the data privatevery useful in remote coastal areas.

Fishermen or boat owners just enter details of tomorrows expected catch. The app then gives an estimated price. This project shows how machine learning can be used in a mobile app without depending on the cloud or Firebase Blaze. It is especially useful for places with poor connectivity, like rural fishing regions.

Index Terms Fish price prediction, offline machine learning, Flutter, Linear Regression, Mobile Application.

  1. INTRODUCTION

    Fishing is how many families in coastal areas earn their living. Its also important for the economy in these places. But theres a big problem fish prices are never stable. They change every day. Sometimes its because of which fish are available. Other times, it depends on the season, demand, or the market where the fish are sold. Because of this, fishermen often dont know how much money theyll make. They cant plan well, and sometimes they lose money.

    Phones and apps are becoming more common, even in rural areas. So, theres a chance to help fishermen with simple tech. But most fish price apps today need internet or cloud access. That doesnt work well in places with poor network signals.

    This work shows a different idea. A mobile app is made using Flutter that does fish price prediction without needing the internet. It uses real data and a machine learning model trained in Python. That model is saved in a file and used in

    Gururaja S

    Department of Computer Applications St Joseph Engineering College Mangalore

    the app. So, when the user enters the details, the app predicts the price right away all on the device.

    The goal is simple: help fishermen know what price to expect before they go out to sell fish. Its made for people in remote areas, where the internet may not work. By mixing machine learning and mobile apps, this system helps fishing communities make better decisions.

  2. LITERATURE REVIEW

    Many researchers have worked on fish price prediction because it helps with decision-making in fisheries and selling. Machine learning is used in most of these studies to predict prices based on older data.

    In one study called [1] Advanced Machine Learning for Fish Price Prediction Using an XGBoost Approach (UBC, 2024), the authors used ensemble models. They used features like fish type, seasonal trends, and market demand. The model gave good results, but it needed internet because it worked with server-based data.

    Another work, [2] Fully Automated Learning and Prediction of Aquatic Products in Taiwan Wholesale Markets, used both machine learning and deep learning. It was made for big wholesale markets and used strong infrastructure.

    A different approach used Artificial Neural Networks (ANN) in [3] Forecasting Fish Prices with an Artificial Neural Network Model (2024). It was helpful during sudden market changes but still required cloud support.

    There were also studies focusing on certain markets. For example, [4] Prediction of Shrimp Price Based on WOA- VMD-XGBoost Algorithm used hybrid models for shrimp price prediction. Another article from [5] The Fish Site talked about using machine learning for predicting shrimp prices in Vietnams export markets.

    All of these show that machine learning works well for predicting fish prices. But most of them depend on internet or

    cloud systems. None of them focus on helping fishermen in offline or low-connectivity places.

    This project is different. It uses a simple linear regression model trained on old fish market data. The model is added directly into a mobile app. It can predict prices without needing internet or cloud. That makes it more useful for people living in remote coastal areas.

  3. METHODOLOGY

    The main aim of this work is to predict the next days fish price using a machine learning model that works without the internet. The full process was done in a few steps from collecting the data to using the model inside a mobile app.

    First, data was collected in the form of tables (CSV files). The data had several fields like:

    • Date when the entry was recorded

    • Fish species (like Sardine, Indian Mackerel)

    • Location of the market or landing site (like Mangalore or Malpe)

    • Quantity of fish caught

    • Price per kilogram

      Some steps were needed to clean and prepare the data. This included fixing column names, removing missing rows, and converting the date into smaller parts like day, month, and weekday. Then, the species and location names were turned into numbers using one-hot encoding so the machine learning model could understand them. To extract date-based features, the datetime functions from Pythons pandas library were used. Specifically, the model uses the day (.dt.day), month (.dt.month), and weekday (.dt.weekday) of each entry. These help the model capture time-based price trends.

      For training the model, linear regression was chosen. Its simple, easy to understand, and works well with structured data like this. Python and the scikit-learn library were used for training. The model took in all the features like the one- hot encoded species and location, quantity, day, month, and weekday. The model then gave a price as the output.

      Once the model was trained, it gave a list of weights (numbers for each input) and one bias value. These were saved in a JSON file, along with the list of species and location categories. That file was used inside the mobile app later.

      The app was made using Flutter. The JSON file was added to the app as part of its assets. A Dart class was written to read the file and use the weights and categories. When a user enters the species, location, and quantity, the app makes tomorrows

      date features automatically, builds the input list, and does the math using the weights to give a predicted price.

      Because everything happens inside the app, theres no need for Firebase, cloud servers, or internet. This is especially useful for users in coastal areas where signals are weak or missing.

      Fig. 1. Flowchart of the Fish Price Prediction Process There are a few clear benefits:

    • It works offline.

    • It uses real machine learning, not a hardcoded formula.

    • Its fast and light, so it runs on low-end phones too.

    • New features like season or weather data can be added later.

  4. RESULTS AND ANALYSIS

    After training the model, it was checked to see how well it could guess fish prices. The dataset was divided most for learning, the rest for checking. To measure how close the guesses were, some standard methods were used like how far the guesses were from real prices (MAE), ow big the errors were (MSE), and how well the model explained the changes (R² score).

    The trained model was tested using standard regression metrics. It achieved a Mean Absolute Error (MAE) of 44.63 and a R² Score of 0.60 on the test set. These results indicate reasonably accurate predictions given the simplicity of the

    model and the limited dataset. For common fish and locations, the models prices were close to actual market prices. It worked better when the data had more samples for a particular fish type or place.

    Once the training was done, the model was added to the mobile app. It was tested on phones in different conditions. The app gave quick results. Below are a few examples:

    Indian Mackerel from Malpe

    20 kg

    151.83

    Oil Sardine from Hejamadi

    10 kg

    66.59

    Halibut from Polipu

    15 kg

    174.66

    Fig. 2. Predicted price output in the app

    Each time, the app showed the result in less than a second. No internet was needed. Thats a big advantage for places with weak or no signal.

    People who used the app said it was easy. They just picked the species and location, entered the amount, and clicked a button. The price came right away.

    Still, there are a few things to improve:

    • It doesnt do as well for fish types that were rare in

      the data.

    • It doesnt use seasonal or weather details yet.

    • New fish or places that were not in the training data may not give correct results.

  5. CONCLUSION

    This work shows a useful way to guess fish market prices using real machine learning inside a mobile app. The model used is Linear Regression, trained with real fish data, and it was turned into a format that the app can use without internet.

    By keeping everything offline, the app can work even in places where theres no signal. Fishermen and boat owners can quickly check the likely price of their catch for the next day. The app is simple to use, runs fast, and doesnt need any server or cloud.

    The main idea was to help people in remote coastal areas make better choices when selling fish. And by using real data and a working ML model, this app proves that useful tech doesnt always need to be online or expensive.

  6. FUTURE WORK

In the future, there are a few things that can be added to make this app more useful. Right now, it uses a simple linear model, but other models like random forest or some tree-based ones might work even better. It depends on the data.

Things like season or weather arent included in the model yet. If that kind of info can be included, it might help make the price predictions more accurate. For example, in rainy seasons, the catch or price might change, and the model could learn from that.

The app also uses old data. If the data is updated often, the model will not fall behind. Prices change with time, so regular updates will keep it working properly.

The app only works in English now. If more languages are added, especially local ones, then more people can use it easily.

And maybe one day, a simple page can be made for admin use. They can see trends and plan better for the fishing community.

REFERENCES

  1. [1] A. Sharma and R. Kumar, Advanced machine learning for fish price prediction using an XGBoost approach, Fisheries Economics Working Paper, Univ. of British Columbia, 2024.

  2. [2] Y. T. Chen, C. W. Lin, and J. H. Huang, Fully automated learning and prediction of aquatic products in Taiwan wholesale markets, Computers and Electronics in Agriculture, 2024.

  3. [3] K. M. Rao and N. Jaiswal, Forecasting fish prices with an artificial neural network model during market shocks, 2024.

  4. [4] H. Zhang and S. Liu, Prediction of shrimp price based on WOA- VMD-XGBoost algorithm and SHAP model, International Journal of Aquaculture Analytics, 2024.

  5. [5] T. L. Tran and P. M. Nguyen, Using machine learning to predict shrimp prices in Vietnam, The Fish Site, 2023.

  6. [6] D. Kumar and M. Prasad, Price forecasting of marine fish based on weight allocation using smart learning models, PLOS ONE, 2024.