Thursday 16 February 2023

What should you required to learn machine learning

 To learn machine learning, you will need to acquire a combination of technical skills and domain knowledge. Here are some of the things you will need to learn:

  1. Mathematics and Statistics: Machine learning is based on mathematical and statistical concepts, such as linear algebra, calculus, probability, and statistics. You will need to have a strong foundation in these subjects to understand machine learning algorithms and techniques.

  2. Programming: Machine learning is implemented using programming languages such as Python, R, and MATLAB. You will need to learn a programming language and be proficient in it to build machine learning models.

  3. Machine learning algorithms: You will need to learn about different machine learning algorithms, including supervised learning (e.g., linear regression, decision trees, support vector machines), unsupervised learning (e.g., clustering, principal component analysis), and reinforcement learning.

  4. Data preparation: Data preparation is an important step in machine learning, where you clean, transform, and preprocess the data. You will need to learn about data preparation techniques such as feature engineering, data normalization, and data cleaning.

  5. Data visualization: Data visualization is an important aspect of machine learning where you can explore and understand the data. You will need to learn how to create visualizations using libraries such as Matplotlib and Seaborn.

  6. Deep learning: Deep learning is a subfield of machine learning that focuses on neural networks. You will need to learn about neural networks, deep learning architectures, and frameworks such as TensorFlow, Keras, and PyTorch.

  7. Domain knowledge: Domain knowledge is critical to developing machine learning solutions that are effective in solving real-world problems. You will need to learn about the specific domain you are working on and understand the context of the problem you are solving.

Overall, learning machine learning is a long-term commitment that requires a combination of technical skills, domain knowledge, and continuous learning. It's a challenging but rewarding field that offers many opportunities for personal and professional growth.

Step-by-step guide to building a machine learning model

 

  1. Define the problem: Start by defining the problem you want to solve. What is the goal of the project, and how will the machine learning model help you achieve it?

  2. Collect data: Once you have defined the problem, you will need to collect data. The data should be relevant to the problem you are trying to solve, and it should be representative of the population you are targeting.

  3. Clean and preprocess the data: The data you collect may not be in the format you need for your machine learning model. You will need to clean and preprocess the data to get it into the right format.

  4. Explore the data: Once the data is in the right format, explore it to gain insights. This may involve visualizing the data, computing descriptive statistics, or running simple machine learning models.

  5. Choose a machine learning algorithm: Based on your exploration of the data, choose a machine learning algorithm that is appropriate for the problem you are trying to solve. There are many different algorithms to choose from, so you may need to experiment with several to find the best one.

  6. Train the model: Once you have chosen an algorithm, train the model on your data. This involves feeding the data into the algorithm and letting it learn from the data.

  7. Evaluate the model: Once the model is trained, evaluate it to see how well it performs. This may involve testing the model on a separate set of data or using cross-validation techniques.

  8. Optimize the model: If the model does not perform well, you may need to optimize it. This may involve tweaking the parameters of the algorithm, collecting more data, or choosing a different algorithm.

  9. Deploy the model: Once the model is optimized and performs well, deploy it in a production environment. This may involve integrating it with other software systems, setting up monitoring and logging, and creating user interfaces for the model.

  10. Monitor and maintain the model: Once the model is deployed, you will need to monitor it to ensure it continues to perform well. This may involve tracking performance metrics, retraining the model with new data, and updating the model as necessary.

Overall, building a machine learning model is an iterative process that requires constant experimentation, optimization, and refinement. By following these steps, you can build a model that solves your problem and delivers value to your organization.

Monday 21 November 2022

AspNet Core Background Task

 public class ScheduledService: IHostedService


{

    private readonly CrontabSchedule _crontabSchedule;

    private DateTime _nextRun;

    private const string Schedule = "0 0 23 * * *"; // run day at 11 pm



    public ScheduledService()

    {

        _crontabSchedule = CrontabSchedule.Parse(Schedule, new CrontabSchedule.ParseOptions{IncludingSeconds = true});

        _nextRun = _crontabSchedule.GetNextOccurrence(DateTime.Now);

    }


    public Task StartAsync(CancellationToken cancellationToken)

    {

        Task.Run(async () =>

        {

            while (!cancellationToken.IsCancellationRequested)

            {

                await Task.Delay(UntilNextExecution(), cancellationToken); // wait until next time


              //execute some task


                _nextRun = _crontabSchedule.GetNextOccurrence(DateTime.Now);

            }

        }, cancellationToken);


        return Task.CompletedTask;

    }


    private int UntilNextExecution() => Math.Max(0, (int)_nextRun.Subtract(DateTime.Now).TotalMilliseconds);


    public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;

}


Cron Expressions refer

https://github.com/atifaziz/NCrontab


Tuesday 29 March 2022

Elastic Search query_string Query

Query string query:

query_string query to create a complex search that includes wildcard characters searches across multiple fields
This query uses syntax to parse and split the provided query string based on operators, such as AND or NOT

Sample Queries:
GET /_search
{
  "query": {
    "query_string": {
      "query": "(new york city) OR (big apple)",
      "default_field": "content"
    }
  }
}

GET /_search
{
  "size": 10,
    "sort": [
    {
      "date": {
        "order": "desc"
      }
    }
  ],
  "query": {
    "query_string": {
      "query": "(IP:\"\" AND URI:*API*)"
    }
  }
}
Match
GET /_search
{
  "query": {
         "match" : {
            "URI" : "/index.html"
        }
  },
  "size": 10,
  "sort": [
    {
      "date": {
        "order": "desc"
      }
    }
  ]
}


Term

GET /_search
{
  "size": 10000,
  "sort": [
    { "date": "desc" }
  ], 
  
"query": {
    "bool": {
        "must" : [
          {
           "term": {
             "name": "Bob"
           }
         },
         {
           "term": {
             "gender": "male"
           }
         }
       ]
     }
   }
}

Friday 29 November 2019

Machine Learning Week-1

What is Machine Learning?

A Computer program is said to be learn from experience E with respect to some class of tasks T and performance P, if its performance at tasks in T ,as measured by P, improves with experience E. 
--Tom Mitchell
Example: playing checkers.

E=the experience of playing many games of checkers.
T= task of playing checkers
P=the probability that the program will win the next game.

In general ,any machine learning problem can be assigned to one of two broad classifications:
Supervised learning,Unsupervised learning.

Thursday 11 May 2017

Get executed queries history Sql

SELECT  deqs.last_execution_time,dest.text
FROM    sys.dm_exec_query_stats AS deqs
        CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
WHERE   deqs.last_execution_time > '05/11/2017 11:00' -- check date
        AND dest.text LIKE '%querytomatch%' -- optional
        AND dest.dbid = DB_ID('dbname')
        order by deqs.last_execution_time desc

Monday 8 May 2017

Difference between J2EE,J2SE & J2ME

J2SE stands for Java 2 standard edition and is normally for developing desktop applications, forms the core/base API.
J2EE stands for Java 2 enterprise edition for applications which run on servers, for example web sites.
J2ME stands for Java 2 micro edition for applications which run on resource constrained devices (small scale devices) like cell phones, for example games.
Netbeans is an IDE (Integrated development environment) developed in Java which eases your job of application development.

What should you required to learn machine learning

  To learn machine learning, you will need to acquire a combination of technical skills and domain knowledge. Here are some of the things yo...