What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-30 02:00:07
set axis labels python
# Basic syntax: plt.xlabel("X axis label") # Add ", fontsize = #" to control fontsize plt.ylabel("Y axis label") # Example usage: plt.plot(range(5)) plt.xlabel("X axis label") plt.ylabel("Y axis label") p... Add solution -
Python 2021-09-26 23:44:03
sklearn roc curve
import sklearn.metrics as metrics # calculate the fpr and tpr for all thresholds of the classification probs = model.predict_proba(X_test) preds = probs[:,1] fpr, tpr, threshold = metrics.roc_curve(y_test, preds) roc_auc = metrics.auc(fpr, tpr) # method ... Add solution -
Python 2021-09-25 06:35:06
pima indian diabetes dataset solutions
coeff = list(diabetesCheck.coef_[0])labels = list(trainData.columns)features = pd.DataFrame()features['Features'] = labelsfeatures['importance'] = coefffeatures.sort_values(by=['importance'], ascending=True, inplace=True)features['positive'] = features['i... Add solution -
Python 2021-09-24 23:31:02
matplotlib label axis
# Basic syntax: plt.xlabel("X axis label") # Add ", fontsize = #" to control fontsize plt.ylabel("Y axis label") # Example usage: plt.plot(range(5)) plt.xlabel("X axis label") plt.ylabel("Y axis label") p... Add solution -
Python 2021-09-22 14:23:04
how to plot a linear equation in matplotlib
import matplotlib.pyplot as plt import numpy as np x = np.linspace(-5,5,100) y = 2*x+1 plt.plot(x, y, '-r', label='y=2x+1') plt.title('Graph of y=2x+1') plt.xlabel('x', color='#1C2833') plt.ylabel('y', color='#1C2833') plt.legend(loc='upper left') plt.gri... Add solution -
Python 2021-09-21 12:42:03
ego vehicle coord system parallel to world z plane nuscenes
""" This code is to sort out a reply to https://github.com/nutonomy/nuscenes-devkit/issues/122 """ import numpy as np import matplotlib.pyplot as plt from pyquaternion import Quaternion from nuscenes import NuScenes GLOBA... Add solution