'Python Plotly express x axis values
I have been trying to create a graph using plotly express. however, I haven't been able to put the values for the x axis correctly. Here is the data frame I am using:
I need to plot 'Mean Train Score' vs ' Hidden Layer Size' keeping 'Activation Function' and 'Learning Rate' Constant, and this is the code I am using to plot it:
[1] df['No. of Neurons in Two Hidden Layers'] = [t[0] for t in
zip(df['Hidden Layer Size'])]
[2] df['Alpha, Activation'] = [f'{alpha} {activation}' for alpha, activation in
zip(df['Learning Rate'], df2['Activation Function'])]
[3] fig = px.line(df, x='No. of Neurons in Two Hidden Layers', y="Mean Train
Score", color='Alpha, Activation', symbol = 'Alpha, Activation', title
= 'Mean Train Score vs. No. of Hidden Layer Size' )
fig.update_layout(
title = {
'y':0.9,
'x':0.5,
'xanchor': 'center',
'yanchor': 'top'
})
fig.show()
I cannot display both of the values for the 'Hidden Layer Size' column on the x axis

I need each value of 'Mean Train Score' to have its corresponding Hidden Layer value as (#,#).
What can I do?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

