-
Is there any way to obtain the feature vector that the model extracts during the process of making a prediction with given data? |
Beta Was this translation helpful? Give feedback.
Answered by
dosubot[bot]
Dec 12, 2024
Replies: 1 comment
-
You can extract feature vectors from a model in PyTorch Tabular using the # Pass the trained model as an argument
dt = DeepFeatureExtractor(tabular_model)
# Use the train dataframe to extract the last layer features
# The `fit` method is there only for compatibility and does not perform any operation
enc_df = dt.fit_transform(train)
# Use the extracted embeddings on a new dataframe
val_transformed = dt.transform(val) This example demonstrates how to use the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
manujosephv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can extract feature vectors from a model in PyTorch Tabular using the
DeepFeatureExtractor
. Here's how you can do it:This example demonstrates how to use the
DeepFeatureExtractor
to obtain feature vectors from a trained model [1].To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer …