Question: help me write some code. My 2 files I have as of now are final _ project.java and final _ project _ tester.java basically, help

help me write some code. My 2 files I have as of now are final_project.java and final_project_tester.java
basically, help me create a program using a minimum of 2 files ( final_project.java and final_project_tester.java) The program will display a set of images to a user. The program will allow a user to select some of the images. Then the program will return images that are NOT in the provided set and are similar to the images that were slected by the user. and if the user does not like the new set of images, the program will have the option to recalibrate ((choose a different similarity measure) so that there are different images to choose from.
additional information:
Motivatoin: This code will help a user to choose a few interesting images from a set and get similar images to the one's they've chosen. Also, if a user is not satisfied with the images they get, they will be able to recalibrate the program. Task: The program is a user interface which displays a set of different images to a user. It allows the user to select some of the images. It will return images NOT in the provided set that are similar to the images selected. If the user does not like the new set of images it allows them the option to choose a different similarity measure to the program. Run the code with the following command: gradle run -q --args="train.txt, test.txt"
help me write some code. My 2 files I have as of now are final_project.java and final_project_tester.java
Here is some old codebase that might help:
basically, help me create a program using a minimum of 2 files ( final_project.java and final_project_tester.java) The program will display a set of images to a user. The program will allow a user to select some of the images. Then the program will return images that are NOT in the provided set and are similar to the images that were slected by the user. and if the user does not like the new set of images, the program will have the option to recalibrate ((choose a different similarity measure) so that there are different images to choose from.
additional information:
Motivatoin: This code will help a user to choose a few interesting images from a set and get similar images to the one's they've chosen. Also, if a user is not satisfied with the images they get, they will be able to recalibrate the program. Task: The program is a user interface which displays a set of different images to a user. It allows the user to select some of the images. It will return images NOT in the provided set that are similar to the images selected. If the user does not like the new set of images it allows them the option to choose a different similarity measure to the program. Run the code with the following command: gradle run -q --args="train.txt, test.txt"
Here is some old codebase that might help:
import java.io.*;
import java.util.*;
public class CS_214_Project {
private static final int NUM_BINS =64; // Still use 64 bins for perceptron input
private static final int GRAYSCALE_RANGE =256; // Full range for .pgm pixel values
private double[] weights;
private double biasWeight;
public CS_214_Project(){
weights = new double[NUM_BINS];
biasWeight =0.0;
}
public static void main(String[] args){
if (args.length !=2){
throw new IllegalArgumentException("Please provide exactly two arguments: ");
}
String inputFilePath = args[0];
int targetClass = Integer.parseInt(args[1]);
List imagePaths = loadFilePaths(inputFilePath);
CS_214_Project classifier = new CS_214_Project();
try {
classifier.trainModel(imagePaths, targetClass, 100);
classifier.displayWeights();
} catch (IOException e){
System.err.println("Error during file processing: "+ e.getMessage());
}
}
public static List loadFilePaths(String filePath){
List fileList = new ArrayList<>();
try (BufferedReader reader = new BufferedReader(new FileReader(filePath))){
String line;
while ((line = reader.readLine())!= null){
line = line.trim();
if (!line.isEmpty()){
fileList.add(line);
}
}
} catch (IOException e){
System.err.println("Error loading file: "+ e.getMessage());
}
return fileList;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!