Applied Machine Learning Solutions with Python: Production-ready ML Projects Using Cutting-edge Libraries and Powerful Statistical Techniques by Siddhanta Bhatta

Applied Machine Learning Solutions with Python: Production-ready ML Projects Using Cutting-edge Libraries and Powerful Statistical Techniques by Siddhanta Bhatta

Author:Siddhanta Bhatta [Bhatta, Siddhanta]
Language: eng
Format: epub
Publisher: BPB Publications
Published: 2022-08-15T00:00:00+00:00


import numpy as np

import matplotlib.pyplot as plt

import pandas as pd

from sklearn import datasets

from sklearn.decomposition import PCA

from sklearn.linear_model import LogisticRegression

from sklearn.pipeline import Pipeline

# we will take iris from load_dataset as an example

X, y = datasets.load_iris(return_X_y=True)

# dimentionality reduction

pca = PCA(n_components=2)

# Logistic Regression Model

logistic = LogisticRegression(max_iter=10000, tol=0.1)

# creating pipeline

pipe = Pipeline(steps=[('pca', pca), ('logistic', logistic)])



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.