Skip to content
Snippets Groups Projects
Commit f648bd58 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent ed9e6b64
Branches
No related tags found
No related merge requests found
......@@ -67,12 +67,11 @@ def plot_confusion_matrix(cm, classes,
plt.xlabel('Predicted label')
def get_csv_as_dataframe(csv_file, reduce_frac=None, random_state=42):
def get_csv_as_dataframe(csv_file, reduce_frac=1.0, random_state=42):
icing_df = pd.read_csv(csv_file)
# Random selection of reduce_frac of the rows
if reduce_frac is not None:
icing_df = icing_df.sample(axis=0, frac=reduce_frac, random_state=random_state)
icing_df = icing_df.sample(axis=0, frac=reduce_frac, random_state=random_state)
# # remove approximately half of rows where column_name equals to column_value
# column_name = 'icing_intensity'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment