delvendahl / miniml Goto Github PK
View Code? Open in Web Editor NEWA deep learning framework for synaptic event detection
License: MIT License
A deep learning framework for synaptic event detection
License: MIT License
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 :
I have checked the installed document in my conda package, it show as :
Do you have any idea on this issue?
Thank you very much!
Jinming Zhang
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?
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.
Hi,
I was able to smoothly run the code and save the file with the template method. However, when the same input file is processed with the gradient method, I am unable to save it. This is the error message I get:
ValueError Traceback (most recent call last)
Cell In[22], line 2
1 # Save the result
----> 2 x = np.array(events)
3 y = np.array(scores)
4 indices = np.array(idx)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (303,) + inhomogeneous part.
Can you please help me solve this issue?
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.