본문 바로가기

Study Note/Python25

Machine Learning [Regression] practice Machine Learning [Regression] practice Question 1.from sklearn.datasets import load_irisimport pandas as pdiris = load_iris()df = pd.DataFrame(iris.data, columns=iris.feature_names)df['target'] = iris.targetdf['target_name'] = iris.target_names[iris.target]#X standardscalefrom sklearn.preprocessing import StandardScalerscaler = StandardScaler()X, y = iris.data, iris.target#X 값 표준화X_sc = scaler.f.. 2024. 6. 13.
Machine Learning [scikit-learn] practice #Validate the modelmean_squared_error(y_true_tip, y_pred_tip)#result1.036019442011377r2_score(y_true_tip, y_pred_tip)#result0.45661658635167657Machine Learning#import librariesimport sklearnimport numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport seaborn as sns  sklearn.linear_model.LinearRegression:- coef_- intecept : Bias- fit : training data- predict weights = [87, 81, 82, 9.. 2024. 6. 4.
pygwalker "Pygwalker" is a recently made statistical library. Through this, it is possible to create various statistical graphs more easily and simply. However, it is not usable when the amount of data is very large.  https://colab.research.google.com/drive/171QUQeq-uTLgSj1u-P9DQig7Md1kpXQ2?usp=sharing PyGWalker TestColaboratory notebookcolab.research.google.com import pygwalker as pygwalker = pyg.walk(df) 2024. 5. 30.
Interactive Graphs with Altair Creating Interactive Graphs with Altair Interactive graphs allow users to interact with data while experiencing dynamic features of the visualization. These graphs deepen understanding of data, aiding in pattern recognition and information extraction.Interactive graphs can include various types of interactions: Zoom In/Out: Enlarge or reduce the graph area to examine details more closely.Drag: M.. 2024. 5. 30.
Multiple graphs Multiple graphsMultiple graphs in Python is important for comprehensive data analysis. By plotting different datasets or variables together, you can compare them easily, visualize relationships, and communicate findings effectively. Multiple graphs enhance the clarity of your analysis, enabling you to uncover insights that might be hidden in a single graph. They help you tell a compelling story.. 2024. 5. 30.
Dual-axis graph and Pyramid graph A dual-axis graphA dual-axis graph is a type of graph that utilizes two separate y-axes to represent two different sets of data on the same plot. This allows for the comparison of two variables that may have different units or scales. # 1. Setting the default styleplt.style.use('default')plt.rcParams['figure.figsize'] = (4, 3)plt.rcParams['font.size'] = 12# 2. Preparing the datax = np.arange(202.. 2024. 5. 30.