Icon

JKISeason3-18_sryu

<p><strong>Explaining Cancer Predictions</strong></p><p><strong>Challenge 18</strong></p><p><br><strong>Level: </strong>Hard<br><br><strong>Description: </strong>You work as a researcher creating models to identify whether a breast tumor is benign or malign, based on anonymized patient data. Besides obtaining a classifier that works very well for both benign and malign cases, you must be able to explain how different feature values impact your results. Experiment with <strong>LIME</strong> and visualization techniques to explain your predictions and make your research more transparent. <strong>Hint:</strong> Learn more about this problem's data attributes <strong>here</strong>.</p>
Annotations and comments
  • LIME analysis workflow for the binary classification model If the input data changes, it will still work if you select the appropriate Target column in the Column Settings component.
  • Break if all models static
  • more faulty models
  • new faulty models
  • create new list as noithing failed during training
  • 0 : not missing performance 1 : missing performance
  • Recall
  • Precision
  • F-measure
  • static prediction: models always predicting one class
  • models with more than one class in the prediction
  • list static models
  • selected metric
  • model names
  • automated selection
  • interactive view selection
  • if multiclass remove conf. matrix metrics
  • activate view
  • fixed colors
  • negative Coehn's kappa is 0
  • add zoom
  • select metric
  • only cat cols output or normal wf
  • decide preprocess workflow cat cols or normal wf
  • decide postprocess workflow cat cols or normal wf
  • update domain
  • Columns to check for unique values
  • Bottom: string
  • Unique count
  • Max number of unique values
  • <= 25 unique values
  • integer features to double
  • cat_present = 1
  • cat_present = 0
  • One hot encoding choice binary
  • One hot encoding choice
  • categorical cols found
  • no categorical
  • remove orignal string cols
  • class
  • features
  • numerical flag
  • num_present = 1
  • num_present = 0
  • do nothing
  • only cat cols and check OHE status
  • only predictions not active: 0 active: 1
  • decide preproces Ohe =on/off workflow
  • post-process active: 0 not active: 1
  • 0: OHE off 1: OHE on
  • 0: train 1: test
  • Preprocessing Missing value
  • feattures+class
  • all features + OHE
  • split string cols
  • OHE + feattures + class
  • column loop and rename
  • remove all original data
  • Select One-Hot Encoded Columns
  • Remove One-Hot Encoded Columns
  • Combining OHE Removal (if any) with Denormalization (if any)
  • Missing values + Optional One Hot Encoding
  • train / test based on component external settings
  • 0 train 1 test
  • Postprocessing Denormalisation
  • flow variable decides activeness
  • Select columns for normalization
  • bottom: numeric
  • Min-max normalization
  • Normalization mode
  • Preprocessing Normalization
  • decide workflow for transformation
  • check to append OHE workflow
  • pass to denorm
  • ohe check
  • Normalization + OHE
  • Target Col selection
  • DataPrep Transfomations on test data
  • Prediction
  • Failed
  • Unchecked
  • check configuration component
  • Break if params are null
  • port 1: extractred params port 0 : other columns
  • extract params
  • port 0: model selected other: model not selected
  • Rename the column containing the objective value.
  • Fail if only one column is available.
  • Set seed.
  • Store the accuracy for k folds
  • Translate to setting names.
  • select the metric
  • keep 1 row
  • select positive class
  • Select search strategy.
  • Send avg accuracy as variaable
  • rename class0
  • rename class1
  • rename prediction column
  • negative
  • positive
  • prediction col creation
  • class0 + class1 + ground truth
  • negative class rename
  • positive class rename
  • binary target + features
  • add back extra columns
  • target class
  • Dense 64
  • softmax
  • Input
  • reshape for dynamic
  • Predict Model
  • Build Model
  • send features for prediction
  • sample 10 rows to pass feature cols
  • selected unselected KDL
  • Binary Multiclass
  • top : features bottom : target
  • extract cols
  • number of units
  • number of samples per epoch
  • check if KDL selected
  • port 1: extractred params port0 : other columns
  • multi target + features
  • input + pred
  • separate features target
  • sigmoid output units
  • Reshape layer
  • add prefix
  • max col
  • pass max
  • pred_0
  • pred
  • original input columns
  • rename target
  • top : pred cols bottom: tareget
  • rename pred cols
  • many to pred col
  • pass numerical features
  • sample 10 rows for identifying features
  • append test rowids to prediction
  • pass rowIds of test column
  • port 1: extractred params port0 : other column
  • MultiClass
  • Merge the flow variables
  • Btreak when all selected models are failed
  • Change the col schema
  • port 0: if any model fails port 1: if none fails
  • Remove failed models
  • Remove unselected models
  • Print failed models
  • print all models were successful
  • clean name of failed models
  • Add params to sucess
  • extracted_params
  • Fail if no nominal column is available.
  • Filter nominal columns.
  • remove categorical if any
  • seed_yes
  • select negative col
  • select positive col
  • take 2nd row
  • Create variable for Prediction col
  • Class + features
  • num features + OHE
  • 0 : OHE + numericals 1 : categoricals + numericals
  • Cell to Workflow
  • Choose only prediction related cols
  • Rename Prediction to Modelname Prediction
  • RowId so that GLM can be concat with other models
  • Pass the rename prediction col. name
  • create flow variable of current prediction col.
  • Executes the prediction workflow
  • 0: features 1: gound truth
  • 0: trained models table 1: new data / test data / validation data
  • manage missing values in predictions columuns
  • if binary
  • Iterating Model by Model
  • overall stats
  • positive class
  • handle the special characters in class names
  • One Hot Encoding
  • Target Selection
  • Number of CV Folds
  • Train / Test Split
  • unique values removal
  • Select Models
  • features + target
  • choose target
  • TTR divide by 100
  • deactivate_postprocess
  • only_prediction
  • Store the model names
  • remove all numerical
  • Multiclass flag
  • Rename target col
  • Unique value in target
  • Binary or Multi class
  • Performance Metric
  • output modes
  • 1. pre-process model 2. ML model 3. post-process model
  • read Data
  • Let the user select a column.
  • size_bin
  • num_bins
  • port 0: string port 1: integer port 2: other
  • port 0: integer measure port 1: integers labels
  • Get number of rows.
  • Measure the correlation.
  • Split target column.
  • Sample 10k rows for faster calculations.
  • dialogue control
  • Do not restrict the number of possible values.
  • Color Gradient
  • Display column metrics.
  • Slider
  • Exclude manually feature columns.
  • Convert date&time columns in order to be displayed by the Data Explorer.
  • Manually Select
  • Filter manually excluded columns.
  • Filter by overall relevance excluded columns.
  • get the count of unqiue values
  • check whether the task is bi-, multinomial, or regression and whether the column must be converted to String; numerical columns with equal or less than 10 unique values are treated as a multinomial task
  • sample 10k rows for faster calculations
  • remove rows with undefined ml_task
  • select binomial
  • Set ml_task_index variable for later Case Swtiche nodes: 0: Binomial 1: Multinomial 2: Regression
  • only numerical columns can be targets
  • keep only selected prediction column
  • fail if no numerical column is provided
  • features + weight + target
  • remove weight column
  • keep explanation target and statistics as first columns
  • reintroduce filtered out columns
  • add column indicating the current target
  • set importance of columns missing in the local explanation to zero
  • remove all rows (we only need the headers)
  • reset rowid
  • remove intercept if contained
  • filter unimportant features
  • select variables with zero coefficient
  • rename preds cols
  • select explanation maximum size
  • for each exp
  • fp
  • tn
  • tp
  • fn
  • remove intercept
  • save it as SVG
  • output a table with SVGs attached
  • remove nulls
  • reset
  • conf matrix type
  • top input : test set instance rows to be explained bottom input : test set distribution
  • collects explanations
  • top: 80% train set bottom: 20% test set
  • Max300
  • rowid
  • title
  • intro text

Nodes

Extensions

Links