Posts

Machine learning : Credit card Fraud detection project

Image
At first we start i assume that you know python preety much it's recommended but not necessary . At  First we Are going to use this data for Credit card fraud detection . https://www.kaggle.com/mlg-ulb/creditcardfraud   go to the link and download it . Before we start fitting our model to dataset we do some data processing. To Know much about data, and get more idea about data, data processing is must . 1. Importing Necessary Libraries To start, let's print out the version numbers of all the libraries we will be using in this project. This serves two purposes - it ensures we have installed the libraries correctly and ensures that this tutorial will be reproducible. In [1]: import sys import numpy import pandas import matplotlib import seaborn import scipy print ( 'Python: {}' . format ( sys . version )) print ( 'Numpy: {}' . format ( numpy . __version__ )) print ( 'Pandas: {}' . format ( pandas . __version__ )) print ...

All data structure codes using java

Image
I had cerated this github repo . In this repo i have covered nearly every topic which is essential in Data-Structure .  THE LIST IS HERE : 1.  data_structure/sorting  2.  hash table 3.  linked list 4. stack 5. queue 6. heaps 7. sets 8 Tree  9. Vectors Download source code for all datastructure in java Direct download zip files of Data Structure using java repository  following are screenshots of repo what it will contain : I really hope here you will find all neccessary codes for data structure and will be to understand . you can also add a read me for my repository . @Mazerunner

Stack - data structure using java(part-3)

! . first created first basic Employee class. package stacks; public class Employee { String firstname; String lastname; int id; public Employee(String firstname, String lastname, int id) { super(); this.firstname = firstname; this.lastname = lastname; this.id = id; } /** * @return the firstname */ public String getFirstname() { return firstname; } /** * @param firstname the firstname to set */ public void setFirstname(String firstname) { this.firstname = firstname; } /** * @return the lastname */ public String getLastname() { return lastname; } /** * @param lastname the lastname to set */ public void setLastname(String lastname) { this.lastname = lastname; } /** * @return the id */ public int getId() { return id; } /** * @param id the id to set */ public void setId(int id) { this.id = id; } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ @Override p...

Lnked lists-data structure using java(part-2)

step 1 : at first we have to create this "Employeelinkedlist" class for performing actions on linked lists .you can use any normal datatype also instead of using this specific class . package linked_list; public class Employeelinkedlist { private Employeenode head; private Employeenode tail; public void addtofront(Employee_1 employee) { Employeenode node = new Employeenode(employee); node.setNext( head); if(head== null) { tail = node; } else { head.setPrev(node); } head = node; } public void printlist() { Employeenode current = head; System.out.print("Head ->"); while(current != null) { System.out.print(current); System.out.print("<->"); current=current.getNext(); } System.out.println("null"); } } STEP 2 :- create "Employeenode" class for employees . package linked_list; public class Employeenode { private Employee_1 employee; private Employeenode next...

Sorting :data structure using java (part-1)

This will be a series of 4-5 for data structure including codes with demonstration . this is very first for sorting . follow for more and see more blogs on django ; mongodb : hackerrank solutions etc. 1 . BUBBLE SORT :-- The most initial and basic sorting algorithm is bubble sort . We just compare left element of array to right element of array and swap it as per our need of ,as we want to arrange array in ascending or Descending order .  package sorting; import java.util.*; import java.io.*; public class Bubble_sort { public static void main(String[] args) { Scanner sn = new Scanner(System.in); int array [] = new int [5]; for(int i=0 ; i<5;i++) { array[i] =  sn.nextInt(); } for(int i=0 ; i<5;i++) { for(int j=i+1;j<5;j++) { if(array[i]>array[j]) { int temp = array[i]; array[i] = array[j]; array[j] = temp; } } } for(int k=0;k<5;k++) { System.out.printl...

MONGODB - a nosql database

Image
Before we start with mongodb , we have to know first why we need it ? We always use a SQL( structured query language) for database operations . Every thing in such databa ses is in tabular form. So if you have unknown set of data then how are you going to deal with it . The most easy way is to use a unstructured language. mongobd gives us such support. It takes data in JSON format and do its operations on it . No tables, no queries, no predefined format , not any need of known structure of data. So mongodb is most preferrable way to create your database and it is also faster .We will understand steps in its creation as following -- Databases: In MongoDB, databases hold collections of documents. To select a database to use, in the  mongo  shell, issue the  use   <db>  statement, as in the following example: copy copied use myDB Create a Database If a database does not exist, MongoDB creates the database when you first s...