Git Product home page Git Product logo

chaogecanfly / 3pnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chonlei/3pnn

0.0 0.0 0.0 58.39 MB

Code and source data used in the article "3D printed biomimetic cochleae and machine learning co-modelling provides clinical informatics for cochlear implant patients" (Lei et al. Nature Communications, 2021). The code is used for modelling the relationship between electric field imaging (EFI) profiles and the electro-anatomical features of cochleae using a multilayer perceptron (MLP) artificial neural network (NN) model.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

3pnn's Introduction

3PNN

DOI

Code and source data used in the article "3D printed biomimetic cochleae and machine learning co-modelling provides clinical informatics for cochlear implant patients" (Lei et al. Nature Communications, 2021).

This repository aims to model the relationship between electric field imaging (EFI) profiles and the electro-anatomical features of human cochleae using a multilayer perceptron (MLP) artificial neural network (NN) model. The NN model was developed by training data generated from 3D printed biomimetic cochleae. It learned the mapping from the inputs (the 5 model descriptors of the biomimetic cochleae, the stimulating electrode positions, and the recording electrode positions) to the EFI profiles (the output). Predictions of EFI profiles and the model descriptors (input parameters) can be made using this model.

Requirements

The code requires Python (3.6+ and was tested with 3.7.6) and the following dependencies: tensorflow, PINTS, scikit-learn, SALib. Installing Tensorflow in Windows may require Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019. It also needs seaborn for plotting.

To install the code and the above dependencies, navigate to the path where you downloaded this repository and run:

$ pip install --upgrade pip
$ pip install .

Structure of the repository

NN model

  • fit-nn.py: Run fitting of a NN model, with argument [str:input_file_ids.txt] containing a list of file IDs as training data.
  • predict-nn.py: Run (forward) prediction using the trained NN model (from fit-nn.py), with arguments [str:nn_name] (by default, the file name of the [str:input_file_ids.txt]) and [str:predict_ids.txt] (a list of file IDs for prediction; their input parameters are stored in the input folder).
  • invabc-nn.py: Run (inverse) prediction using the trained NN model (from fit-nn.py), with arguments [str:nn_name] (by default, the file name of the [str:input_file_ids.txt]) and [str:predict_ids.txt] (a list of file IDs for prediction; their EFI data are stored in the data folder). It also requires fix_param.py to specify the parameters that are not fixed.
  • fix_param.py: Specify the parameters that are fixed or not fixed. Put None if it is not fixed.
  • sensitivity-nn.py: Run sensitivity analysis for the trained NN model (from fit-nn.py), with arguments [str:nn_name] (by default, the file name of the [str:input_file_ids.txt]).

Data

  • data: Contains raw EFI measurements in .txt format with tab delimiter. Rows are the readout/recording at each electrode ordered from 1 to 16; columns are the stimulation electrode numbers (again from 1 to 16). Each file name is the file ID, the ID of the measurement.
    • available-electrodes.csv: Specify the available electrodes of each raw EFI measurement.
  • input: Contains the input/printing parameters for re-creating the cochlea model, of that the file ID should match those in data. Rows from 1 to 5 are basal lumen diameter, infill density, taper ratio, cochlear width and cochlear height.

Methods

  • method: A module containing useful methods, functions, and helper classes for this project; for further details, see below.
    • feature.py: Contains functions extracting features of the EFI measurements.
    • io.py: I/O helper classes, for read and write predefined file format.
    • nn.py: Contains neural network functions for regression.
    • plot.py: Contains simple plotting functions.
    • transform.py: Contains classes for parameter transformation.

Results

  • out-nn: Contains NN model fitting and prediction results (from fit-nn.pypredict-nn.py, invabc-nn.py, and sensitivity-nn.py).

Acknowledging this work

If you publish any work based on the contents of this repository please cite (CITATION file):

Lei, I. M. et al. (2021). 3D printed biomimetic cochleae and machine learning co-modelling provides clinical informatics for cochlear implant patients. Nature Communications.

3pnn's People

Contributors

chonlei avatar iekmanlei avatar

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.