Engineer
ALGERIA • + Follow
Edit Project
Components
|
|
labtop with powerfull procesor or gpuasus
|
x 1 |
Tools, APP Software Used etc.
|
Python 3.9Python Community
|
Description
predective maintenance using machine learning
maintenace play major role in factory , it can make us gain money or lose it , so this why we need to minimize the stop time of the machine , and here where the predictive maitenace enter . we use machine learning algorithm with dataset to know when the equipment gona fail ,like pump motor and so on , my project here use machine learning algorithm to do this work .
Code
Python
from PyQt5.QtWidgets import *
from PyQt5 import uic
import sys
from PyQt5.QtWidgets import QFileDialog, QApplication
import pandas as ps
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score
import numpy as np
class Mygui(QMainWindow):
def __init__(self):
super(Mygui, self).__init__()
try:
#uic.loadUi("D:/qt designer/PrevMaintenance.ui", self)
uic.loadUi("PrevMaintenance.ui", self)
self.show()
self.file_path = None # Initialize to None to avoid errors
self.browsfile.clicked.connect(self.browsefile)
self.newdata.clicked.connect(self.gettext)
self.analyse.clicked.connect(self.get_text)
except Exception as e:
print(f"An error occurred during initialization: {e}")
def browsefile(self):
try:
options = QFileDialog.Options()
options |= QFileDialog.DontUseNativeDialog
self.file_path, _ = QFileDialog.getOpenFileName(self, "Select a file", "", "All Files (*);;Text Files (*.txt)", options=options)
print(f"Selected File: {self.file_path}") # Debugging: Check the file path
self.browsresult.setProperty("text", self.file_path)
if self.file_path: # Check if a file was selected
pass# self.process_table(file_path)
print("eft")
except Exception as e:
print(f"An error occurred while browsing the file: {e}")
def process_table(self, file_path):
try:
det =ps.read_csv(file_path,delimiter = ",")
# x= det.drop(columns =6,axis=1)
#x=det.drop(columns=[4],axis=1)
global knn
x = det.iloc[:, :colonend]
print ("this is x",x)
y = det.iloc[:, [labelcolon]]
y = y.to_numpy().flatten()
print(y.shape)
x_train ,x_test , y_train, y_test = train_test_split(x,y,test_size=percent,random_state=1)
knn = KNeighborsClassifier(n_neighbors=kk)
knn.fit(x_train, y_train)
y_pred = knn.predict(x_test)
# Evaluate the model
accuracy = accuracy_score(y_test, y_pred)
print(f"Accuracy: {accuracy * 100:.2f}%")
self.accuracy1.setProperty("text", accuracy * 100)
except Exception as e:
print(f"An error occurred while processing the file: {e}")
def gettext(self):
try:
global items
text8 = self.newdata_2.text()
items = np.array([item.strip() for item in text8.split(",") if item.strip()],dtype=float).reshape(1, -1)
print("text of arry",items)
result = knn.predict(items)
#self.plainTextEdit_4.setProperty("text", result)
self.plainTextEdit_4.setPlainText(str(result))
except Exception as e:
print(f"An error occurred while processing the file: {e}")
def get_text(self):
try:
global colonend
global labelcolon
global percent
global kk
text1 = self.label1.text() # Get text from QLineEdit
labelcolon=int(text1)
text2 = self.endcolumns.text() # Get text from QLineEdit
colonend=int(text2)
text3 = self.percentage.text() # Get text from QLineEdit
percent = float(text3)
text4 = self.ktuned.text() # Get text from QLineEdit
kk = int(text4)
print(f"Entered text: {labelcolon}") # Print to console or use in logic
self.process_table(self.file_path)
except Exception as e:
print(f"An error occurred while processing the file: {e}")
def main():
app = QApplication([])
window = Mygui()
sys.exit(app.exec_())
if __name__ == "__main__":
main()
Schematic and Layout
Jan 31,2026
14 views
predective maintenance using machine learning
maintenace can be coastly and take to much time , but with predictive maintenace we can solve this
14
0
0
Published: Jan 31,2026
Standard PCB
Purchase
Donation Received ($)
PCBWay Donate 10% cost To Author
Copy this HTML into your page to embed a link to order this shared project
Copy
This work is licensed under a Standard Digital File License.
Digital files have a strict non-commercial, personal use only license.
You shall not share, sub-license, sell, rent, host, transfer, or distribute
in any way the digital file or 3D printed versions of this object, nor any
other derivative work of this object in its digital or physical format
(including remixes of this object).
You can not host these files on other digital platforms, web stores or cloud
repositories.
The objects may not be used in any way whatsoever in which you charge money,
collect fees.
- ✖ | No sharing or redistributing in any way of the 3D files or derivatives
- ✖ | No remixing
- ✖ | Non-commercial Use (only for personal use)
Under the
Standard Digital File
License.
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(0)
Upload photo
You can only upload 5 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP
0 / 10000
It looks like you have not written anything. Please add a comment and try again.
You can upload up to 5 images!
Image size should not exceed 2MB!
File format not supported!
View More
View More
VOTING
0 votes
- 0 USER VOTES
0.00
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Design
1/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Usability
2/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Creativity
3/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Content
4/4
More by Engineer
-
predective maintenance using machine learning
maintenace play major role in factory , it can make us gain money or lose it , so this why we need t...
-
motor starting using star delta device
my project is about making device that can be star 3 phase ac induction motor with high power using ...
-
sea monitoring for fishe farming
the project is about helping the fishe farmer who rise the fishes inthe ocean or seas to monitor th...
You may also like
-
ARPS-2 – Arduino-Compatible Robot Project Shield for Arduino UNO
67 0 0 -
A Compact Charging Breakout Board For Waveshare ESP32-C3
540 3 4 -
AI-driven LoRa & LLM-enabled Kiosk & Food Delivery System
529 2 0 -
-
-
-
ESP32-C3 BLE Keyboard - Battery Powered with USB-C Charging
742 0 1 -
-
mammoth-3D SLM Voron Toolhead – Manual Drill & Tap Edition
706 0 1 -
-
AEL-2011 Power Supply Module
1384 0 2







