9951 explained code solutions for 126 technologies


python-scikit-learnHow to generate dataset for regression


import numpy as np
from sklearn import datasets

X, y = datasets.make_regression(100, 5)ctrl + c
from sklearn import

import module from scikit-learn

import numpy

import Numpy module

X, y

loaded features data (X) and target variable (y) values

datasets

predefined datasets to play with

make_regression

generates dataset for regression models

100

number of generated objects

5

number of features