Skip to content

feat: sensibility and specificty metrics#10

Open
rcsm89 wants to merge 2 commits into
cromano8:mainfrom
rcsm89:feat/sensi
Open

feat: sensibility and specificty metrics#10
rcsm89 wants to merge 2 commits into
cromano8:mainfrom
rcsm89:feat/sensi

Conversation

@rcsm89
Copy link
Copy Markdown

@rcsm89 rcsm89 commented Feb 2, 2024

No description provided.

@cromano8
Copy link
Copy Markdown
Owner

cromano8 commented Feb 5, 2024

Saw you used the confusion matrix from sklearn we have that in SnowflakeML. I saw you wanted to add Sensitivity and Specificity, which are not in SnowflakeML (F1 comes natively). Could you try to create sensitivity and specificity using Snowpark because it'll be a good way for other people to learn? The benefits of this are nothing gets pulled into memory vs sklearn. One way is something like this...

TP = result.filter((F.col("ACT") == 1) & (F.col("PRED") == 1)).count()
FP = result.filter((F.col("ACT") == 0) & (F.col("PRED") == 1)).count()
TN = result.filter((F.col("ACT") == 0) & (F.col("PRED") == 0)).count()
FN = result.filter((F.col("ACT") == 1) & (F.col("PRED") == 0)).count()

then create the formula for the two metrics you want.

@rcsm89
Copy link
Copy Markdown
Author

rcsm89 commented Feb 5, 2024

Hi @cromano8,

Thank you for your suggestion! I've taken your advice and implemented Sensitivity and Specificity metrics using Snowpark within the SnowflakeML environment.

@rcsm89 rcsm89 closed this Feb 5, 2024
Copy link
Copy Markdown
Author

@rcsm89 rcsm89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cromano8
what do you think about this version?

@rcsm89 rcsm89 reopened this Feb 5, 2024
@cromano8
Copy link
Copy Markdown
Owner

cromano8 commented Feb 6, 2024

Got our live session using this repo this afternoon, I'll take a closer look later today/tomorrow morning, thanks for the addition

@pythonlearning17
Copy link
Copy Markdown

I don't see the titanic.csv in the folder anymore. + how set up the intro-snowML environment or what all should be present in that for the imports to run ?

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.

3 participants