synthesis_workflow.fit_utils¶
Some functions used to fit path distances with depth.
Functions¶
|
Returns a list of features using tmd. |
|
Returns path distances using tmd. |
|
Returns projections using tmd. |
|
The function used to fit data. |
|
Returns data without outliers. |
|
Returns slope and intercept of a linear fit. |
|
Returns a path distance for an input extent according to fitted function. |
Module Contents¶
- _get_tmd_feature(input_population: tmd.Population.Population.Population, feature: str, neurite_type: str = 'apical_dendrite') numpy.array¶
Returns a list of features using tmd.
- get_path_distances(input_population: tmd.Population.Population.Population, neurite_type: str = 'apical_dendrite') numpy.array¶
Returns path distances using tmd.
- Parameters:
input_population – the population of neurons
- Returns:
list of path distances
- get_projections(input_population: tmd.Population.Population.Population, neurite_type: str = 'apical_dendrite') numpy.array¶
Returns projections using tmd.
- Parameters:
input_population – the population of neurons
- Returns:
list of projections
- clean_outliers(x: Sequence[float], y: Sequence[float], outlier_percentage: int = 90) Tuple[numpy.array, numpy.array]¶
Returns data without outliers.
- Parameters:
x – the X-axis coordinates
y – the Y-axis coordinates
outlier_percentage – the percentage used to find and remove outliers
- Returns:
cleaned X and Y coordinates
- fit_path_distance_to_extent(input_population: tmd.Population.Population.Population, outlier_percentage: int = 90, neurite_type: str = 'apical_dendrite') Tuple[float, float]¶
Returns slope and intercept of a linear fit.
Returns the two parameters (slope, intercept) for the linear fit of path length (Y-variable) to total extents (X-variable). Removes outliers up to outlier_percentage for a better fit.
- Parameters:
input_population – the population of neurons
outlier_percentage – the percentage used to find and remove outliers
neurite_type – neurite_type to make the fit
Returns: slope and intercept of the fit
- get_path_distance_from_extent(slope: float, intercept: float, extent: float) float¶
Returns a path distance for an input extent according to fitted function.
The function is given by the equation: Path = slope * extent + intercept
- Parameters:
slope – the slope of the function
intercept – the intercept of the function
extent – the point where the function is evaluated
Returns: function value evaluated at x = extent