-
Notifications
You must be signed in to change notification settings - Fork 8
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
Mobility model alpha parameter regression from data #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with comments.
notebooks/radp_library.py
Outdated
return ue_tracks_generation | ||
|
||
|
||
def plot_ue_tracks(df) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def plot_ue_tracks(df) -> None: | |
def plot_ue_tracks(df: pd.DataFrame) -> None: |
notebooks/radp_library.py
Outdated
start_idx = end_idx | ||
|
||
|
||
def plot_ue_tracks_side_by_side(df1, df2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type hints
notebooks/radp_library.py
Outdated
plt.show() | ||
|
||
|
||
def plot_ue_tracks_on_axis(df, ax, title): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type hints
notebooks/radp_library.py
Outdated
return group | ||
|
||
|
||
def preprocess_ue_data(df): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type hints
notebooks/radp_library.py
Outdated
return df | ||
|
||
|
||
def get_predicted_alpha(data, alpha0): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type hints
return np.array([v_t_next, theta_t_next]) | ||
|
||
|
||
def residual_vector( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def residual_vector( | |
def _residual_vector( |
return t_array, t_next_array, velocity_mean, variance, rng | ||
|
||
|
||
def next( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def next( | |
def _next( |
) | ||
|
||
|
||
class TestParameterFunctions(unittest.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test for actual values, since rng (and seed) is under user control
@@ -0,0 +1,340 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- generate alpha0 closer to cell where it is first used
- update params with re-computed alpha1
radp/digital_twin/requirements.txt
Outdated
@@ -5,3 +5,4 @@ pyarrow==13.0.0 | |||
scikit-learn==1.2.1 | |||
torch==2.0.0 | |||
torchvision==0.15.1 | |||
scipy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see if you can find the actual installed version and freeze that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used scipy==1.10.1
Updated the codes according to the PR review comments. |
In the last commit, we added the seed value as a user input to maintain the reproducibility of the predicted alpha. |
notebooks/radp_library.py
Outdated
return df | ||
|
||
|
||
def get_predicted_alpha(data: pd.DataFrame, alpha0: float,seed: int) -> float: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""This is the main API entry point for alpha prediction, given UE tracks.
@param data : provide columns
"""
Summary
This pull request updates are aimed at refining the parameter regression functionality and enhancing the RADP library's mobility model handling as per previous PR changes. Key changes include the transformation of the parameter regression class into callable API service functions, updates to the mobility helper functions within the RADP library, and the introduction of a notebook that demonstrates these new features.
Changes Made
Mobility Model Parameter Regression:
RADP Library Enhancements:
Mobility Notebook:
alpha
.Unit Test