top of page

Machine Learning Tutorial

Public·1 member

numpy.leadtxt() function in Python

numpy.loadtxt() in Python is used load data from a text file, with aim to be a fast reader for simple text files.

Note that each row in the text file must have the same number of values.


Here is myfile.csv file content

5.1,3.5,1.4,0.2,Iris-setosa
4.9,3.0,1.4,0.2,Iris-setosa
5.8,2.7,4.1,1.0,Iris-versicolor
6.2,2.2,4.5,1.5,Iris-versicolor
6.4,3.1,5.5,1.8,Iris-virginica
6.0,3.0,4.8,1.8,Iris-virginica

Load NumPy library

# import numpy library as np
import numpy as np
# numerical data file
filename="myfile.csv"

19 Views

Machine Learning trade-off

In machine learning, there is always a trade off between

  • complex hypotheses that fit the training data well

  • simpler hypotheses that may generate better.

As the amount of training data increases, the generalization error decreases

8 Views

Performance Measures In Machine Learning

The performance or efficiency of a classifier is shown by various features that tells how well working the particular classifier is.


There are the various ways to check the performance of our machine learning model and why to use one in place of the other. We will discuss terms like:

  • Confusion matrix

  • Accuracy

  • Precision

  • Recall


18 Views

Principal Component Analysis(PCA) In Machine Learning

Principal Component Analysis will help you understand the concepts behind dimensionality reduction and how it can be used to deal with high dimensional data.



Use of principal component analysis

In large dimensional datasets, there might be lots of inconsistencies in the features or lots of redundant features in the dataset, which will only increase the computation time and make data processing and EDA more convoluted.

To solve this problem PCA algorithms are used.


Steps to do this:


107 Views
bottom of page