xxxxxxxxxx
final case class Person(
personId: Int,
firstName: String,
lastName: String)
final case class Sales(
date: Date,
personId: Int,
customerName: String,
amountDollars: Double)
xxxxxxxxxx
from sklearn.datasets import make_regression, make_classification, make_blobs
import pandas as pd
import matplotlib.pyplot as plt
# How to create a dataset for a classification problem
variables, target = make_classification(
n_samples = 1000,
n_features = 12,
n_informative = 7,
n_redundant = 3,
n_repeated = 2,
n_classes = 4,
# Distribution of classes 20% Output1
# 20%> output 2, 30% output 3 and 4
weights = [.2,.2, .3, .3],
random_state = 8)
# How to create a dataset for a regression problem
variables, target = make_regression(n_samples = 1000,
n_features = 10,
n_informative = 8,
n_targets = 1,
noise = .5,
random_state = 8
)