What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-10-29 06:02:17
multiple scatter plots in python
import matplotlib.pyplot as plt fig = plt.figure() ax1 = fig.add_subplot(111) ax1.scatter(x1, y1, s = 10, c = 'b', label = 'elbow') ax1.scatter(x2, y2, s = 10, c = 'r', label = 'shoulder') plt.legend(loc='upper left'); plt.show() Add solution -
Other 2021-10-27 20:12:06
sklearn decision tree regressor
Import the necessary modules and libraries import numpy as np from sklearn.tree import DecisionTreeRegressor import matplotlib.pyplot as plt # Create a random dataset rng = np.random.RandomState(1) X = np.sort(5 * rng.rand(80, 1), axis=0) y = np.sin(X).... Add solution -
Python 2021-10-21 15:44:12
feature_importances_ sklearn
print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import make_classification from sklearn.ensemble import ExtraTreesClassifier # Build a classification task using 3 informative features X, y = make_classification(n... Add solution -
Other 2021-10-19 01:02:05
ml for price forecasting rstudio
# Make Sessionnet = tf.Session()# Run initializernet.run(tf.global_variables_initializer())# Setup interactive plotplt.ion()fig = plt.figure()ax1 = fig.add_subplot(111)line1, = ax1.plot(y_test)line2, = ax1.plot(y_test*0.5)plt.show()# Number of epochs and ... Add solution -
Python 2021-10-18 02:11:03
python matplotlib how to graph point on line
import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.set_xlim(0,10) ax.set_ylim(0,10) # draw lines xmin = 1 xmax = 9 y = 5 height = 1 plt.hlines(y, xmin, xmax) plt.vlines(xmin, y - height / 2., y + height / 2.) plt.vlines(xmax,... Add solution -
Other 2021-10-16 03:26:10
simple pendulum with image processing code
import numpy as np from scipy.integrate import odeint import math import matplotlib.pyplot as plt """ damping: effects that reduce the amplitude of the vibrations """ def ode_func(theta,t,b,g,l,m): theta1=theta[0] thet... Add solution