Code Monkey home page Code Monkey logo

least_squares_smoothing_science_research's Introduction

General Information

This is my second university project in which I develop software required to conduct a mathematical research on smoothing data noises using modified least squares method.

To launch the application run the "interface.py" file.

About the application

The application is developed for researching different aspects of noise smoothing using least squares method modified to use a window with changing length instead of the entire dataset. All the code was written in Python 3.10.4 uisng such modules as

- tkinter
- sympy
- matplotlib
- math
- pandas
- numpy

Smoothing with fixed window length

LocalLS_SpeedX2

Smoothing with dynamic window length

Новый_проект_AdobeExpress

The application consists of two main blocks: generator and approximator.

Generator

The generator allows you to create sets of points in two-dimensional space based on elementary mathematical functions. The points are saved to a Microsoft Excel table. The generator has a large number of customizable parameters, including the function on the basis of which the points are generated, the interval on which the points will lie, the number of points. The distribution of points on the interval can be regulated - they can be distributed evenly or with a random step. In addition, there is a possibility to generate intervals filled only partially, the percentage of their filling can change dynamically within the specified limits. Noise is applied to the resulting set after generation. It may be a percentage of the original value or an absolute value, may have a uniform or normal distribution with specified parameters. Outliers with adjustable frequency and values can also be added.

image

Approximator

In the approximator block several regression algorythms were programmatically implemented allowing to set various approximation parameters, such as selection of approximation leverage - fixed or dynamic, manual setting of leverage, ability to find an optimal fixed leverage using sequential search of all values, dichotomy or golden section method (which parameters are set manually to avoid stucking in the local minimum). The possibility of data smoothing by dynamic leverage with selection of the optimal vector of shoulders using all variants, random sampling, dichotomy, the Golden Ratio method, as well as a genetic algorithm is implemented. There is an opportunity to stop the process of selecting the optimum leverage, without waiting for its completion to get the best calculated by the moment result. In addition, for the dynamic and fixed arm there is an opportunity to smooth the ends of the graph by moving the point of depreciation from the center to the edge. The possibility to select different methods of calculation of the deviation such as the sum of squares, the sum of modules and the standard deviation is implemented; there is an opportunity not to take the chart ends into account when calculating the deviation. Visualization options of the approximation process allow you to connect the smoothed points with a line, show the actual function by which the points with noise were generated, automatically save the graph with the approximation result on the selected path. It is possible to approximate data by alternative algorithms within one figure. It is possible to show the animation of the approximation process in real time.

image

least_squares_smoothing_science_research's People

Contributors

x-wheel-of-fortune avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.