Skip to content

Predictive Maintenance

Industry Department Role
High-Tech & Manufacturing Operations Data Scientist

Processed Dataset

Data

This dataset contains force and torque measurements on a robot after failure detection. Each failure is characterized by 15 force/torque samples collected at regular time intervals.

id time F_x F_y F_z T_x T_y T_z target
1 0 -1 -1 63 -3 -1 0 True
1 1 0 0 62 -3 -1 0 True
1 2 -1 -1 61 -3 0 0 True
1 3 -1 -1 63 -2 -1 0 True
1 4 -1 -1 63 -3 -1 0 True
1 5 -1 -1 63 -3 -1 0 True
1 6 -1 -1 63 -3 0 0 True
Click to expand Features Informations:
id
time
F_x
F_y
F_z
T_x
T_y
T_z
target

Fx1 ... Fx15 is the evolution of force Fx in the observation window
import mindsdb
import pandas as pd
from sklearn.metrics import r2_score


def run():
    mdb = mindsdb.Predictor(name='robotic_failure')

    mdb.learn(from_data='dataset/train.csv', to_predict=['target'])

    predictions = mdb.predict(when='test.csv')

    pred_val = [x['target'] for x in predictions]
    real_val = list(pd.read_csv('dataset/test.csv')['target'])

    accuracy = r2_score(real_val, pred_val)
    print(f'Got an r2 score of: {accuracy}')

    #show additional info for each transaction row
    additional_info = [x.explanation for x in predictions]

    return {
        'accuracy': accuracy,
         'accuracy_function': 'balanced_accuracy_score',
         'backend': backend,
         'additional_info': additional_info
    }


# Run as main
if __name__ == '__main__':
    print(run())

Mindsdb accuracy

Accuraccy Backend Last run MindsDB Version Latest Version
0.8399922571492469 Lightwood 15 April 2020 MindsDB PyPi Version