Naive Bayes Spam Filter Example

Naive Bayes classifier

Naive Bayes classifier is one of the easiest classification algorithms. However, very often it works even better than the more complex algorithms. I want to share the C# code and a description of how it all works.

And so, for example, I will take the problem of determining the type of the vehicle using it’s dimensions. Of course, to determine the type, you can create a large list of vehicles. But this list, in any case will never be comprehensive. In order to solve this problem, you can “train” a model for the marked name. Continue reading

Engineering Samples: The One about Stress Analysis of Riveted Lap Joint

Problem statement: There is a lap joint with one rivet, as shown in the Figure 1 below. The diameter of the rivet is 4 mm. The material of the rivet, as well as the material of pates in joint are given in the table 1 below. Force which is applied to the plate is given in form of distributed force through the cross-sectional area of the plate. Perform the Stress Analysis of the joint in order to verify the durability of the junction.

Lap joint

Figure 1. Lap joint

Continue reading

Engineering Problem Solving

Double Pipe Heat Exchanger Using ANSYS Workbench

In order to design a Double Pipe Heat Exchanger in ANSYS 16.1 the next steps were
accomplished:

a) Creating the project:

  1. Open the ANSYS 16.1 workbench;
  2. Select Fluid Flow (Fluent) in the toolbox menu at the left area of the window and create a new project.
  3. Rename the Project on “double-pipe” as shown in the Figure 1 below.
    figure-1-project-double-pipe

    Figure 1. Project “double-pipe”

  4. Save the project

Continue reading

Solved Problems in Physics: Classical Mechanics

Physics assignment

Classical mechanics

Problem statement

Particles with two different masses m and M are located along a linear harmonic chain
of infinite length. The chain has a force constant k (see the picture below). The
distance between two particles with the same mass is equilibrium and equals to a.
qj and rj are the deviations of particles mj and Mj from their equilibrium positions respectively. Continue reading

How to Create a Readme File: Sample with Explanations

Readme file is a small document, which is usually attached to the program. Readme files are written by software developers and contain basic information about the program, including the info about the installation or management of the system settings, contact information, license, gratitude, and information about the software version. To distribute the software it is important to know how to write the Readme file. Poorly written Readme document can be frustrating, tiring for the user, while a good one will help him to easily learn the basic information about your program. Continue reading

SQL Code Samples: Database

MS SQL TASK:

Create new MS SQL database. In this database, create a table called “store” with the following information:

Apples provided by Sunshine Ltd: 3.08 (expiration date 2016.07.20)
Apples provided by NewFood: 3.88 (expiration date 2016.07.30)
Apples provided by FreshGoods: 2.53 (expiration date 2016.06.25)
Potatoes provided by Sunshine Ltd: 1.61 (expiration date 2016.10.01)
Potatoes provided by NewFood: 2.01 (expiration date 2016.12.11)
Tomatoes provided by Sunshine Ltd: 3.65 (expiration date 2016.05.20)
Tomatoes provided by NewFood: 5.30 (expiration date 2016.05.25)
Eggs (pack of 12) provided by Sunshine Ltd: 4.59 (expiration date 2016.06.13)
Eggs (pack of 12) provided by FreshGoods: 3.13 (expiration date 2016.06.01)
Carrots provided by Sunshine Ltd: 2.50 (expiration date 2016.08.22)
Carrots provided by FreshGoods: 3.30 (expiration date 2016.07.30)
Carrots provided by NewFood: 2.80 (expiration date 2016.08.10)
Onions provided by NewFood: 1.95 (expiration date 2016.05.20)
Onions provided by FreshGoods: 1.35 (expiration date 2016.05.10)
Onions provided by FreshFoods: 5.25 (expiration date 2016.05.25)
Plastic bags provided by Sunshine Ltd: 0.10 (no expiration date)
Paper bags provided by PaperFactory Ltd: 0.15 (no expiration date)
Paper bags provided by FreshMoods: 0.20 (no expiration date)
Handkerchiefs provided by FreshMoods: 0.30 (no expiration date)

Continue reading