<jupyter_start><jupyter_text>METABRIC Data Set- **Input:** 350 clinical variables- **Output:** Classification, ER+ 1 or ER- 0 Preprocess Data<jupyter_code>raw_data = pd.read_csv(RAW_DATA_PATH)
raw_data.head()
# List of input features
feature_col_names = list(raw_data.columns)
feature_col_names.remove(target_col_name)
# Seperate input features and target column
X = raw_data.drop(columns=[target_col_name]).values  
y = raw_data[target_col_name].values
# Shuffle and store preprocessed data
data = pd.DataFrame(X, columns=feature_col_names)
data[target_col_name] = y
data.head()
assert data.columns[-1]==target_col_name, 'Target column must be last column in DataFrame'
import collections
collections.Counter(y)<jupyter_output><empty_output><jupyter_text>Save Clean Data<jupyter_code># Initialise new empty dataset folder
from model.generation.helpers import init_dataset_dir

path_to_data_folder = '../'
init_dataset_dir.run(dataset_name=dataset_name, path_to_data_folder=path_to_data_folder)
data_path = '../' + dataset_name + '/'
# Save cleaned data
data.to_csv(data_path + 'data.csv', index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10777385159010601, 'fraction_numerical': 0.00530035335689046, 'mean_word_length': 7.782945736434108, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '57857', 'license': 'MIT', 'n_tokens_mistral': 391, 'n_tokens_neox': 378, 'n_words': 81, 'path': 'data/preprocessing/.ipynb_checkpoints/MB-GE-Clin-ER-checkpoint.ipynb', 'repo_name': 'ZohrehShams/IntegrativeRuleExtractionMethodology', 'size': '1132'}