3/2/2023 0 Comments Histogram scilabIf the points are randomly dispersed around the horizontal axis, a linear regression model is usually appropriate for the data otherwise, a non-linear model is more appropriate. show () # Finalize and render the figureĪ common use of the residuals plot is to analyze the variance of the error of the regressor. score ( X_test, y_test ) # Evaluate the model on the test data visualizer. fit ( X_train, y_train ) # Fit the training data to the visualizer visualizer. Ha._background = 5 Īfter performing all the above changes, we will end up with the following graphical window.From sklearn.linear_model import Ridge from sklearn.model_selection import train_test_split from yellowbrick.datasets import load_concrete from yellowbrick.regressor import ResidualsPlot # Load a regression dataset X, y = load_concrete () # Create the train and test data X_train, X_test, y_train, y_test = train_test_split ( X, y, test_size = 0.2, random_state = 42 ) # Instantiate the linear model and visualizer model = Ridge () visualizer = ResidualsPlot ( model ) visualizer. Now we have access to all the graphical properties of the line plot.įor our example we are going to change the thickness of the line, add marks on the line and change the mark style, size, foreground and background colors. Handle of type "Polyline" with properties: To access the Polyline, we have to go one level deeper. Handle of type "Compound" with properties:Įntering ha.children at the Scilab console will output the Compound property. To access them we need to use the structure data of the ha graphic handle variable. The last properties to modify are the line properties. Also the children of the Axes handle is the Compound.įor our example we are going to change the grid style, grid color, font size and font color for the axes: ha.grid_style = To display the axes properties enter the ha variable at the Scilab console:Īs you can see, there are a lot more properties to set at the axes level.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |