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

Feature/add cont cat variable type #708

Conversation

CMobley7
Copy link
Contributor

@CMobley7 CMobley7 commented Aug 2, 2023

This PR adds whether an indicator is a continuous or categorical variable. I added this for most momentum, overlap, trend, volatility, and volume indicators. This information should be helpful to ML practitioners. Please let me know if any changes are necessary.

@CMobley7
Copy link
Contributor Author

CMobley7 commented Aug 2, 2023

This gives an additional solution to #434

@CMobley7 CMobley7 force-pushed the feature/add_cont_cat_variable_type branch from 83a789e to d37dc31 Compare August 13, 2023 00:53
@CMobley7
Copy link
Contributor Author

CMobley7 commented Aug 21, 2023

Closing because this doesn't actually work, likely due to how the final df is constructed. Also, it's easy to just do something like

def get_categorical_columns(df, threshold=10):
    """Identify columns with unique values below a certain threshold."""
    categorical_columns = []

    for col in df.columns:
        if len(df[col].unique()) <= threshold:
            categorical_columns.append(col)

    return categorical_columns

@CMobley7 CMobley7 closed this Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant