GithubHelp home page GithubHelp logo

delvendahl / miniml Goto Github PK

View Code? Open in Web Editor NEW
6.0 5.0 3.0 136.92 MB

A deep learning framework for synaptic event detection

License: MIT License

Python 14.76% Jupyter Notebook 85.24%
electrophysiology machine-learning mepsc synaptic-transmission

miniml's Issues

TypeError when Initializing Event Detection Object

I am currently following your tutorial and trying it out on one of my recordings. I successfully loaded the .abf file, but when I try to initialize the EventDetection object, I get the following error:

TypeError: Could not locate class 'LSTM'. Make sure custom classes are decorated with `@keras.saving.register_keras_serializable()`. Full object config: {'class_name': 'LSTM', 'config': {'name': 'lstm', 'trainable': True, 'dtype': 'float32', 'return_sequences': False, 'return_state': False, 'go_backwards': False, 'stateful': False, 'unroll': False, 'time_major': False, 'units': 96, 'activation': 'tanh', 'recurrent_activation': 'sigmoid', 'use_bias': True, 'kernel_initializer': {'class_name': 'GlorotUniform', 'config': {'seed': None}}, 'recurrent_initializer': {'class_name': 'Orthogonal', 'config': {'gain': 1.0, 'seed': None}}, 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'unit_forget_bias': True, 'kernel_regularizer': None, 'recurrent_regularizer': None, 'bias_regularizer': None, 'activity_regularizer': None, 'kernel_constraint': None, 'recurrent_constraint': None, 'bias_constraint': None, 'dropout': 0.2, 'recurrent_dropout': 0.0, 'implementation': 2}

Here is the code I am using:

import sys
sys.path.append('./core/')
from miniML import MiniTrace, EventDetection

filepath = '/Users/ss/Desktop/50-59_PhD/53_Data_analyis/peter test/abf_files/24510005.abf'
scaling = 1e12
unit = 'pA'

# Load data from .abf file
trace = MiniTrace.from_axon_file(filepath=filepath, scaling=scaling, unit=unit)

win_size = 600
stride = int(win_size / 30)
direction = 'negative'

detection = EventDetection(
    data=trace,
    model_path='/Users/ss/Desktop/50-59_PhD/53_Data_analyis/miniML/model/GC_lstm_model.h5',
    window_size=win_size,
    model_threshold=0.5,
    batch_size=512,
    event_direction=direction,
    compile_model=True
)

Could you please help me understand what might be causing this error and how to resolve it?

Thank you!

Installation error

Hi dear sir/madam,

Thanke you for your work and i am trying to use miniML to analyze mEPSC data.
I have got problem in installation miniML. It goes well when i use pip to install miniML. But jupyterlab failed to import this module as :
image

I have checked the installed document in my conda package, it show as :
image

Do you have any idea on this issue?

Thank you very much!

Jinming Zhang

How to analyze a subsection of .abf?

Hello, I am wondering if there is a way to run a portion of a file and not the whole file? Some of my recordings have weird noise at the beginning or I'll start to loose a cell at the end and only want to use the beginning half of the recording. It would be nice to either be able to crop a recording or tell miniML to only look at a portion of the recording. Do you know of a way to do this?

can i use miniML to detect sIPSC

Thanks for developing such a useful model. We recorded sIPSCs of pyramidal neurons at a holding potential of 0 mV, so the currents are positive. Can I use miniML to detect sIPSCs, or should I create a transfer learning model? Thanks.

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.