saving work
This commit is contained in:
parent
564e72fc2d
commit
b637ebc6d2
2 changed files with 11 additions and 6 deletions
|
@ -74,6 +74,9 @@ geneL_ppi2 = ['alr', 'embb', 'katg']
|
|||
#%% get cols
|
||||
mycols = my_df.columns
|
||||
|
||||
my_df['active_aa_pos'].dtype
|
||||
my_df['active_aa_pos'] = my_df['active_aa_pos'].astype(object)
|
||||
|
||||
#%%============================================================================
|
||||
# GET Y
|
||||
|
||||
|
|
14
my_data9.py
14
my_data9.py
|
@ -59,9 +59,9 @@ f2 = preprocessor.transform(numerical_features_df)
|
|||
f3 = preprocessor.fit_transform(numerical_features_df)
|
||||
(f3==f2).all()
|
||||
|
||||
f4 = preprocessor.fit_transform(all_features_df)
|
||||
f4
|
||||
reprocessor.fit_transform(numerical_features_df)
|
||||
preprocessor.fit_transform(numerical_features_df)
|
||||
|
||||
#preprocessor.fit_transform(all_features_df)
|
||||
|
||||
#%%
|
||||
model_log = Pipeline(steps = [
|
||||
|
@ -108,8 +108,6 @@ pd.DataFrame(output).mean()
|
|||
t1_res = MultClassPipeline2(X_trainN, X_testN, y_trainN, y_testN, input_df = all_features_df)
|
||||
t1_res
|
||||
|
||||
t2_res = MultClassPipeline2(X_train, X_test, y_train, y_test, input_df = all_features_df)
|
||||
t2_res
|
||||
#%%
|
||||
# https://machinelearningmastery.com/columntransformer-for-numerical-and-categorical-data/
|
||||
#Each transformer is a three-element tuple that defines the name of the transformer, the transform to apply, and the column indices to apply it to. For example:
|
||||
|
@ -129,4 +127,8 @@ col_transform = ColumnTransformer(transformers=t
|
|||
# create pipeline (unlike example above where the col transfer was a preprocess step and it was fit_transformed)
|
||||
|
||||
pipeline = Pipeline(steps=[('prep', col_transform)
|
||||
, ('classifier', clf)])
|
||||
, ('classifier', LogisticRegression())])
|
||||
#%% Added this to the MultClassPipeline
|
||||
|
||||
t2_res = MultClassPipeline2(X_train, X_test, y_train, y_test, input_df = all_features_df)
|
||||
t2_res
|
Loading…
Add table
Add a link
Reference in a new issue