top of page

Search Results

Search this site

963 results found with an empty search

  • Java Console Application For Recovering COVID-19

    Assignment task Write a java console application for calculating the chance of recovering from COVID-19 based on age and past statistics about COVID-19 recoveries and deaths. The example data statistics such as age range, age group, number of patients, number of recovered patients, and number of deaths are shown below in Table 1. The application should ask the user to enter the age for each patient and calculate the chance of recovering in percentage and age group for each patient. The application should run for N times (N is number of patients). N should be declared as a constant and it should be equal to the largest digit of your student ID number (e.g. if your ID number is S334517 then N should be equal to 7 and you can declare it as final int N=7). The application should display the chance to recover (e.g. (recovered patients/patients) * 100) and age group for each patient as shown in the example below. At the end of the Nth patient, the details such as age of youngest patient, age of oldest patient and average age of all patients should be displayed. Output Formate: Example for N=6 Enter the age for patient 1: 29 The chance to recover for patient 1 is 99.98% The age group for patient 1 is 1 Enter the age for patient 2: 61 The chance to recover for patient 2 is 98.83% The age group for patient 2 is 3 Enter the age for patient 3: 55 The chance to recover for patient 3 is 99.84% The age group for patient 3 is 2 Enter the age for patient 4: 86 The chance to recover for patient 4 is 80.52% The age group for patient 4 is 5 Enter the age for patient 5: 73 The chance to recover for patient 5 is 95.57% The age group for patient 5 is 4 Enter the age for patient 6: 94 The chance to recover for patient 6 is 16.00% The age group for patient 6 is 6 Code Script: Patient.java package com.myfirstprogramme; //import java.util.Scanner; public class Patient { // instance variable/constant declarations private int patientAge; private int ageGroup=0; private int patients=0; private int recoveredPatients =0; private int youngestPatientAge; private int oldestPatientAge; private int avgAge=0; public Patient(int patientAge,int youngestPatientAge, int oldestPatientAge,int avgAge) { // constructor to initialize the values of private variables this.patientAge= patientAge; this.youngestPatientAge= youngestPatientAge; this.oldestPatientAge=oldestPatientAge; this.avgAge = avgAge; } // under the patientGroup method comapre agegroup public void patientGroup() { if (0 < patientAge && patientAge<=49) { ageGroup=1; patients=5200; recoveredPatients=5199; }else if (50<=patientAge && patientAge<=59) { ageGroup=2; patients=1300; recoveredPatients=1298; }else if (60<=patientAge && patientAge<=69) { ageGroup=3; patients=1200; recoveredPatients=1186; }else if (70<=patientAge && patientAge<=79) { ageGroup=4; patients=1700; recoveredPatients=669; }else if (80<=patientAge && patientAge<=89) { ageGroup=5; patients=190; recoveredPatients=153; }else if (patientAge>=90) { ageGroup=6; patients=25; recoveredPatients=4; } } //Method patientChanceToRecover public double patientChanceToRecover() { // code to calculate chance to recover using following formula // chance to recover (%) = (recovered patients/patients for that age group in Table 1) * 100 patientGroup(); prepareReport(); double chanceToRecover= ((double)recoveredPatients/(double)patients)*100; return chanceToRecover; } //under prepareReport method comparing youngest age and oldest age public void prepareReport(){ if (youngestPatientAge>patientAge) { youngestPatientAge=patientAge; } if (oldestPatientAge<patientAge) { oldestPatientAge=patientAge; } avgAge = avgAge+patientAge; } //getters to get the values of private vriables public int getRecoveredPatients() { return recoveredPatients; } public int getYoungestPatientAge() { return youngestPatientAge; } public int getOldestPatientAge() { return oldestPatientAge; } public int getAvgAge() { return avgAge; } public int getPatientAge() { return patientAge; } public int getAgeGroup() { return ageGroup; } public int getPatients() { return patients; } } PatientTest.java package com.myfirstprogramme; import java.util.Scanner; public class PatientTest { public static void main(String[] args) { //Variables used in the application final int noOfPatients; int patientAge=0; Patient patient=null; int youngestPatientAge =99999; int oldestPatientAge =0; int avgAge=0; System.out.println("Welcome To COVID-19 Patient Data"); Scanner sc = new Scanner(System.in); System.out.print("Please enter the number of patients "); noOfPatients=sc.nextInt(); System.out.println(); for (int i = 1; i <=noOfPatients; i++) { System.out.print("Please Enter the age of Patient "+ i +" "); patientAge = sc.nextInt(); patient =new Patient(patientAge,youngestPatientAge,oldestPatientAge,avgAge); System.out.println("The chance to recover for patient "+ i +" is "+ patient.patientChanceToRecover()); System.out.println("The age group for patient "+ i +" is " + patient.getAgeGroup()); System.out.println(); youngestPatientAge = patient.getYoungestPatientAge(); oldestPatientAge= patient.getOldestPatientAge(); avgAge= patient.getAvgAge(); } System.out.println("--------------------------------------------------Report----------------------------------------------------------"); System.out.println("Age of youngest patient: "+ patient.getYoungestPatientAge()); System.out.println("Age of oldest patient: "+ patient.getOldestPatientAge()); System.out.println("Average age of all patients: "+ (double)patient.getAvgAge()/noOfPatients); System.out.println("-------------------------------------------------------------------------------------------------------------------"); System.out.println("Exiting the application"); //closing resources sc.close(); } } Are you looking for Java Web and console-based Programming experts to solve your assignment, homework, coursework, coding, and projects? Codersarts web developer experts and programmers offer the best quality Java web and console-based Programming programming, coding or web programming experts. Get Web Assignment Help at an affordable price from the best professional experts Assignment Help. Order now at get 15% off. CONTACT US NOW

  • Data Visualization With Python | Sample Assignment.

    Consider the kaggle dataset derived from the IMDB database available at https://www.kaggle.com/stefanoleone992/imdb-extensive-dataset We can interpret this dataset as a network of movie actors, where the actors are connected by the number of movies in which they appear together. A similar network of book characters is depicted in the course materials by an adjacency chart and a force directed graph. However, there are too many actors in the IMDB dataset to depict the entire network in this fashion. Design and implement a visualization that will allow the user to explore the relationships in the network. Apply any data reduction or other techniques you can justify to produce an effective visualization. There is a file called movies.csv dataset thats what I need to include in my graph which is either an adjacency chart or force-directed graph whichever is more suitable. I need only one of them. I need to connect the actors that appeared together in a movie. However, the dataset is massive so I would need to do data reduction in order to make it visible and professional. Please include description and how you did it. Deadline is on Wednesday. Please let me know how much and when it can be completed. If you need a complete solution of this using python machine learning then CONTACT US and get instant help at an affordable price.

  • Programming Languages to Making Innovative Android App

    Take a minute to think about how many times you use an app in a day? Multiple times, isn’t it? In fact, there is probably an application waiting to be discovered in your app store for every possible human need. Therefore, it is no surprise that the demand for mobile applications has been on a steady rise ever since the smartphone was invented. Kotlin Said to be the advanced version of Java – Kotlin is a statistically typed programming language used for developing modern Android applications. Kotlin is a really best language for apps. Kotlin has the potential to influence other programming languages such as JAVA to make high-performing and robust apps. Some popular apps built-in Kotlin are Trello, Evernote, Coursera, and many more. Clean, concise, and perceptive syntax increases team efficiency. Interoperable and versatile and can easily overrule the shortcomings of JAVA. Has full support from Google and IDE’s installation packages including Android and SDK toolkit. Generates compact, simple, and cleaner code as compared to JAVA. Java : Java is an official Android development – object-oriented programming language. With in-built open-source libraries readily available for users to choose from, JAVA is easy to handle and offers the best documentation and community support. With JAVA’s vibrant spectrum of features, you can develop the best cross-platform apps, Android apps, games, server apps, embedded space, websites, and more. Popular for code reusability and portability JAVA codes can run in multiple environments, virtual machines, browsers, and different platforms Safeguards developers against issues inherent in native code, memory leaks, etc. Flexible, versatile, portable, and platform-independent programming language Explicit interface, simplified, and machine-independent language Hire an android developer to get quick help for all your android app development needs. with the hands-on android assignment help and android project help by Codersarts android expert. You can contact the android programming help expert any time; we will help you overcome all the issues and find the right solution. Want to get help right now? Or Want to know price quote

  • Inventory Management System Using JavaFX

    Guidelines – Please read carefully: I. This assignment/module is used to assess your object-oriented design and programming skills. Hence, any use of databases and query languages (e.g. SQL) is strictly prohibited and would result in a fail grade. Brief: Design, implement and test an inventory management system for a real estate agent in Northampton using object-oriented principles in Java FX. The design should include class diagrams. Testing should include both the white box (JUnit tests) and the black box (test logs). Consider the following requirements: The agent sells/rents houses (detached, semi-detached, terraced), flats, and bungalows in different areas of Northampton such as Abington, Far Cotton, Duston, Wootton, and so on. Each accommodation has a minimum of 1 bedroom and a maximum of 5 bedrooms. Here are the specific requirements: Basic System Requirements: The system must allow the agent to: 1. Record details of a new customer (name, phone number, current address, etc.) 2. Display houses for sale (details of each house – detached, bedrooms, bathrooms, garden, etc.) 3. Sell houses to customers (i.e. record details of sales transaction) 4. Generate a sales invoice including details of agent fees of 1.5%. 5. Record payment for each customer. 6. Permanent storage and retrieval of all records (object serialization or text/CSV files). Enhancements (in order of importance – high to low): Additional features that you may include are as follows: 7. Search for a house by property type (e.g. detached house, flat, bungalow), area, price range, number of bedrooms, bathrooms, status (sold/unsold/on offer). 8. Display houses for rent (including rental price) and generate several invoices (initial invoice including deposit, agent fees, and one month’s rent; monthly rental invoices; final invoice at the end of contract including any deduction for damage). Assume the deposit to be three times the monthly rent and agent fees to be £300.00. 9. Ability to automatically generate and send emails containing monthly rental invoices (as attachments) to all customers. 8. Input/update inventory information (i.e. add/modify stock, prices) 10. Send an email containing the invoice as an attachment (pdf file) to the customer 11. Record a customer waiting list when accommodation is unavailable and notify them when it becomes available 12. Role based access (e.g. separate accounts for sales person, stock manager and administrator) 13. Login feature for the system These additional features are only suggestions and are not exhaustive. You may include any other useful features relevant to this application. You may make assumptions regarding any other specifications not detailed in this brief. Deliverables: All requirements (A, B and C below) MUST be delivered to achieve a passing grade for this assignment. A) Technical Report The report should consist of the following sections (in the same order): 1. Username and password for all relevant accounts (if implemented) 2. UML Class Diagrams showing relationships between the main classes in the model 3. A list of all the features implemented in a tabular format. For example: 4. Explanation of the main sections/fragments of the code. Provide information that would be useful for another developer (not an end user!) who may want to extend/maintain your system. You may want to refer to the class diagrams to explain code. 5. Screenshots of the system showing all key features 6. Evidence of Testing: a. Blackbox Testing: Test logs providing information of all the tests carried out (including any failed tests for functionality not implemented) b. Whitebox Testing: Code Listing of the JUnit test case for at least two methods. c. List of any bugs and/or weaknesses in your system (if you do not think there are any, then say so). Bugs that are declared in this list will lose you fewer marks than ones that you do not declare. 6. References If you have borrowed some code from elsewhere (e.g. from a book or some resource on the web you must indicate clearly what they are and include references). B) Source Code The source code must be well documented with necessary comments. Consistent and clear indentation of the code is also important. Source code needs to be submitted in two forms: (i) As a single ZIP archive (.zip file consisting of all “.java” files, unit tests, data files, executable jar). Note: It is important to submit an executable jar. You will be penalized for not submitting it. (ii) A commented full listing in a separate Word document named “Full Source Code Listing”. C) Video Demonstration In addition to the report, you must submit a video demo (URL) of your assignment. The demo should be about 10 minutes long (maximum:15 minutes) and should cover all of your work in a logical way. You should explain the main phases of design and implementation covering the main fragments of code. Your voice needs to be clear for the marker to hear. It should also include a walkthrough of using the software and must demonstrate the key features. The module tutor reserves the right to invite you for an online viva-voce. Poor demo/viva could negatively influence other sections in the marking criteria. Submission Procedure: TWO separate WORD documents. [Document 1 = Report & Document 2 = FullSourceCodeListing] Contact us for this JavaFx assignment Solutions by Codersarts Specialist who can help you mentor and guide for such JavaFX assignments.

  • Food Menu App Using Rest

    In This App User can see the list of food, Recipe link related to that food, image of food into the app, If user click any food into the list user is able see the recipe of that food, & into the top of the app user can see the search icon to search which he and likes. There is a navigation view into the navigation user can see logout button , list of recipe and setting button. Concepts Use Menu Navigation SearchView Models ArrayAdapter ListView Fragment Rest Api OnclickListener Tools and Technologies Android Studio As the official integrated development environment for all Android applications, Android Studio always seems to top the list of preferred tools for developers. Android Studio provides code editing, debugging, and testing tools all within an easy-to-use drag-and-drop interface. It is free to download and is supported not only by Google, but also by a large and actively engaged community of Android developers. ADB (Android Debug Bridge) Android Studio includes the Android Debug Bridge, which is a command-line tool or “bridge” of communication between Android devices and other computers that can be used during development and the overall debugging and QA process. By connecting an Android device to the development PC and entering a series of terminal commands, a developer is able to make modifications as needed to both devices. AVD Manager As we mentioned above, there was Eclipse before there was Android Studio. For a long time, Eclipse was the officially preferred IDE for all Android application development. Even though Google no longer offers support for Eclipse, many developers still use it to create Android and other cross-platform apps, as it works very well with many different programming languages. Java The mobile edition of Java is called Java ME. Java ME is based on Java SE and is supported by most smartphones and tablets. The Java Platform Micro Edition (Java ME) provides a flexible, secure environment for building and executing applications that are targeted at embedded and mobile devices.\ Hire an android developer to get quick help for all your android app development needs. with the hands-on android assignment help and android project help by Codersarts android expert. You can contact the android programming help expert any time; we will help you overcome all the issues and find the right solution. Want to get help right now? Or Want to know price quote GitHub : https://github.com/rishabh1422/music

  • Introduction To Java and object-Oriented Programming

    Introduction This is coursework assignment 1 (of two coursework assignments in total) for 2020–2021. The assignment asks that you demonstrate an understanding of variables, random numbers, user input with the Scanner class, the “if – else” statement, loops and static methods with their return types. In addition, this assignment considers how to write code that is readable. Electronic file you should have: StringMangler.java What you should hand in: very important You are asked to submit one Java file so there is no reason to compress your submission, or to submit it in a directory. There is one mark allocated for handing in an uncompressed file – that is, students who hand in a zipped or .tar file or any other form of compressed file can only score 99/100 marks. There is one mark allocated for handing in just the file asked for without putting it in a directory; hence, students who upload their file in a directory can only achieve 99/100 marks. There is one mark for naming the Java file that you have been asked to submit exactly as asked. This means that your Java file should be named StringManglerTwo.java and should contain a public class called StringManglerTwo. Please note that since Java is case sensitive Stringmanglertwo.java is not the same file name as StringManglerTwo.java; please be exact. Sometimes students add identifying information to their Java files, meaning that the class name and the file name differ, and the file will not compile. For example: JSmith_StringManglerTwo.java cwk1-StringManglerTwo.java JSmith-CO1109-assignment1-StringManglerTwo.java StringManglerTwo .java (note space before full stop) Files that do not compile because of a clash between the file name and the class name will be marked. Furthermore, submissions that do not compile for any other reason will not receive any marks. The examiners will compile and run your Java program; students who hand in files containing their Java class that cannot be compiled (e.g. PDFs) will not be given any marks for the assignment. The examiners wish to read your Java code, so class files will not be marked. Any student giving in only a class file will not receive any marks for the coursework assignment, so please be careful about what you upload as you could fail if you submit incorrectly. Please put your name and student number as a comment at the top of your Java file. Java Version Please use Java 11 or later versions of Java for this coursework assignment. The StringMangler class You have been given the StringMangler class. The class offers the user various options, all of which take a String as input and return the input String altered in some way. Compile and run the program. You should see a menu, as follows: Welcome to the String Mangler Available commands: VOWELCASE swap the cases of all vowels in ASCII show the ASCII character codes for every letter in SWAP swap the first and last characters of RANDOM swap a random character in with a randomly generated character INGIFY if a word in the ends with "ing", have it end with as many 'ing's as the word is long DEMATHS remove any potential mathematical symbols from DEDUPE remove all repeated letters in DIGRAPHS capitalise the most common digraphs in English that are found in MIDREPEAT repeat the middle of words in the 3 times if the word is of an even length, 5 times if it's of an odd length PAIRSWAP swap around every 2 letters in ZIP split in half and interleave the 2 halves together INSERT add # or ~ to after every 3 characters, depending on if the string length is even or odd REPEATSWAP swap the most common repeated letters in the English language (SS <-> FF & TT <-> EE) QUIT exit the String Mangler Enter command: The user can choose any item from the menu. For example, the user chooses DEMATHS, followed by SWAP: Enter command: demaths hello what is the square root of -1? Warning! Your text contained mathematics. Decontaminated text follows: hello what is the square root of ? Enter command: swap hello! !elloh Enter command: You should test each of the menu options and make sure you understand what they do. Reason for using Java 11 (or later versions) The StringMangler class uses String methods extensively. One of these methods, String.join() was introduced in Java 8, and another, String.repeat() in Java 11. If you use a version of Java that is earlier than 11, the repeat() method will give a compilation error, and if the version of Java you use is also earlier than 8, the join() method will give another compilation error. You can read the documentation on these methods in the Java 11 String API: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html Class variables Note that variables have a scope, generally the set of brackets inside which they are declared. When a variable is in scope it means that it can be accessed and used. Variables are generally only in scope where they are declared. For example: for (int i = 0; i < word.length-1; i += 2) {i++;} the variable i is only in scope inside the for loop, as it is declared in the for loop. Once the loop ends i is out of scope and cannot be accessed. Variables can be local to methods, that is, variables declared inside a method are in scope only inside the method. Variables declared in a loop would be local to the loop. In general, if a block of code is delineated by brackets, then any variable declared immediately inside those brackets is only in scope within the brackets, and effectively does not exist outside of them. The StringMangler class has two class variables. Class variables are static variables that are declared inside the class, but outside of all the class's methods. Class variables can be accessed by methods within the class without needing to be included in the method’s parameter list since they are in scope anywhere in the class. The StringMangler class has two class variables, a Scanner object called userInput, and a variable of Random type called random. Writing your own methods You are asked to alter the structure of the StringMangler class by reorganising the class into methods in order to make the class both more readable and more reflective of the objectoriented programming paradigm (in the object-oriented programming paradigm, methods should have one task to do). Try to keep your methods short, since, in general, the shorter a method is, the easier it is to read. Note that a method may have an overarching task, which the method’s name should describe, but it may be that the task undertaken by some methods could be broken down into further sub-tasks, and some or all of these sub-tasks could be performed by methods. Suppose that the main task of a method was to take a String and return a new String with the case of all vowels in the String changed. For example, the input String “Vowels are A, E, I, O and U” would return “VOwEls ArE a, e, i, o And u”. The method’s task can be broken down into sub-tasks such as breaking the input String into characters, finding the vowels in those characters and changing their case. The developer may choose to outsource one or other of these tasks to another method. For example, the method may invoke another method that takes a char and will return the char unchanged if it is not a vowel, and in a different case if it is a vowel. Hence, the String method to change the case of all vowels in a String might be more readable if it invokes a char method called ChangeCaseOfCharIfVowel or ChangeCaseOfVowels or similar. When making decisions about whether the methods you write should in turn invoke other methods, please always bear readability in mind (see the Appendices for details). That is, invoking sub-methods can make your methods more readable, but too much of methods invoking methods will make your class less readable. What methods to write, and if and how to break methods into sub-tasks with their own methods, is a matter for your judgement. Changing logic or syntax To complete this coursework assignment, you will need to write some additional Java code to that already in the StringMangler class. You may wish to change some of the code given to you but remember the StringMangler class works as it is. Your challenge is not to change the behaviour of the class, but to redesign the class using methods. Mark deduction for recursive methods When putting code into methods, you may wish to keep the logic and syntax of the statements being put into a method. You are free to rewrite existing code, provided that your revised StringMangler class does everything that the original class did. If you do rewrite existing code that is in a loop, please do not use recursion for iteration (or for any other reason). Make sure that any loops are for, while or do/while loops. If you use recursion (where methods call themselves) for iteration you will lose marks, so please make sure that none of your methods are recursive. Note that in general, care must be taken when using recursion for iteration, as recursive methods can be very heavy on the memory, potentially leading to applications ending with a StackOverflowError. Recursion can be a good solution for certain problems, but care must always be taken to make sure that recursive methods are not using so much memory that they compromise overall performance Coursework assignment 1 Please complete the following five Tasks: Task 1 Note that the work of the StringMangler class is carried out entirely in the main method. Under the object-oriented programming paradigm, tasks performed in a class should be done by methods, and each method should perform only one task. Save the StringMangler class into a new class, called StringManglerTwo. In this class rewrite the StringMangler class such that all code is within a method, except for the statements: private static Scanner userInput; private static Random random; which are declaring class variables and should not be put into methods. Your StringManglerTwo class, when run by a user, should have exactly the same behaviour as the StringMangler class. You are not expected to write a constructor for the StringManglerTwo class, and instance methods are also not necessary. All of your new methods can be static methods Task 2 In your StringManglerTwo class, ensure the main method only contains method invocations. Task 3 The methods invoked by the main method of your StringManglerTwo class may vary, depending on how you have re-designed the StringMangler class, but one method all submissions should have is a method to run the user interaction loop. Your user interaction loop method should: ask the user for input parse the input into a command and a String take appropriate action. The method should repeat these steps until the user enters ‘quit’ and the run of the class ends. Hence your user interaction loop method should be the final method invoked by the main method. Your user interaction loop method should be doing its work with the help of other methods that it in turn, invokes. Task 4 Make sure to follow the advice given about readability in Appendix 1, sections 1.2–1.6. In particular: Give your methods, and any new variables you introduce, names that describe their purpose. Good names are partly subjective, so the examiners will accept any reasonable attempt, but clearly method names such as method1() and method2() will lose readability marks since they tell the reader nothing about the purpose and intent of the methods. Format your work in a way that is both consistent and readable. The StringMangler class that you have been given is formatted in a readable way, including indenting loops and if/else statements to show the control structure and make it easy to pick out the start and end of loops and if/else blocks. Any student submitting a StringMangler class with poorly formatted code will lose some marks for this Task Note that poorly formatted code is considered to be code that is formatted in such a way that the control structure is unclear. For example: //Good formatting private static String getShopLocationFromUser() { System.out.println("SHOP LOCATIONS:"); for (int i = 0; i < LOCATIONS.length; i++) { System.out.println((i+1) + ") " + LOCATIONS[i]); } int choice = getIntFromUser("Your shop’s number"); return LOCATIONS[choice-1]; } //Poor formatting private static String getShopLocationFromUser() { System.out.println("SHOP LOCATIONS:"); for (int i = 0; i < LOCATIONS.length; i++) { System.out.println((i+1) + ") " + LOCATIONS[i]); } int choice = getIntFromUser("The number that corresponds to your shop"); return LOCATIONS[choice-1]; } Task 5 Before you start work you should run the StringMangler class and make sure that you understand what it is doing. Once you have written your new version of StringMangler, test it. Correct any mistakes you find. If you find mistakes that you cannot correct then you must document them with a brief comment at the top of your class. If your testing reveals that the class works as you expect, please write a short comment to document this (a sentence will be enough). Make sure to test all the methods in your class. Failure to write a comment about testing will result in a loss of all marks for testing, even if your class works as it should. You should write no more than 100 words per issue found, for example if your testing discovers two issues, then you should write no more than 100 words to describe each issue, hence your total word count should be no more than 200. The examiners will run and test your submission. Provided that any issues with the class are documented in your comment, you will receive all available marks for this Task. You will lose all marks for this Task if the examiners find issues with the class that you have not documented with your comment, or if you do not write a comment about testing. Contact us for this Java assignment Solutions by Codersarts Specialist who can help you mentor and guide for such Java assignments.

  • FashionMNIST - PyTorch | Sample Assignment | Assignment Help

    Guidelines 1. You are allowed to work in pairs. 2. You are allowed to use numpy and scipy packages and PyTorch framework. 3. Technical questions about this exercise should be asked at the course’ piazza or during the TIRGUL. 4. Personal issues regarding the deadline should be directed to Yael Segal. 5. In order to submit your solution please submit the following files: (a) details.txt - A text file with your full name (in the first line) and ID (in the second line). (b) ex 4.py - A python 3.6+ file that contains your main function (attach ANY additional files needed for your code to run). (c) ex 4 report.pdf - A pdf file in which you describe your model and parameters. (d) test y - your model’s predictions on the given test set (see instructions below). Ex4 In this exercise you will implement, train and evaluate your neural network using PyTorch package. Installation First, you will need to install PyTorch package. Installation instructions were uploaded to the Piazza. Please follow them and discuss issues there. Data - FashionMNIST The same one from exercise 3. Each image is 28 pixels in height and 28 pixels in width, for a total of 784 pixels in total. Each pixel has a single pixel-value associated with it, indicating the lightness or darkness of that pixel. This pixel-value is an integer between 0 and 255. Labels. The possible labels are: T-shirt/top Trouser Pullover Dress Coat Sandal Shirt Sneaker Bag Ankle boot Instructions In this exercise you will implement fully connected neural networks via PyTorch. You will need to implement several settings and report the effect of each setting in terms of loss and accuracy. You should explore the following: 1. Model A - Neural Network with two hidden layers, the first layer should have a size of 100 and the second layer should have a size of 50, both should be followed by ReLU activation function. Train this model with SGD optimizer. 2. Model B - Neural Network with two hidden layers, the first layer should have a size of 100 and the second layer should have a size of 50, both should be followed by ReLU activation functionm, train this model with ADAM optimizer. 3. Model C - Dropout – add dropout layers to model A. You should place the dropout on the output of the hidden layers. 4. Model D - Batch Normalization - add Batch Normalization layers to model A. You should place the Batch Normalization before the activation functions 5. Model E - Neural Network with five hidden layers:[128,64,10,10,10] using ReLU . 6. Model F - Neural Network with five hidden layers:[128,64,10,10,10] using Sigmoid. In all these experiments you should use log softmax as the output of the network and nll loss function (see code example in recitation 8 slides). Training You should train your models using FashionMNIST dataset (the same one from ex. 3). You should train your models for 10 epochs each. You can use the code example we provide you in recitation 8 or in the PyTorch examples repository on GitHub. You should split the training set to train and validation (80:20). Note: you should load the train file for FashionMNIST manually (train files from ex3). Finally, you should use your best model to generate predictions for the examples in test x and write them into a file named test y, similarly to the previous exercise. Your predictions file should contain 5000 rows exactly. Note: Do not shuffle the test file Evaluation - Report Your report file, ex 4 report.pdf, should include the following for EACH model: 1. Plot the average loss per epoch for the validation and training set in a single image. 2. Plot the average accuracy per epoch for the validation and training set in a single image. 3. Test set accuracy (original FashionMNIST test set ). 4. Hyper parameters. Contact us for this machine learning assignment Solutions by Codersarts Specialist who can help you mentor and guide for such machine learning assignments.

  • Introduction of flutter and its widgets

    Why Flutter? One code base for both iOS and Android. Flutter is the only mobile SDK that provides reactive views without requiring JavaScript bridge. Flutter apps look and feel great. Make a change in the app and see them in the blink of an eye. All thanks to Hot-Reload. What’s up with “Dart”! Dart is a reactive language that talks similar to python in terms of ease of coding while keeping the power of native java under the hood. Widgets Flutter widgets are built using a modern framework that takes inspiration from React. The central idea is that you build your UI out of widgets. Widgets describe what their view should look like given their current configuration and state. There are broadly two types of widgets in Flutter. State-full Widgets and Stateless Widgets. The names are self-explanatory. State-full Widgets are sensitive to what happens within its boundaries and gets rebuilt when a state change is detected. Conversely, Stateless widgets are not state sensitive and remain static throughout its life cycle. import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(title: 'Calculator'), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: new Container( child: new Column(children: [ new Text("0"), // new Expanded(child: null), new MaterialButton(child: new Text("1"), onPressed: ()=> {}, color: Colors.blueGrey, textColor: Colors.white, ) ],), ) ); } } Hire an Flutter developer to get quick help for all your android |Ios app development needs. with the hands-on android assignment help and android project help by Codersarts android expert. You can contact the android programming help expert any time; we will help you overcome all the issues and find the right solution. Want to get help right now? Or Want to know price quote

  • Run Flutter App

    Flutter is an open-source UI software development kit created by Google. It is used to develop applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia, and the web from a single codebase. The first version of Flutter was known as codename "Sky" and ran on the Android operating system Running flutter app first install vs Code and Dart extension in your visual studio code cmd for create flutter project Dart Code : for running emulator Run App : Hire an android developer | IOS to get quick help for all your android app development needs. with the hands-on android assignment help and android project help by Codersarts android expert. You can contact the android | ios programming help expert any time; we will help you overcome all the issues and find the right solution. Want to get help right now? Or Want to know price quote Please send your requirement files at contact@codersarts.com. and you'll get instant reply as soon as requirement receives

  • MySQL Assignment Help

    With the database in file organization.sql (attribute postal_address added) : / For each following question, give the SQL query which computes what is asked. Fill the database with data that allows you to verify that the query is working. Some data must satisfy the request and some not. Justify in the comments the relevance of the test data set. the last name and the first name of members born in 1999 ; the name and the phone number of members who live in Créteil ; for each role, the role description and the number of members with this role ; for each role, the role description and the date of birth of the youngest members ; / the name and the email address of members whose role is moniteur and who are the oldest ; the activity name and the numbers of members who practise the activity for activities with at least 10 members registered ; the name, the date of birth and the email of the youngest members who practise judo ; the names and the referrer names when the tutor is older than the member. B. Enrich the database by adding attributes or tables. Explain the choices. Fill in the new fields with data. Write 6 SQL queries using the new structure and comment in natural language on the role of the queries. Put in a zip archive the SQL file which contains the database and its contents as well as the SQL file with the queries for question A and the SQL file with the queries for question B and upload the zip file. Do not forget to put the names of the students in each file. Contact us for this MySQL assignment Solutions by Codersarts Specialist who can help you mentor and guide for such MySQL assignments. If you have project or assignment files, You can send at contact@codersarts.com directly

  • Apache Spark Assignment Help | Machine Learning Using PySpark

    What is PySpark? PySpark is a Python API for Spark released by the Apache Spark community to support Python with Spark. Using PySpark, one can easily integrate and work with RDDs in Python programming language too. There are numerous features that make PySpark such an amazing framework when it comes to working with huge datasets. Whether it is to perform computations on large datasets or to just analyze them, Data Engineers are switching to this tool. Key Features of PySpark Real-time computations: Because of the in-memory processing in the PySpark framework, it shows low latency. Polyglot: The PySpark framework is compatible with various languages such as Scala, Java, Python, and R, which makes it one of the most preferable frameworks for processing huge datasets. Caching and disk persistence: This framework provides powerful caching and great disk persistence. Fast processing: The PySpark framework is way faster than other traditional frameworks for Big Data processing. Works well with RDDs: Python programming language is dynamically typed, which helps when working with RDDs. Spark with Python vs Spark with Scala As it is already discussed, Python is not the only programming language that can be used with Apache Spark. Data Scientists already prefer Spark because of the several benefits it has over other Big Data tools, but choosing which language to use with Spark is a dilemma that they face. Being one of the most popular frameworks when it comes to Big Data Analytics, Python has gained so much popularity that you wouldn’t be shocked if it became the de-facto framework for evaluating and dealing with large datasets and Machine Learning in the coming years. The most used programming languages with Spark are Python and Scala. Now if you are going to learn PySpark (Spark with Python), then it is important that you know why and when to use Spark with Python, instead of Spark with Scala. In this section, the basic criteria, one should keep in mind while making the choice between Python and Scala to work on Apache Spark, are explained. Installation In Window: In this section, you will come to know how to install PySpark on Windows systems step by step. Download the latest version of Spark from the official Spark website What is SparkConf? Before running any Spark application on a local cluster or on a dataset, you need to set some configurations and parameters. This is done with the help of SparkConf. As the name suggests, it offers configurations for any Spark application. Features of SparkConf and Their Uses Here is a list of some of the most commonly used features or attributes of SparkConf while working with PySpark: set(key, value): This attribute is used to set a configuration property. setMaster(value): This attribute is used to set the master URL. setAppName(value): This attribute is used to set an application name. get(key, defaultValue=None): This attribute is used to get a configuration value of a key. setSparkHome(value): This attribute is used to set the Spark installation path. Code to run SparkConf >>> from pyspark.conf import SparkConf >>> from pyspark.context import SparkContext >>> conf = SparkConf().setAppName("PySpark App").setMaster("local[2]") >>> conf.get("spark.master") >>> conf.get("spark.app.name") What is PySpark SparkContext? SparkContext is the entry gate for any Spark-derived application or functionality. It is the first and foremost thing that gets initiated when you run any Spark application. In PySpark, SparkContext is available as sc by default, so creating a new SparkContext will throw an error. Parameters SparkContext has some parameters that are listed below: Master: The URL of the cluster SparkContext connects to AppName: The name of your job SparkHome: A Spark installation directory PyFiles: The .zip or .py files send to the cluster and then added to PYTHONPATH Environment: Worker node environment variables BatchSize: The number of Python objects represented. However, to disable batching, set the value to 1; to automatically choose the batch size based on the object size, set it to 0; and to use an unlimited batch size, set it to −1 Serializer: This parameter tells about an RDD serializer Conf: An object of L{SparkConf} to set all Spark properties profiler_cls: A class of custom profilers used to do profiling; however, pyspark.profiler.BasicProfiler is the default one Code to Run SparkContext: from pyspark import SparkContext sc = SparkContext("local", "First App") Classes of Spark SQL and DataFrames: pyspark.sql.SparkSession Main entry point for DataFrame and SQL functionality. pyspark.sql.DataFrame A distributed collection of data grouped into named columns. pyspark.sql.Column A column expression in a DataFrame. pyspark.sql.Row A row of data in a DataFrame. pyspark.sql.GroupedData Aggregation methods, returned by DataFrame.groupBy(). pyspark.sql.DataFrameNaFunctions Methods for handling missing data (null values). pyspark.sql.DataFrameStatFunctions Methods for statistics functionality. pyspark.sql.functions List of built-in functions available for DataFrame. pyspark.sql.types List of data types available. pyspark.sql.Window For working with window functions. Analyze Data using Spark SQL Relational databases are used by almost all organizations for various tasks – from managing and tracking a huge amount of information to organizing and processing transactions. It’s one of the first concepts we are taught in coding school. And let’s be grateful for that because this is a crucial cog in a data scientist’s skillset! You simply cannot get by without knowing how databases work. It’s a key aspect of any machine learning project. Structured Query Language (SQL) is easily the most popular language when it comes to databases. Unlike other programming languages, it is easy to learn and helps us start with our data extraction process. For most of the data science jobs, proficiency in SQL ranks higher than most other programming languages. Features of Spark SQL Spark SQL has a ton of awesome features but I wanted to highlight a few key ones that you’ll be using a lot in your role: Query Structure Data within Spark Programs: Most of you might already be familiar with SQL. Hence, you are not required to learn how to define a complex function in Python or Scala to use Spark. You can use the exact same query to get the results for your bigger datasets! Compatible with Hive: Not only SQL, but you can also run the same Hive queries using the Spark SQL Engine. It allows full compatibility with current Hive queries One Way to Access Data: In typical enterprise-level projects, you do not have a common source of data. Instead, you need to handle multiple types of files and databases. Spark SQL supports almost every type of file and gives you a common way to access a variety of data sources, like Hive, Avro, Parquet, JSON, and JDBC Performance and Scalability: While working with large datasets, there are chances that faults might occur between the time while the query is running. Spark SQL supports full mid-query Fault Tolerance so we can work with even a thousand nodes simultaneously User-Defined Functions: UDF is a feature of Spark SQL that defines new column-based functions that extend the vocabulary of Spark SQL for transforming datasets Executing SQL Commands with Spark I have created a random dataset of 25 million rows. You can download the entire dataset here. We have a text file with comma-separated values. So, first, we will import the required libraries, read the dataset, and see how Spark will divide the data into partitions: # importing required libraries from pyspark.sql import SQLContext from pyspark.sql import Row # read the text data raw_data=sc.textFile('sample_data_final_wh.txt').cache() How to Manage Python Dependencies in PySpark There are different methods which is used to manage the dependencies in PySpark, Which is given below: Using Conda Conda is one of the most widely-used Python package management systems. PySpark users can directly use a Conda environment to ship their third-party Python packages by leveraging conda-pack which is a command line tool creating relocatable Conda environments. Using Virtualenv Virtualenv is a Python tool to create isolated Python environments. Since Python 3.3, a subset of its features has been integrated into Python as a standard library under the venv module. In the upcoming Apache Spark 3.1, PySpark users can use virtualenv to manage Python dependencies in their clusters by using venv-pack in a similar way as conda-pack. In the case of Apache Spark 3.0 and lower versions, it can be used only with YARN. Using PEX PySpark can also use PEX to ship the Python packages together. PEX is a tool that creates a self-contained Python environment. This is similar to Conda or virtualenv, but a .pex file is executable by itself. Contact Us to Get PySpark Assignment Help, PySpark Homework Help, PySpark Project Help, and get an instant help with an affordable price, you can send your request directly at contact@codersarts.com

  • Apache Spark

    What is Apache spark? Apache Spark is an open-source distributed general-purpose cluster-computing framework which provides a number of inter-connected platforms, systems and standards for Big Data projects. Spark provides an interface for programming entire clusters with implicit data parallelism and fault tolerance. In simpler words, it can quickly perform processing tasks on very large data sets, and can also distribute data processing tasks across multiple computers, either on its own or together with other distributed computing tools. It utilizes in-memory caching (i.e. RAM rather than disk space) and optimized query execution for fast queries against data of any size. Simply put, Spark is a fast and general engine for large-scale data processing. These two qualities are keys to the world of big data and machine learning, which require the assembling of massive computing power to crunch through large data stores. It was originally developed at the University of California, Berkeley's AMPLab, the Spark codebase was later donated to the Apache Software Foundation, which has maintained it since. Apache Spark Ecosystem: Spark can be deployed in a variety of ways, provides native bindings for the Java, Scala, Python, and R programming languages, and supports SQL, streaming data, machine learning, and graph processing. Apache Spark Core – Spark Core is the underlying general execution engine for the Spark platform that all other functionality is built upon. It provides in-memory computing and referencing datasets in external storage systems. Spark SQL – Spark SQL is Apache Spark’s module for working with structured data. The interfaces offered by Spark SQL provide Spark with more information about the structure of both the data and the computation being performed. Spark Streaming – This component allows Spark to process real-time streaming data. Data can be ingested from many sources like Kafka, Flume, and HDFS (Hadoop Distributed File System). Then the data can be processed using complex algorithms and pushed out to file systems, databases, and live dashboards. MLlib (Machine Learning Library) – Apache Spark is equipped with a rich library known as MLlib. This library contains a wide array of machine learning algorithms- classification, regression, clustering, and collaborative filtering. It also includes other tools for constructing, evaluating, and tuning ML Pipelines. All these functionalities help Spark scale out across a cluster. GraphX – Spark also comes with a library to manipulate graph databases and perform computations called GraphX. GraphX unifies ETL (Extract, Transform, and Load) process, exploratory analysis, and iterative graph computation within a single system. Architecture At a foundational level, an Apache Spark application comprises of two main components: a driver, which converts the user's code into multiple tasks that can be distributed across worker nodes, and executors, which run on those nodes and execute the tasks assigned to them. Some form of cluster manager is necessary to mediate between the two. Moreover, Spark can run in a standalone cluster mode that just requires the Apache Spark framework and a JVM on each machine in your cluster. However, it would be much better to take advantage of a more robust resource or cluster management system to take care of allocating workers on demand for you. In the enterprise, this will normally mean running on Hadoop YARN, but Apache Spark can also run on Apache Mesos, Kubernetes, and Docker Swarm. If you seek a managed solution, then Apache Spark can be found as part of Amazon EMR, Google Cloud Dataproc, and Microsoft Azure HDInsight. Databricks, the company that employs the founders of Apache Spark, also offers the Databricks Unified Analytics Platform, which is a comprehensive managed service that offers Apache Spark clusters, streaming support, integrated web-based notebook development, and optimized cloud I/O performance over a standard Apache Spark distribution. Apache Spark builds the user’s data processing commands into a Directed Acyclic Graph, or DAG. The DAG is Apache Spark’s scheduling layer; it determines what tasks are executed on what nodes and in what sequence. Features Fast processing – The most important feature of Apache Spark that has made the big data world choose this technology over others is its speed. Big data is characterized by volume, variety, velocity, and veracity which needs to be processed at a higher speed. Spark contains Resilient Distributed Dataset (RDD) which saves time in reading and writing operations, allowing it to run almost ten to one hundred times faster than Hadoop. Flexibility – Apache Spark supports multiple languages and allows the developers to write applications in Java, Scala, R, or Python. In-memory computing – Spark stores the data in the RAM of servers which allows quick access and in turn accelerates the speed of analytics. Real-time processing – Spark is able to process real-time streaming data. Unlike MapReduce which processes only stored data, Spark is able to process real-time data and is, therefore, able to produce instant outcomes. Better analytics – In contrast to MapReduce that includes Map and Reduce functions, Spark includes much more than that. Apache Spark consists of a rich set of SQL queries, machine learning algorithms, complex analytics, etc. With all these functionalities, analytics can be performed in a better fashion with the help of Spark. Ease of use - Spark has easy-to-use APIs for operating on large datasets. This includes a collection of over 100 operators for transforming data and familiar data frame APIs for manipulating semi-structured data.

bottom of page