on-internet
← Community

why am I getting training accuracy 1.0 and test accuracy of .99 in LR model

Stack Overflow ·

I am doing a project on landslide classification, I have dropped null values and the unwanted columns but I am getting both training and testing accuracy of 1. df = pd.read_csv("full_dataset_v1.csv") df.head() # filter by severity. na is for non-landslide data df = df[df['severity'].isin(["medium", "small", "large", "very_large", "na"])] df = shuffle(df) df.reset_index(inplace=True, drop=True) print(len(df)) X = df.copy() df_col_length = len(df.columns) X.drop(X.columns[[0]], axis = 1, inplace = True) def generate_labels(binary = False): y = [] idx_to_severity = [ "large","medium","na", "small

Comments

Sign in or sign up to comment and upvote.

No comments yet.