Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jacopo #56

Merged
merged 3 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions brainage/neural_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def create_nn(input_shape,
optimizer = 'rmsprop',
dropout = 0.05,
summary = False):
"""
"""
Create a neural network model using Keras API in order to solve a regression problem.

:param input_shape: shape of the data given to the input layer of the NN
Expand Down Expand Up @@ -67,7 +67,7 @@ def create_nn(input_shape,
return model

def training(features, targets, model, epochs, **kwargs):
"""
"""
Train a neural network using k-fold cross-validation.
The function can show actual vs predicted brain age scatter plot and training history plot.

Expand Down
2 changes: 1 addition & 1 deletion brainage/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def regression(type, features, targets, n_splits):


def reg_parsing():
"""
"""
regression function parsed that runs when the .py file is called.
It performs regression (linear or gaussian) with k-fold cross-validation
predicting the age of patients from magnetic resonance imaging and
Expand Down
2 changes: 1 addition & 1 deletion brainage/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def abs_path(local_filename, data_folder):
return data_file_path

def mean_spurious(df):
"""
"""
Handles spurious 0 and -9999 values in the data, if the dataset is not properly cleaned before.
This function will replace 0 and -9999 values with the mean of respective columns

Expand Down