here i am not able to understand the use of n_redundant,moreover why we are using slicimg to print the graph (xc[:,0],xc[:,1]) and when i tried to plot xc,yc it is showing error why?
Not understanding of concept
Hello Kushal,
n_redundant is used to specify the number of redundant features we want to introduce while creating a data. These types of features add no value to our model prediction training, for example, in the house price prediction if we have a column that tells us the house number of the houses it’ll have no effect on the final y label. Such features are redundant features and we sometimes add them in our dataset to visualize how our model performs even when done redundant features are passed, the accuracy or the predictions should not change. Consider it just like noise.
We are using slicing to make the scatter plot because we want to plot a graph which depicts the variation of the two features we have (x1 and x2). This, we take x2 (xc[:,1]) as the y-axis and x1 (xc[:,0]) as the x-axis while playing our scatter plot.
I hope this clears your doubt.