Skip to content

Commit b4fe536

Browse files
committed
updt submission files + setup
1 parent 2c36fe6 commit b4fe536

File tree

3 files changed

+49
-53
lines changed

3 files changed

+49
-53
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
description="RAMP module for the Stroke Segmentation Challenge",
77
author="NPNL",
88
packages=["stroke"],
9-
url="https://github.com/AlexandreHutton/stroke",
9+
url="https://github.com/ramp-kits/stroke_lesions/stroke",
1010
license="gpl-3.0",
1111
)

submissions/sample/estimator.py

+24-26
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@
33

44

55
class BIDSEstimator(BaseEstimator):
6-
'''
6+
"""
77
Estimator sample for RAMP stroke lesion segmentation.
8-
'''
8+
"""
99

1010
def __init__(self):
11-
'''
11+
"""
1212
Initialize estimator values (e.g. starting learning rate) here.
13-
'''
13+
"""
1414
return
1515

16-
def fit(self,
17-
X: np.array,
18-
y: np.array):
19-
'''
16+
def fit(self, X: np.array, y: np.array):
17+
"""
2018
Fit the estimator using the input data (X) and target (y). Assumes that all data is present. Optional.
2119
This estimator in particular does nothing.
2220
Parameters
@@ -29,11 +27,11 @@ def fit(self,
2927
Returns
3028
-------
3129
None
32-
'''
30+
"""
3331
return
3432

3533
def fit_partial(self, X, y):
36-
'''
34+
"""
3735
Fit the estimator using the input data (X) and target (y). Assumes that the inputs represent only a fraction
3836
of the data and that it will be called multiple times while using the dataset. I.e., learning rates and adaptive
3937
parameters should not be entirely recalculated with each call to this method. Required.
@@ -48,14 +46,14 @@ def fit_partial(self, X, y):
4846
Returns
4947
-------
5048
None
51-
'''
49+
"""
5250

5351
# Apply pre-processing to X
5452
# Feed to estimator
5553
return
5654

5755
def predict_proba(self, X):
58-
'''
56+
"""
5957
Applies the data to the estimator to produce a prediction. The output can be continuous to represent the
6058
relative confidence the estimator has in the prediction. Optional.
6159
Typically, correct but uncertain predictions are rewarded less. Similarly, incorrect but uncertain predictions
@@ -70,25 +68,25 @@ def predict_proba(self, X):
7068
-------
7169
np.array
7270
Prediction made by the estimator.
73-
'''
71+
"""
7472
y = np.ones(X.shape, dtype=bool)
7573
return y
7674

7775
def predict(self, X):
78-
'''
79-
Applies the data to the estimator to produce a prediction. The output type is expected to match the problem.
80-
I.e., classification problems should have categorical predictions. Required.
81-
This estimator always returns 1.
82-
Parameters
83-
----------
84-
X : np.array
85-
Data of the form (n_samples, n_channels, *image.shape)
76+
"""
77+
Applies the data to the estimator to produce a prediction. The output type is expected to match the problem.
78+
I.e., classification problems should have categorical predictions. Required.
79+
This estimator always returns 1.
80+
Parameters
81+
----------
82+
X : np.array
83+
Data of the form (n_samples, n_channels, *image.shape)
8684
87-
Returns
88-
-------
89-
np.array
90-
Prediction made by the estimator.
91-
'''
85+
Returns
86+
-------
87+
np.array
88+
Prediction made by the estimator.
89+
"""
9290
y = np.ones(X.shape, dtype=bool)
9391
return y
9492

submissions/starting_kit/estimator.py

+24-26
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@
33

44

55
class BIDSEstimator(BaseEstimator):
6-
'''
6+
"""
77
Estimator sample for RAMP stroke lesion segmentation.
8-
'''
8+
"""
99

1010
def __init__(self):
11-
'''
11+
"""
1212
Initialize estimator values (e.g. starting learning rate) here.
13-
'''
13+
"""
1414
return
1515

16-
def fit(self,
17-
X: np.array,
18-
y: np.array):
19-
'''
16+
def fit(self, X: np.array, y: np.array):
17+
"""
2018
Fit the estimator using the input data (X) and target (y). Assumes that all data is present. Optional.
2119
This estimator in particular does nothing.
2220
Parameters
@@ -29,11 +27,11 @@ def fit(self,
2927
Returns
3028
-------
3129
None
32-
'''
30+
"""
3331
return
3432

3533
def fit_partial(self, X, y):
36-
'''
34+
"""
3735
Fit the estimator using the input data (X) and target (y). Assumes that the inputs represent only a fraction
3836
of the data and that it will be called multiple times while using the dataset. I.e., learning rates and adaptive
3937
parameters should not be entirely recalculated with each call to this method. Required.
@@ -48,14 +46,14 @@ def fit_partial(self, X, y):
4846
Returns
4947
-------
5048
None
51-
'''
49+
"""
5250

5351
# Apply pre-processing to X
5452
# Feed to estimator
5553
return
5654

5755
def predict_proba(self, X):
58-
'''
56+
"""
5957
Applies the data to the estimator to produce a prediction. The output can be continuous to represent the
6058
relative confidence the estimator has in the prediction. Optional.
6159
Typically, correct but uncertain predictions are rewarded less. Similarly, incorrect but uncertain predictions
@@ -70,25 +68,25 @@ def predict_proba(self, X):
7068
-------
7169
np.array
7270
Prediction made by the estimator.
73-
'''
71+
"""
7472
y = np.ones(X.shape, dtype=bool)
7573
return y
7674

7775
def predict(self, X):
78-
'''
79-
Applies the data to the estimator to produce a prediction. The output type is expected to match the problem.
80-
I.e., classification problems should have categorical predictions. Required.
81-
This estimator always returns 1.
82-
Parameters
83-
----------
84-
X : np.array
85-
Data of the form (n_samples, n_channels, *image.shape)
76+
"""
77+
Applies the data to the estimator to produce a prediction. The output type is expected to match the problem.
78+
I.e., classification problems should have categorical predictions. Required.
79+
This estimator always returns 1.
80+
Parameters
81+
----------
82+
X : np.array
83+
Data of the form (n_samples, n_channels, *image.shape)
8684
87-
Returns
88-
-------
89-
np.array
90-
Prediction made by the estimator.
91-
'''
85+
Returns
86+
-------
87+
np.array
88+
Prediction made by the estimator.
89+
"""
9290
y = np.ones(X.shape, dtype=bool)
9391
return y
9492

0 commit comments

Comments
 (0)