Abnormal Heartbeat Classification - Data Every Day

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ม.ค. 2025

ความคิดเห็น • 14

  • @richardfinney2548
    @richardfinney2548 2 ปีที่แล้ว

    This is a really great tutorial, thank you so much :) you are a gifted educator!

  • @zzww7147
    @zzww7147 11 หลายเดือนก่อน

    Hi, thank you so much for doing this. it helped me a lot. But could you share the another classification tutorial that can distinguish each of five abnormal ECG? Really appreciate it if you can help.

  • @baseladams280
    @baseladams280 9 หลายเดือนก่อน

    Great work. Thank you very much!!!

  • @xavior151
    @xavior151 4 ปีที่แล้ว

    3rd Notebook Implemented form your channel. Everything was so clear. Thank you.
    I had patience value of 4 but the model stopped at 0.10 val_loss, so a bit worse.

    • @gcdatkin
      @gcdatkin  4 ปีที่แล้ว

      No problem! :)
      Honestly, I think EarlyStopping is a bit of a shortcut, because there is the possibility of stopping before you get to the minimum validation loss. It's great if you just want to test out a model, but if you're looking to truly optimize performance, I would recommend the ModelCheckpoint() callback with save_best_only set to True.
      This will allow your model to run for the full number of epochs, but it will save the weights or the model from the best run.
      Afterwards, you can load in the weights/model using model.load_weights() or model.load().
      This approach will take more time, but it is more thorough in my opinion :)

  • @tariqueanis824
    @tariqueanis824 3 ปีที่แล้ว

    Excellent video
    helped a lot

  • @ayesha7oo2
    @ayesha7oo2 ปีที่แล้ว

    How do you use this to train an ECG device to predict arrhythmia?

  • @achmadfachturrohman3488
    @achmadfachturrohman3488 3 ปีที่แล้ว

    Have you done the predict model? Can you show the confusion matrix and classification report?
    I've do same training ways like you but I got bad result both
    Please guide me, I'm newbie in this

    • @baseladams280
      @baseladams280 9 หลายเดือนก่อน

      # Prediction
      # Assuming your trained model is stored in the 'model' variable
      # Get the second sample from the test features
      second_sample = X_test.iloc[0, :] # Indexing by position (row 1, all columns)
      # Reshape the sample to match the expected input format (single sample, sequence length, features)
      second_sample = np.expand_dims(second_sample, axis=0) # Add a new dimension for batch size
      # Make prediction on the reshaped sample
      prediction = model.predict(second_sample)
      # Threshold the sigmoid output to get a class (normal: 0, abnormal: 1)
      predicted_class = (prediction > 0.5).astype(int)
      # Print the predicted class (0 or 1)
      print("Predicted class for the second test sample:", predicted_class[0][0])

  • @Mohamm-ed
    @Mohamm-ed 4 ปีที่แล้ว

    So helpful thanks very much

    • @gcdatkin
      @gcdatkin  4 ปีที่แล้ว +1

      No problem :)
      Happy New Year!

    • @Mohamm-ed
      @Mohamm-ed 4 ปีที่แล้ว

      @@gcdatkin Happy new year... wishing you all the best.

  • @baseladams280
    @baseladams280 9 หลายเดือนก่อน

    For prediction:

    • @baseladams280
      @baseladams280 9 หลายเดือนก่อน

      # Prediction
      # Assuming your trained model is stored in the 'model' variable
      # Get the second sample from the test features
      second_sample = X_test.iloc[0, :] # Indexing by position (row 1, all columns)
      # Reshape the sample to match the expected input format (single sample, sequence length, features)
      second_sample = np.expand_dims(second_sample, axis=0) # Add a new dimension for batch size
      # Make prediction on the reshaped sample
      prediction = model.predict(second_sample)
      # Threshold the sigmoid output to get a class (normal: 0, abnormal: 1)
      predicted_class = (prediction > 0.5).astype(int)
      # Print the predicted class (0 or 1)
      print("Predicted class for the second test sample:", predicted_class[0][0])