Giter VIP home page Giter VIP logo

ml-crackdetection-py's Introduction

Feature Extraction and Classification using FDA and PCA

This project aims to perform feature extraction on time and frequency domain signals and subsequently classify them into three categories: Tensile, Shear, and Mixed. The features extracted from the signals include both time and frequency domain characteristics.

Dependencies

  • NumPy
  • SciPy
  • Matplotlib
  • Scikit-Learn
  • Pandas

Dataset

The training and testing datasets are loaded from MAT files (x_train.mat and y_train.mat for training, and Testing_dataset_1650AE_1000_samples.mat for testing) using SciPy's loadmat function.

Feature Extraction

The features_extraction function is defined to extract various statistical features from both time and frequency domains. These features include minimum, maximum, mean, RMS (Root Mean Square), variance, standard deviation, power, peak value, peak-to-peak value, crest factor, skewness, kurtosis, and various statistical measures from the frequency domain.

Data Processing

The extracted features are computed for both training and testing datasets. The results are stored in Pandas DataFrames for better visualization and organization.

Standardization and Dimensionality Reduction

The training data is standardized using Scikit-Learn's StandardScaler. Principal Component Analysis (PCA) is then applied to reduce the dimensionality of the feature space while retaining important information.

Linear Discriminant Analysis (LDA) Model

A Linear Discriminant Analysis (LDA) model is trained on the transformed feature space using the training data. The model is trained to classify signals into three classes: Tensile, Shear, and Mixed.

Prediction and Visualization

The testing data is standardized and transformed using the same scaler and PCA model. The trained LDA model is then used to predict the classes of the testing data. The results are visualized by plotting the first two principal components against each other, with different colors indicating different classes. Additionally, predicted classes for the testing data are marked with 'x' symbols on the plot.

ml-crackdetection-py's People

Contributors

mrurespect avatar

Stargazers

 avatar

Watchers

 avatar  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.