[PYTHON] How to create explanatory variables and objective functions

How to write an objective function

df

--PassengerID (passenger ID) --Survived (train data only) --Pclass (room class)

When I had an item like this

The explanatory variable is

 x = df [["Item name 1", "Item name 2", "Item name 3", "Item name 4"]]

Add the item you want to select, such as [["Item"]].

Objective function

Since the objective function has only one item,

 t = df ["objective function item"]

the end

With this kind of feeling, I will train the model after this.

Recommended Posts

How to create explanatory variables and objective functions
Julia Quick Note [01] How to use variables and constants
[Python] How to create Correlation Matrix and Heat Map
How to define Go variables
How to split machine learning training data into objective variables and others in Pandas
[Python] How to play with class variables with decorator and metaclass
[Python] Summary of how to use split and join functions
How to create and use static / dynamic libraries in C
Comparison of how to use higher-order functions in Python 2 and 3
How to create dataframes and mess with elements in pandas
Overview of Python virtual environment and how to create it
How to install and use Tesseract-OCR
How to create a Conda package
How to create your own Transform
How to create an email user
How to create a virtual bridge
How to create / delete symbolic links
How to install and configure blackbird
How to use .bash_profile and .bashrc
How to install CUDA and nvidia-driver
How to install and use Graphviz
How to create a Dockerfile (basic)
How to create a config file
How to solve slide puzzles and 15 puzzles
Overview of how to create a server socket and how to establish a client socket
How to use functions in separate files Perl and Python versions
How to use Serverless Framework & Python environment variables and manage stages
[C language] How to create, avoid, and make a zombie process
How to create a clone from Github
[Linux] How to subdivide files and folders
How to package and distribute Python scripts
How to access environment variables in Python
How to create a git clone folder
[Circuit x Python] How to expand and calculate transfer functions using Lcapy
How to create * .spec files for pyinstaller.
Correlation visualization of features and objective variables
python: How to use locals () and globals ()
How to create a repository from media
[Python] How to calculate MAE and RMSE
How to use Python zip and enumerate
[Python] Understand how to use recursive functions
[Introduction to pytorch-lightning] How to use torchvision.transforms and how to freely create your own dataset ♬
How to use is and == in Python
How to use pandas Timestamp and date_range
How to install fabric and basic usage
How to write pydoc and multi-line comments
How to use "Jupyter Book" to create publication quality books and documents from .ipynb
[Python] How to create a local web server environment with SimpleHTTPServer and CGIHTTPServer
How to create sample CSV data with hypothesis
How to use lists, tuples, dictionaries, and sets
How to create large files at high speed
Conformity and recall-Understanding how to evaluate classification performance ①-
How to create a Python virtual environment (venv)
Introducing Sinatra-style frameworks and how to use them
How to generate permutations in Python and C ++
How to create a function object from a string
How to create a JSON file in Python
[Python] How to read data from CIFAR-10 and CIFAR-100
How to create an OCF compliant resource agent
How to call Cloud API from GCP Cloud Functions
How to convert SVG to PDF and PNG [Python]