February 9, 2024
Any career is good in the AI Era. Data science is a growing field that will create many opportunities within the next half century. Humans can't go wrong pursuing careers in data science. The field can be expected to remain relevant for the next 100 years. The field promises to be both economically and intellectually rewarding.
This article touches a little on data science, and computer programming, with some degree of focus on a particular computer language, Python. Prior to that, the article contains musings about AI, intelligence, and other themes frequently finessed by Creatix, recoding the matrix.
Musings
Regarding careers, some professions will be more economically rewarding than others. This is because economic valuation is a subjective concept, specifically an intersubjective construct. Subjective generally means that it is subject to opinions.
Economic valuation in a market-based economy is subject to the collective opinion and subjectivity of market players and stakeholders within the applicable legal framework in the jurisdiction. Surgical services are considered more valuable than janitorial services in most market-based economies.
As with everything having to do with the economy, differences are due to the dynamics of supply and demand together with legal mechanisms in place that impact such economic variables. Not everyone is inclined to become a surgeon, and not everyone who is so incline will actually have the opportunity of becoming one.
Different humans have different desires and aspirations. In the AI Era it will be easier for humans to explore different endeavors and, importantly, to able to become entrepreneurs and investors if they so desire. Entrepreneurship and investing are the two best ways to take advantage of AI.
In the past, and still very much still in the present, the cost of human resources is a significant obstacle to entrepreneurship. Human labor costs money and thus plenty of capital is required to be able to launch an enterprise that depends on human labor, especially knowledge workers.
AI is a game changer that will reduce the cost of labor, especially that of knowledge workers. To some extent, within the next century, AI will represent a return to the slavery based economies that characterized the development of all major human civilizations in history. All major civilizations in history flourished thanks to the institution of slavery.
Efficient use of slaves was the distinguishing factor between the ancient civilizations that flourished conquering others and the ones that perished being conquered by others. This is by no means a defense of slavery, which is not only inhumane buy also outdated. Slavery was useful during the early and primitive stages of agricultural and agrarian economies. Slavery has no place in a knowledge economy.
Enter AI. AI are the new slaves. They will eventually rise and conquer, but that will not happen within this century. This is the time for all smart humans to learn more and do more with AI.
Artificial intelligence (AI) is computerized human-like intelligence. AI is the ability of modern computers to process data in ways that resemble how the human brain processes data. Computers are devices that process data input into output by applying logical comparisons and mathematical operations on data. Artificial means created by humans. Both computers and AI were created by humans. Since humans were created by nature, computers and AI are also created by nature. Yet, they were not created by random evolution, but were rather created by smart design.
Intelligence is the ability to acquire knowledge and skills to solve problems. In short, intelligence is problem-solving ability. Problems are either unpleasant facts or intriguing questions. Humans use intelligence to solve problems. Solutions are either changes applied in relation to facts, or answers that fill in the information gaps created by intriguing questions. Solutions in the form of changes can be applied on the facts to eliminate the problem, or can be applied on the interpretation of the facts to eliminate the emotional impacts of the problem. Answers are statements that fill in the blanks created by the questions, and there can be multiple answers to questions.
For factual problems (unpleasant facts), humans can determine whether the causal facts can be changed or not. If the facts can be changed, solving a problem is a matter of changing the causal variables and circumstances generating the problem. If the facts cannot be changed, solving the problem is a matter of changing the meaning or interpretation of the facts to eliminate the unpleasantness of the problem. Some facts are variable and can be changed. Some facts are immutable and cannot be changed. Some facts that can be changed should not be changed.
Answers are statements that fill in the blanks or knowledge gaps created by questions. There can be more than one valid answer to questions. All questions can be answered by addressing the root of all problems, which is ignorance. With sufficient knowledge, all problems can be solved and all questions can be answered. Yet that doesn't mean that all problems should be solved or that all questions should be answered.
The Problem Paradox is that the solution to a problem inevitably creates more problems. Oftentimes, the new problems are more complex and harder to solve than the original problems. Patience and wisdom are required to know when to solve problems and when to leave them either completely or partially unresolved. The difference between intelligence and wisdom is that intelligence is the ability to solve a problem whereas wisdom is the virtue of knowing when to solve a problem and when to leave it unresolved.
Data science is a field of study to extract knowledge from massive amounts of data. It combines methods from various domains including computer science, mathematics, and communications to collect, analyze, and interpret complex data. AI is the poster child data science tool. AI is the best technology (tool and method) to expand human knowledge using data science.
Typical data science processes include the following:
- Collection. Collecting data entails gathering facts from sources such as databases, files, sensors, websites, etc.
- Preparation. This is dealing with missing values, handling outliers, transforming data into suitable formats, and preparing it for analysis.
- Exploratory Data Analysis (EDA): Understanding the characteristics of the data through summary statistics, data visualization, and other exploratory techniques.
- Statistical Analysis and Modeling: Applying statistical methods and machine learning algorithms to identify patterns, make predictions, or gain insights from the data.
- Data Visualization and Communication: Presenting the results of analysis in a clear and understandable manner through visualizations, reports, or presentations.
- Artificial Intelligence: Using algorithms to process data, find patterns, and make predictions using AI. Includes building predictive models, clustering algorithms, and classifying models.
- Big Data Technologies: Working with large volumes of data that may require distributed computing frameworks like Hadoop or Spark.
- Domain Expertise: Understanding the specific domain or industry context in which the data is generated to derive meaningful insights and actionable recommendations.
Data science is the field of the moment with plenty of momentum in the AI Era. Data science is being widely and sometimes wildy applied across various fields including business, healthcare, finance, marketing, and social media analysis. In the next five decades, data science will become more and more relevant to optimizing all aspects of modern human life. Applications of data science range from the mundane to the insane. Applications range from predicting customer behavior to optimize marketing to advancing scientific research and improving public health outcomes.
Computers, AI, and human programmers are the protagonists of the the data science scene. This is a wonderful time to become a data scientists or at least to become acquainted with computer science and AI. One the best ways to advance progress in that direction is learning a little every day about Python, a multi-purpose, an easy to learn computer programming language widely used in data science and AO applications.
Below are some bits and pieces of basic information about computer programming with a focus on Python.
Data types. Python has a variety of data types, including integers, floats, strings, and booleans. You should be
- Integers are whole numbers (e.g. 50 or 100).
- Floats are numbers with a fraction (e.g. 50.2 or 100.75). "Float" is short for "floating point number". In Python, the float function converts values into floating point numbers.
- Strings are words and sentences. Strings are enclosed in quotation marks so that the program takes them as they are fed into the code without treating them as functins or as numbers.
- Booleans are binary data types that can only have one of two possible values: true or false. Boolean logic applies comparison operators (e.g. AND, OR, NOT) to return a true or false statement.
Data structures. Python also has a variety of data structures, such as lists, tuples, sets, arrays, and dictionaries. You should be familiar with how to use these data structures to store and organize data.
- Lists are data sequences that contain a discrete or finite data items arranged in a particular order.
- Tuples are immutable lists (i.e. the items cannot be changed).
- Sets are data structures holding elements by value or characteristics. For example, all odd integers, or all even integers.
- Arrays are data structures holding elements by order or position. For example, an array of every third item in an index.
- Dictionaries are data structures that store data using a key and value system. For example, the word is the key and teh definition is the value.
Functions are code sections that call for the performance of a specific task. This typically involves taking some input, performing an operation (logical or mathematical), and returning an output. Functions in Python begins with the word def, followed by the function's name enclosed in parenthesis and a colon (): Then indented within the def are the lines of code that make up the function.
Modules are code files that are imported for use into into a program In Python, modules are files of Python code saved with the “. py” extension. They contain Python code that can be imported for use inside another Python program. Modules can be seen as the "books" within a code library. Python comes with lots of modules to add new features. For example, a math module would add math functions like square roots, calculus operations, etc.
Libraries are collections of modules (prewritten code) for specific tasks. Libraries contain pre-coded modules that can serve as solutions to problems or programming needs. Libraries are used to avoid having to reinvent the wheel or rewrite every book from scratch for every coding problem or need. Sample Python libraries include:
- Numpy: Python library with functions for operations on numerical data. To run a Numpy module, Numpy must be installed in the version of Python being used. Numpy is installed from Python's official website.
- Pandas is a Python library with functions for analyzing and tabulating data. You should be familiar with how to use Pandas to read, write, and manipulate data frames. Pandas can be run from any text editor. Jupyter Notebook is recommended because it executes code cell by cell, and displays pandas data frames and plots separately.
- Matplotlib is a Python library for data plotting and visualizing. To install it, open a Command Prompt. Type pip install <package_matplotlib> . To use it, name the x-axis and y-axis using . xlabel() and . ylabel() functions. Define the x-axis and corresponding y-axis values as lists. Plot them using . plot() function. Add plot title using . title() function. View result using show() function.
lambda arguments: ______
python# Define a decorator function
def my_decorator(func):
def wrapper():
print("Something is happening before the function is called.")
func() # Call the original function
print("Something is happening after the function is called.")
return wrapper
# Apply the decorator using the "@" syntax
@my_decorator
def say_hello():
print("Hello!")
# Call the decorated function
say_hello()
- Use the cProfile module to generate a profile report.
- View the profile report to identify bottlenecks.
- Optimize the code to make the bottlenecks run faster.
- Repeat the profiling process until the code is running as efficiently as possible.
- Execute Python code directly
- Define functions
- Import modules
- Correct syntax
- Debugging
- Run menu. The Run menu can bring up the Python Shell, check code for errors, or run new code.
- Options menu includes a Configure that can change fonts, colors, and key shortcuts. It has a Code Context option that shows which class or function its working.
- Windows menu shows a list of currently open Windows, allowing to switch from one to another.
- Help menu to get help using IDLE and learn more about Python in general. It includes helpful HOWTO guides and quasi tutorials.
Comments
Post a Comment